I am the maintainer of a software which use
ffmpeg to automatically mix &
transcode two input stream into a single output with a video & audio track. I
am currently facing some portability issues and would like to improve my use
ffmpeg to be ensure that my application will be as portable as possible:
- Will work on almost all OS & distro
- Will work with old ffmpeg releases (debian squeeze still use ffmpeg 0.5.10)
My first source is an FLV or mp4 file. It contains two streams: audio & video. I don't care about the video, it not included in the final file.
The second source is a list of PNG or JPG images. They will be used to create
the video stream using
The output must be a file with two streams: audio & video. I have no strong requirement regarding the container, the audio codec and the video codec. They only need to be easily available on any OS/device. I want to preserve the audio quality as much as possible. The video stream is only a set of static slides. It would be great to minimize the size of the output file.
According to this description, which flags/container/codecs would you use?
The description of the current process follows:
Extract the audio track from the first source
ffmpeg -v error -i source_1_path -vn -acodec libvorbis audio_track.ogg
Create the final file
ffmpeg -v error -f image2 -r 1 -i frame_pattern.jpg -i audio_track.ogg output.avi
I was thinking that ffmpeg would automatically use the most suitable audio/video
codecs & settings. Unfortunately it fails on some Linux distributions
[ac3 @ 0x1e60380] invalid bit rate with
It would obviously be better to do it in a single pass rather than creating a temporary audio track.