[FFmpeg-devel] mpegts private sections stream support

Måns Rullgård mans
Wed Mar 12 20:21:32 CET 2008


"Mark Buechler" <mark.buechler at gmail.com> writes:

> Hi
>
> On Tue, Mar 11, 2008 at 7:22 PM, Mark Buechler <mark.buechler at gmail.com>
> wrote:
>
>> Hi
>>
>>
>> On Tue, Mar 11, 2008 at 7:13 PM, M?ns Rullg?rd <mans at mansr.com> wrote:
>>
>> > "Mark Buechler" <mark.buechler at gmail.com> writes:
>> >
>> > > Hi, I'm trying to add support for reading ts streams which have a PID
>> > of
>> > > type 0x05 (STREAM_TYPE_PRIVATE_SECTION). I've defined a new codec id
>> > of
>> >
>> > Out of interest, what are those private sections, and how do you
>> > identify them?
>> >
>> > > CODEC_ID_DVB_PRIVSEC in avcodec.h and added an entry in mpegts.c for
>> > > new_pes_av_stream() to set the codec_id to CODEC_ID_DVB_PRIVSEC and
>> > type of
>> > > CODEC_TYPE_DATA for my new stream. However, calls to av_get_frame()
>> > never
>> > > return packets from my stream.
>> > >
>> > > Is there something else I need to look at? The stream has no
>> > descriptors,
>> > > but I wouldn't think that would have anything to do with it.
>> >
>> > The TS demuxer is a mess.  I'm working on and off on a replacement
>> > (haven't had a lot of time for it lately, but it's getting there).  If
>> > you have any interesting samples, please upload them.  I'd be
>> > especially interested in samples where a stream changes PID.
>> >
>> > --
>> > M?ns Rullg?rd
>> > mans at mansr.com
>
>> >
>>
>> The streams contain plain text and don't have any distinguishing bits,
>> that I can see. I've been staring at this for a couple days and haven't
>> gotten anywhere. Any help you can provide would be much appreciated.
>>
>> I'll send you a link to a sample separate from the list.
>>
>> Thanks, Mark.
>>
>
> Ok, after more investigation, it seems my stream is not a standard mpeg2 PES
> stream and is hanging up in mpegts_push_data(). It is expecting a header
> starting with:
>
> 00 00 01
>
> And my stream's header is:
>
> 00 d3 b0 52 00 00 fd 00 00
>
> So, I could create another case for that header and set the pes state to
> MPEGTS_PAYLOAD, but I'm not sure that's the correct thing to do. Does anyone
> recognize that header or have any suggestions on how to proceed?

Those are private_section packets as defined in the MPEG spec with a
table_id of 0xd3, which is deep in the private range.  Presumably some
document defines what this is in this particular context (DVB?), but
I'm at a loss to find it.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list