How to add video to audio file on iphone SDK - iphone

I got success to combine audio and video with the help of this link.
How to add audio to video file on iphone SDK
It create video file of video length but i want to create it of audio length.
For example my video file is of 10 seconds and audio file of 20 seconds then combined video must be 20 seconds.Any idea ?

See: http://www.ffmpeg.org/ffmpeg-doc.html#SEC12

Related

How to play MP3 url in AVaudioPlayer without loading buffer

I'm trying to play in my app mp3 file from url ... But the problem is the file size is big 120 MB ... So i said why not making it load same as youtube since i heard we can control the buffer and not loading the full audio file to the player ... instead we can play small sizes same as youtube for example ... i search and tried to get a way or a code but i couldn't find anything.
So is it possible to play mp3 file using AVaudioPlayer immediately without loading the full audio file?
Not with AVAudioPlayer. Use AVPlayer instead.

AVFoundation created video won't upload to Facebook

I'm working on an app that create a video from a collection of frames using AVFoundation, adds an audio track and uploads to Facebook. I've previously had this working successfully, but it now appears to be failing and I can't find the issue with the format of the video.
An example video is available here: http://www.sendspace.com/file/6p8u11
It should be a Quicktime movie with H.264 and AAC audio. This ought to be ok, but perhaps something about the frame size or frame rate are an issue?
Hope someone can help.
Thanks,
J

how to record only audio using UIImagePickerController?

I am working on media recording on IOS. I was able to record with both audio and video using UIImagePickerController. For my specification I want to record only audio. Is it possible with UIImagePickerController? or Do I need to think about other methods?
thanks.
UIImagePickerController cannot be used to record audio. Instead you should take a look at the SpeakHere sample code from Apple.
Also check Audio Queue - Recording to a compressed audio format on how to record as compressed audio format and conserve disk space.

how to use simpleaudioengine to play audio in a specified duration

i want to use SimpleAudioEngine to play a 2s mp3, but not so simple. I want to this audio plays 4s, that it, this mp3's duration should be 4s. Any good idea can solve this problem, Thank u very much
Edit the file to be 4 seconds using audacity audio editor. You can extend the file without changing the pitch of the audio. Then export the file as a separate mp3 file. Then just pay the file normally.

Which format support the audio file with a playing video?

i am playing the video and in the background i have to play the audio file and if i do this audio is not playing its sound as it just play video is it a extension problem i am using the .mp3 for the audio and .mp4 for the video .
how can we do this we have to play simultanisouly .both the file
balraj verma
Have a look at this:
http://developer.apple.com/iphone/library/documentation/MusicAudio/Conceptual/CoreAudioOverview/CoreAudioEssentials/CoreAudioEssentials.html#//apple_ref/doc/uid/TP40003577-CH10-SW67
"To play multiple sounds simultaneously, create one playback audio queue object for each sound. For each audio queue, schedule the first buffer of audio to start at the same time using the AudioQueueEnqueueBufferWithParameters function.
Audio format is critical when you play sounds simultaneously on iPhone or iPod touch. This is because playback of certain compressed formats in iPhone OS employs an efficient hardware codec. Only a single instance of one of the following formats can play on the device at a time:
AAC
ALAC (Apple Lossless)
MP3"