[FFmpeg-devel] [RFC/PATCH] Pass PRIVATE_STREAM_2 MPEG-PS packets to caller

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Feb 25 20:35:05 CET 2013


On 25 Feb 2013, at 17:23, Richard <peper03 at yahoo.com> wrote:
>> IMO
>> all things for which proper fields exist like pts/dts/duration/codec_id
>> and so on should be set correctly before some raw packets of any
>> stream are exported just to get to their correct values.
> 
> That's fine by me.  From my point of view, it's just a question of what to do with packets that are defined as 'user-defined'.  If you want to handle them 100% correctly, you can't make any assumptions about their contents as anyone could use them for any purpose.  Almost any attempt to determine their contents without context *could* fail.  All you can do is pass them on unprocessed to allow the calling application (which has the context required) can decode them.

This is actually likely not good enough.
I don't know if they are stored exactly in that, but ATSC CC subtitles are stored in such a user data field as well.
However, they need to be reordered according to the decoder reordering, so if you split them naively the resulting data stream will be completely unuseable.
You won't be able to see thay for DVDs, since there the "solution" is thy B frames are not allowed to contain CC data.
Which I am afraid is another argument to make this DVD-only, unless you want to come up with a way to handle the reordering...

Reimar


More information about the ffmpeg-devel mailing list