Can I extract or convert a video file to audio? - ios

I have a case where i need to get audio out from video file. Is this possible in iOS ??
I need only the output file as an audio any type. I have the video file in my documents directory which I record earlier in application.

1.Convert Video Reverse
2.Extract audio from a video file
3.Add Audio & Video Together
Download Code From Here
may be helpful to you.

Yes, it can be done. See Extract audio from video file for ideas.
Extracting is probably the more accurate term.

Related

How to add subtitles for offline video (using AvPlayer)

I'm trying to add subtitles for a video. Both video file and subtitles files are downloaded on iphone (*in both vtt and srt format)
Example paths:
subtitle: file:///private/var/mobile/Containers/Data/Application/384B1E38-7536-4F52-A9E1-B7D8E5A1490B/Documents/1_665ba05feee690141b7_english.vtt*).
video file: file:///private/var/mobile/Containers/Data/Application/384B1E38-7536-4F52-A9E1-B7D8E5A1490B/Library/com.apple.UserManagedAssets.q1zdd9/1_665ba05f2b5aa225440dc840690141b7_4CD8B29737842BA5.movpkg
I have absolutely no idea how i should create or prepare those files to have a AVMediaSelectionGroup and be able to select a proper AVMediaCharacteristic on
Unfortunately most of tutorials contains only examples for hls streaming, but im not sure if it is valid for offline player.
How should i use AVAssetResourceLoaderDelegate or AVAssetResourceLoader and how should i create a single AVURLAsset with all subtitles?
Could you help me somehow and describe what should i do? I am aware that the question is imprecise, but in fact i do not know where should i start (describing a path - what i should do in steps would be appreciated).
Kind regards.

How to add metadata to AAC files recorded with AVAudioRecorder?

Is there any way to set metadata like artist, title, genre etc. for an AAC file recorded with AVAudioRecorder?
For MP3 files there is the ID3 tag. However, I haven't been able to find an equivalent for AAC files. I have searched through the Apple Developer Docs without success but there must be some way to set those attributes because when playing an AAC file downloaded from iTunes in an audio player like VLC or foobar2000 it does recognize the metadata and even the album art.
(For recording the AAC files I use the code from Apple's Multimedia Programming Guide.)
I don't think you can add metadata to your audio file when using AVAudioRecorder. I think you will have to use an extra AVAssetExportSession pass to do that, like is done in this question

Convert .mp3 file to .wav or .caf in code in iOS

I am retrieving an MP3 file from the iPod Library and saving it to the application's Documents directory. I need to convert it to .wav or .caf so that I can use OpenAL or any other library to change the pitch of the audio.
Can this be done? Any assistance with code will be greatly appreciated.
Take a look at the AVAssetWriter class. Also, check out this link, its not exactly what you want, but its a start.
http://www.subfurther.com/blog/2010/12/13/from-ipod-library-to-pcm-samples-in-far-fewer-steps-than-were-previously-necessary/
Note that it might be difficult to gain access to the user's actual file as that would require reaching out of your app's sandbox - something Apple doesn't allow.

Buffering in Blackberry

Currently I am working on the application for which I have to use audio buffering. Please tell me how I can achieve this task as I am trying myself.
read this Buffer and play streamed media
Also, there's a great example in the Blackberry SDK, which shows buffered playback of a MP3 file.
Take a look in the 'samples' folder of JDE/Eclipse Plugin.

How to play a downloaded mp3 file?

I have downloaded a mp3 file from a server successfully, but the problem I encountered is, I don't know how to play that file.. Should I use AVAudioPlayer or AudioQueue to play the file?? I will be appreciate if you could post some sample code here.
Both AVAudioPlayer and the Audio Queue API can be used to play MP3 files. The AVAudioPlayer is well documented and has a lot of sample code available. So why not give it try first and if that does not work, post a more specific question here.

Resources