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

Martin Storsjö martin at martin.st
Wed Feb 1 09:57:46 CET 2012


On Wed, 1 Feb 2012, Michael Niedermayer wrote:

> On Tue, Jan 31, 2012 at 09:53:12PM -0500, Matthew Szatmary wrote:
>> Excuse me if i'm missing something, This is my first time submitting a patch to this group.
>> This patch formats h264 RTP streams as annex-b format. This allows for transmuxing without transcoding (e.g "-vcodec copy") RTP and RTSP streams.
>
> Do we have a maintainer for this file, or volunteer to become
> maintainer ?
>
> about the patch, if the output isnt compliant to either of the
> formats then yes it should be fixed.
> note, tabs are forbiden in ffmpeg git

FWIW, to me, it seems that the code already produces data in annex b 
format (with 3 byte startcodes, which should be legal, right?). This patch 
changes things so that SPS/PPS aren't exported via extradata as earlier, 
but are prepended to packets with nal type 5.

If this is required for stream copy to some certain format, it's probably 
better to do it either via a bitstream filter, or to make the target muxer 
accept this format as input. Since if this currently fixes one format, it 
will probably just as well break some other format which expects this 
format.

Also, I much prefer having the SPS/PPS out of band if they actually are 
transmitted in that format (as they are, in RTP) than mixed into the 
stream.

// Martin


More information about the ffmpeg-devel mailing list