[FFmpeg-devel] rtpdec_h264.c RTP to annex-b patch

Michael Niedermayer michaelni at gmx.at
Wed Feb 1 20:38:06 CET 2012


On Wed, Feb 01, 2012 at 09:28:25PM +0200, Martin Storsjö wrote:
> On Wed, 1 Feb 2012, Matthew Szatmary wrote:
> 
> >using -vcodec copy I tried outputting as mp4, mkv, fly and mpegts
> >(with and without -bsf h264_mp4toannexb). None of them worked
> >before this patch. They all work after this patch is applied
> 
> Which errors did you get when they didn't work?
> 
> The h264_mp4toannexb bsf isn't exactly what's needed in this case -
> the data is in annex b format already, but with SPS/PPS as extradata
> instead of inline in the stream. (This is exactly the same format as
> libx264 outputs if encoding for mp4 files, when the global header
> flag is set, FWIW.) Not sure if there currently is any bitstream
> filter to do exactly this conversion (removing extradata and
> embedding it into the stream) though.

dump_extra maybe

but in how far that would produce valid annex b iam not sure.
Our decoder will handle it of course but that doesnt mean its compliant
to the spec.


[...]
> Currently, the rtp depacketizer sets timestamps for all packets, but
> it seems that the h264 parser clears this from the first frame, so
> that it has dts=pts=N/A.

that sounds like a bug


> With the current code, this frame has
> keyframe=1 set, and the mkv muxer will fail to write it with "Can't
> write packet with unknown timestamp". With your patch applied, this
> frame is marked as keyframe=0 by the parser, and ffmpeg.c won't

Is it or is it not a keyframe ?
either way this too sounds like theres a bug somewhere


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120201/24ce43d6/attachment.asc>


More information about the ffmpeg-devel mailing list