[FFmpeg-user] cancenate mp4 video problem

ludolf at email.cz ludolf at email.cz
Sun Dec 21 09:41:05 CET 2014


I tried to cancenate two mp4 files from YouTube. The "Demuxer" method
(ffmpeg -f concat -i mylist.txt -c copy output) lead to wrong video at the 
second part
(all-time squares, noncontinuity) without any warning. The "Protocol" method:

ffmpeg -i 1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts 1.ts
ffmpeg -i 2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts 2.ts
ffmpeg -i "concat:1.ts|2.ts" -c copy -bsf:a aac_adtstoasc 1-2p.mp4

lead to 4 warnings "Non-monotonous DTS in output stream". The
resulting video seems to by OK in Avidemux or KMPlayer but not
in Firefox - there are short-time problems (squares, noncontinuity)
at the second part every couple od seconds (looks at I-frames).

Any hint how to solve the problem (e.g., to repair the non-monotonous DTS)?
Files can be found on http://webshare.cz/group/1vj5Be2GJ8/.

ludolf


More information about the ffmpeg-user mailing list