[Ffmpeg-devel] [BUG] problem ts demuxer h264 bbc
Måns Rullgård
mru
Thu Nov 16 21:11:16 CET 2006
Nico Sabbi <nicola_sabbi at fastwebnet.it> writes:
> M?ns Rullg?rd wrote:
>
>>Baptiste Coudurier <baptiste.coudurier at smartjog.com> writes:
>>
>>
>>>It works fine with mplayer with native ts demuxer though. When using
>>>-demuxer lavf, error appears again.
>>>
>>>
>>
>>That file is very badly broken. What is labeled as an H.264 stream is
>>really an MPEG2 video stream and an H.264 stream interleaved.
>>
>>
>
> ??
> $ decode_pat bbc-hd-test-mux.mpg
> libdvbpsi error (PSI decoder): TS discontinuity (received 1, expected
> 0) for PID 0
>
> New PAT
> transport_stream_id : 1
> version_number : 1
> | program_number @ [NIT|PMT]_PID
> | 1 @ 0x258 (600)
> active : 1
>
> $ decode_pmt bbc-hd-test-mux.mpg 1 600
> libdvbpsi error (PSI decoder): TS discontinuity (received 1, expected
> 0) for PID 600
>
> New active PMT
> program_number : 1
> version_number : 1
> PCR_PID : 0x5de (1502)
> | type @ elementary_PID
> | 0x1b (ISO/IEC 13818-1 reserved) @ 0x5de (1502)
Looks like decode_pmt needs an update to learn what stream type 0x1b is.
> | ] 0x52 : Component tag: 11
> | 0x81 (User Private) @ 0x5e1 (1505)
> | ] 0x0a : "eng"
> | ] 0x6a : ""
> | ] 0x52 : Component tag: 8
>
> where do you see the mpeg2 video stream?
As I said, the PMT indicates an H.264 stream. Extract this elementary
stream and feed it to an MPEG2 video parser:
sequence_header b3
horizontal_size_value 2d0 720
vertical_size_value 240 576
aspect_ratio_information 3 DAR=16/9
frame_rate_code 3 25 fps
bit_rate_value 4e20 20000
marker_bit 1
vbv_buffer_size_value 70 112
constrained_parameters_flag 0
load_intra_quantiser_matrix 0
load_non_intra_quantiser_matrix 0
extension_start_code b5
sequence_extension 1
profile_and_level_indication 48 Main profile @ Main level
progressive_sequence 1
chroma_format 1 4:2:0
horizontal_size_extension 0
vertical_size_extension 0
bit_rate_extension 0
marker_bit 1
vbv_buffer_size_extension 0
low_delay 0
frame_rate_extension_n 0
frame_rate_extension_d 0
extension_start_code b5
sequence_display_extension 2
video_format 1 PAL
colour_description 1
colour_primaries 5 ITU-R BT.470-2 System B,G
transfer_characteristics 5 ITU-R BT.470-2 System B,G
matrix_coefficients 5 ITU-R BT.470-2 System B,G
display_horizontal_size 2d0 720
marker_bit 1
display_vertical_size 240 576
group_of_pictures_header b8
time_code 0
drop_frame_flag 0
time_code_hours 0
time_code_minutes 0
marker_bit 1
time_code_seconds 0
time_code_pictures 0
closed_gop 1
broken_link 0
picture_header 0
temporal_reference 0
picture_coding_type 1 I
vbv_delay ffff
extra_bit_picture 0
extension_start_code b5
picture_coding_extension 8
f_code[0][0] f
f_code[0][1] f
f_code[1][0] f
f_code[1][1] f
intra_dc_precision 1 9 bits
picture_structure 3 Frame picture
top_field_first 0
frame_pred_frame_dct 1
concealment_motion_vectors 0
q_scale_type 1
intra_vlc_format 1
alternate_scan 1
repeat_first_field 0
chroma_420_type 1
progressive_frame 1
composite_display_flag 0
slice 1
slice 61
slice 3
slice 4
This looks like a perfectly normal MPEG2 video stream, except for that
0x61 slice start code, which is not allowed there. 0x61 is however
the "start code" for an H.264 NAL unit of a non-IDR slice. Skipping
to byte 0x8e7ab, we encounter this byte sequence (no H.264 parser to
hand):
0008e7a0 08 30 16 5b 02 00 00 00 01 09 10 00 00 00 01 67
0008e7b0 64 40 28 ac 53 b0 16 81 13 61 62 00 00 03 00 02
0008e7c0 00 00 03 00 65 28 00 00 00 01 68 fe 3c b0 00 00
0008e7d0 00 01 06 01 01 32 06 01 84 80 00 00 00 01 61 be
This is a perfectly valid H.264 SPS NAL unit, followed by PPS and SEI.
Convinced?
--
M?ns Rullg?rd
mru at inprovide.com
More information about the ffmpeg-devel
mailing list