[FFmpeg-devel] [RFC] Private streams in MPEG PS

Jai Menon jmenon86
Thu May 28 07:03:22 CEST 2009


2009/5/28 M?ns Rullg?rd <mans at mansr.com>:
> Jai Menon <jmenon86 at gmail.com> writes:
>
>> Hi,
>>
>> I'm becoming increasingly suspicious of this check in lavf/mpeg.c:370 -
>>
>> ? 4093 ? ? ? ?mru ? ? if (startcode == PRIVATE_STREAM_1 &&
>> !m->psm_es_type[startcode & 0xff]) {
>>
>> ? ? ? ? ? ? ?^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> Looking at issue 1122 and 725 on roundup, ?I'm inclined to believe
>> that a lot of files out there don't have a program stream map (which I
>> didn't back when issue 725 was reported). Removing this check actually
>> would solve both 1122 and 725 without the need for the fix commited in
>> r17150.
>
> Removing that check would break other files. ?I have at least one file
> that needs this, or I wouldn't have added it.

Do you happen to have it? I would surely benefit from a peek.

> The file in issue 1122 has this program stream map:
>
> program_stream_map ? ? ? ? ? ? ? ? ? ? ? 1bc
> ?program_stream_map_length ? ? ? ? ? ? ?1e ? ? 30
> ?current_next_indicator ? ? ? ? ? ? ? ? 1
> ?reserved ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 3
> ?program_stream_map_version ? ? ? ? ? ? 0
> ?reserved ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 7f
> ?marker_bit ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1
> ?program_stream_info_length ? ? ? ? ? ? 0
> ?elementary_stream_map_length ? ? ? ? ? 14 ? ? 20
> ? ?stream_type ? ? ? ? ? ? ? ? ? ? ? ? ?2 ? ? ?ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream
> ? ?elementary_stream_id ? ? ? ? ? ? ? ? e0
> ? ?elementary_stream_info_length ? ? ? ?0
> ? ?stream_type ? ? ? ? ? ? ? ? ? ? ? ? ?3 ? ? ?ISO/IEC 11172 Audio
> ? ?elementary_stream_id ? ? ? ? ? ? ? ? c0
> ? ?elementary_stream_info_length ? ? ? ?0
> ? ?stream_type ? ? ? ? ? ? ? ? ? ? ? ? ?81 ? ? ATSC A/52 Audio (unofficial)
> ? ?elementary_stream_id ? ? ? ? ? ? ? ? bd
> ? ?elementary_stream_info_length ? ? ? ?0
> ? ?stream_type ? ? ? ? ? ? ? ? ? ? ? ? ?81 ? ? ATSC A/52 Audio (unofficial)
> ? ?elementary_stream_id ? ? ? ? ? ? ? ? bd
> ? ?elementary_stream_info_length ? ? ? ?0
> ? ?stream_type ? ? ? ? ? ? ? ? ? ? ? ? ?3 ? ? ?ISO/IEC 11172 Audio
> ? ?elementary_stream_id ? ? ? ? ? ? ? ? c1
> ? ?elementary_stream_info_length ? ? ? ?0
> ?CRC_32 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 301ec18b
>
> The first bit of data relevant to private_stream_1 looks like this:
>
> 00001800 ?00 00 01 ba 44 00 04 06 ?74 31 03 46 87 f8 00 00 ?|....D...t1.F....|
> 00001810 ?01 bd 07 ec 80 81 08 21 ?00 01 d2 f1 1e 60 3a 80 ?|.......!.....`:.|
> 00001820 ?02 00 01 0b 77 c6 18 1c ?30 e1 df fd cd d9 24 a0 ?|....w...0.....$.|
> 00001830 ?00 07 df da 96 a3 43 83 ?c2 f4 74 68 74 0a 8d 8e ?|......C...tht...|
>
> Further on, we have this:
>
> 00002000 ?00 00 01 ba 44 00 04 08 ?95 d1 03 46 87 f8 00 00 ?|....D......F....|
> 00002010 ?01 bd 07 ec 80 81 08 21 ?00 01 d2 f1 1e 60 3a 81 ?|.......!.....`:.|
> 00002020 ?02 00 01 0b 77 20 13 1c ?30 e1 df fd cd d9 24 a0 ?|....w ..0.....$.|
> 00002030 ?00 07 df da 96 84 04 04 ?04 10 80 80 80 82 10 10 ?|................|
>
> This file indeed seems to use some kind of substream tagging.

Yes, so the first stream is 0x1bd,0x80 and second one is 0x1bd,0x81

-- 
Regards,

Jai



More information about the ffmpeg-devel mailing list