[Libav-user] How to handle dynamically changing streams / parameters / codecs?

Andrea3000 andrea3000 at email.it
Sun Nov 4 20:08:07 CET 2012


>> file1: https://dl.dropbox.com/u/11879013/file1.m2ts
>> 
>> file2: https://dl.dropbox.com/u/11879013/file2.m2ts
> 
> I also tested cat file1.m2ts file1.m2ts >test1.ts and 
> cat file2.m2ts file2.m2ts >test2.ts (and WMP) and it 
> could be possible that this cannot be supported due 
> to different encoding parameters.

I don't understand if "cat file1.m2ts file1.m2ts >test1.ts" and "cat file2.m2ts file2.m2ts >test2.ts" do work for you.
I can play them correctly.

> If you know that the stream changes, you can always 
> close and reopen the decoder.

Is it possibile to update the AVCodecContext or AVFormatContext instead of closing and re-opening the decoder?
Or is the decoder close and reopen fast enough to provide a smooth playback upon stream change?

Thank you
Regards

Andrea




More information about the Libav-user mailing list