[FFmpeg-user] On Demand Input Switching

Andrey Utkin andrey.krieger.utkin at gmail.com
Thu Apr 19 10:21:56 CEST 2012


2012/4/18  <me at renecalles.de>:
> If it is not possible to do it with FFmpeg, could someone please point me
> into a direction how such process could be accomplished programmatically?

FFMpeg util is not capable of this, afaik.
Programmatically, with ffmpeg API - quite possible, i have an
experience on this.
Generally, you can just get media from any sources you need, and mix
them as you wish, the point is that you must feed to output encoding
and muxing contexts the media that has consistent characteristics. I.
e.:
1. Elementary streams quantity and characteristics mustn't change
(look out for cases when there are several audio tracks in container,
for example);
2. Video format, and its "extradata" (global header, if present)
mustn't change (thus you almost certainly must transcode);
3. Video picture dimensions must stay same (thus very probable you
must resize, using libavfilter for that is handy);
4. Also i think if there is certain video frame rate, then you should
preserve it.
5. Audio format, channels layout (mono/stereo/etc), sample rate must stay same.

I hope i ended up with not so many wrong points or bad explanations,
corrections are appreciated.
-- 
Andrey Utkin


More information about the ffmpeg-user mailing list