[Libav-user] Switching codecs from encode to playback on the fly
bruce at spearmorgan.com
Sun May 6 18:32:36 CEST 2012
On May 5, 2012, at 9:16 PM, Alex Cohn wrote:
> On May 6, 2012 6:28 AM, "Bruce Wheaton" <bruce at spearmorgan.com> wrote:
> > Is it possible to open codecs for encoding, and use them to encode a complete piece, then, on the fly (when the complete clip had already been encoded) switch over and use them to decompress the same media?
> > I'm flexible on which codecs, although I like MP4 for being LGPL and good at multi-threading.
> To the best of my knowledge, encoders and decoders are completely separate. But nothing can prevent you from creating both at initialization time, and using the encoder or decoder whenever you need that.
Thanks. I wasn't really aware of that distinction. Ah, I see. avcodec_find_decoder versus avcodec_find_encoder.
Then I suppose the question becomes, can I use the same AVFormatContext with encoders and decoders… and use the same AVStreams?
More information about the Libav-user