[Libav-user] Question about usage of libav in an application
Carl Eugen Hoyos
ceffmpeg at gmail.com
Thu Feb 9 00:58:11 EET 2017
2017-02-08 23:40 GMT+01:00 Team Lixo <teamlixo at gmail.com>:
> Is it possible to read/decode more than one media stream in one single
> thread? i.e. round-robin each AVFormatContext, calling av_read_frame once,
> decoding, and moving onto the next packet/frame in this fashion?
If you have multiple contexts that you handle independently then I don't
see what the issue could be (except that this may be inefficient).
> Or, is it possible to achieve the same thing, with each stream being on its
> own thread (constructing the AVFormatContext, reading input, decoding)?
This sounds more suitable for typical contemporary hardware.
> In essence, I am looking to decode multiple streams in one process.
I believe this is what the ffmpeg application does if your input file
contains several streams.
More information about the Libav-user