I am trying create a video by concatenating in this order:
video1.mp4 & video_from_static_image.mp4 & video1.mp4
video1.mp4 is a simple video file. video_from_static_image.mp4 was created from the a.png image like this:
ffmpeg -y -framerate 25 -f image2 -loop 1 -i a.png -c:v libx264 -profile:v main -pix_fmt yuv420p -t 2 -r 25 video_from_static_image.mp4
I create the final concatenated file through this command:
ffmpeg -y -f concat -safe 0 -i mylist.txt -c copy final_concat.mp4
I get the following message during the concat process:
[mp4 @ 0x7fee6b815e00] Non-monotonous DTS in output stream 0:0; previous: 120678, current: 65722; changing to 120679. This may result in incorrect timestamps in the output file.
The complete output when running the above command is here
When I play final_concat.mp4 it has problems with video_from_static_image.mp4 and it seems to skip it (and other variations resulted in playing for a short while). I've tried a bunch of things, but I believe they all point to the DTS error above.
BTW, all the video files are pretty small (< 1MB). Here are details about the version I am using:
$ ffmpeg -version
ffmpeg version 3.3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.31)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100