[vlc-devel] rtp/h264 issue

An L. Ber madrat at hotbox.ru
Wed Apr 21 19:18:55 CEST 2010


Hello, Developers!

I've faced the issue with h264: When I transcode by VLC into h264 video
and transmits by rtp the generated sdp file crashes many video players
(and vlc client also).

I work with x264-snapshot-20100414-2245/vlc-1.2-snapshot-20100415, but
last snapshot of VLC (2010-04-21) also not ready for this issue.

Behaviour: in SDP for H264 the parameter 'sprop-parameter-sets' used for
storing special blocks and have illegal long form (about 600 bytes
instead 64) and it crashes players.

Reason: This sprop-parameter-sets stores NALs what are required for
starting decode process and not chaging offten. This information
generated by libx264/x264_encoder_headers and stored into
extra-information for encoder in vlc/modules/codec/x264.c and transforms
into 'sprop-parameter-sets' field in vlc/modules/stream_out/rtp.c.

In previous versions of libx264 (git-snapshot 20100218) the
x264_encoder_headers generates SEI/SPS/PPS with NAL unit separator "00
00 00 01", but new version stores the SEI block with short version "00
00 01". This short start code can not be detected by rtp.c module and
PPS and SEI blocks are stored as one item (with invalid data and very
long length).

Because the short version is valid for SEI block i've added to rtp.c
feature to detect it: "The start sequence is some zeros (atleast 2) and
01" (because more than 3 zeros is also valid)

Best regards, An




-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vlc-1.2.0.rtp_h264_startcode.patch
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100421/26f5b2b9/attachment.ksh>


More information about the vlc-devel mailing list