[FFmpeg-devel] RTP hint track with h264 encoded with b-frames

Anders Rein ARein at vizrt.com
Fri Jun 21 18:17:32 CEST 2013

When calculating RTP timestamp for RTP hint track (isom formats), ffmpeg uses the pts of the packet to calculate the timestamp. The dts for the RTP packet is then set to the pts of the RTP packet.

Now, if the video is encoded with b-frames, the pts is not always increasing. Since ffmpeg uses the pts as dts for the RTP packets, the delta dts becomes negative between some of the packets. This causes the mov muxer to write a negative entry to the stts box.

This again causes ffmpeg to complain about illegal STTS entry when demuxing the file again.

This can't be correct behaviour right?

More information about the ffmpeg-devel mailing list