[FFmpeg-devel] [RFC] mpegts demuxer: fix timestamps wrapped around 33 bits

Andrey Utkin andrey.krieger.utkin at gmail.com
Fri Aug 17 21:19:40 CEST 2012

Digging the issue i found a code that someway manages timestamps
wrapping in libavformat/utils.c. Although I didn't understand what
exactly that code intends to do.

I tried to generate large enough file to check how ffmpeg handles it.
ffmpeg -f lavfi -i testsrc=size=16x16:rate=0.0001 -c:v libx264 -t
100000 -f mpegts -y /tmp/tmp.ts -loglevel debug -dump
ffmpeg -i /tmp/tmp.ts -c copy -copyts -f mpegts -y /dev/null -loglevel
debug -dump
The second command results with error as i expected:
[mpegts @ 0x1dec510] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 8588160000 >= -1414592
av_interleaved_write_frame(): Invalid argument

Andrey Utkin

More information about the ffmpeg-devel mailing list