[FFmpeg-user] ffmpeg and monotonically increasing DTS

Pushkar Pradhan pradhan.pushkar at gmail.com
Sat Aug 10 02:14:51 CEST 2013


I have a mp4 where some of the video frames have the same DTS/PTS and
ffmpeg refuses to copy it when I try to extract the first few seconds:
$ ffmpeg -i full_file.mp4  -vcodec copy -acodec copy -t 45 short_45s.mp4
ffmpeg version git-2012-04-04-41a097a Copyright (c) 2000-2012 the FFmpeg
developers
  built on Apr  3 2012 18:08:31 with gcc 4.4.3
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-nonfree --enable-version3
--enable-x11grab --enable-libvpx
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'full_file.mp4':
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
[mp4 @ 0x24b98a0] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 119974 >= 119974
av_interleaved_write_frame(): Invalid argument

However, when I take out the -acodec copy and -vcodec copy, i.e. when
ffmpeg reencodes it, it does not abort.

So my question is: Is it invalid according to the MP4 spec to have frames
with the same DTS/PTS for a video track?
The error definitely makes sense.
Thanks,

-- 
pushkar


More information about the ffmpeg-user mailing list