[Libav-user] Switching codecs from encode to playback on the fly
Bruce Wheaton
bruce at spearmorgan.com
Sun May 6 21:28:02 CEST 2012
On May 6, 2012, at 11:04 AM, Alex Cohn wrote:>
> > Then I suppose the question becomes, can I use the same AVFormatContext with encoders and decoders… and use the same AVStreams?
> >
> > Bruce
>
> They were never designed for such reuse; but even if you could, what kind of profit would you gain? These objects are negligebly small compared to video data you must cache anyway.
>
>
Good question. The intent is to seamlessly move from ingesting a movie and viewing it to playing back. I can't find a way to access the same movie for playback as it's being ingested (that would work fine too), can't tell which media container might support that even. So my workaround was to get frames, cache them for playback and record at the same time.
I was hoping to use all the same structures to minimize the interruption as I switch between modes. It was more the time to set up the new structures - opening the movie file etc. that was a pain, and having to have a double set of structures that will bloat my playback code.
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120506/1003dde2/attachment.html>
More information about the Libav-user
mailing list