I need to concatenate several mp4 files that were taken with a cell phone, where some of them are landscape and others portrait. By simply concatenate them, the ones that are portrait end up rotated by 90 degrees in the final output.
To solve this problem, I decided to rotate the portrait ones one by one before concatenating them. However, when I concatenate landscape together with rotated portrait, I get the following error messages: [mov,mp4,m4a,3gp,3g2,mj2 @ 000001b2922b0fc0] Auto-inserting h264_mp4toannexb bitstream filter [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 824975, current: 140284; changing to 824976. This may result in incorrect timestamps in the output file. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 824976, current: 140796; changing to 824977. This may result in incorrect timestamps in the output file. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 824977, current: 141308; changing to 824978. This may result in incorrect timestamps in the output file. .....hundreds more like this. In addition, when I watch the video, the portrait one seems to be static on one of the first frames. This frame is shown for the duration of the video. Why is this happening and how can I fix it? This is my output: D:\99_FFMpeg>D:\01_Apl\ffmpeg_2024\bin\ffmpeg -y -f concat -safe 0 -i merge_list.txt -c copy merged.mp4 ffmpeg version 2024-05-23-git-ece95dc3dc-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers built with gcc 13.2.0 (Rev5, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 59. 19.100 / 59. 19.100 libavcodec 61. 5.104 / 61. 5.104 libavformat 61. 3.103 / 61. 3.103 libavdevice 61. 2.100 / 61. 2.100 libavfilter 10. 2.102 / 10. 2.102 libswscale 8. 2.100 / 8. 2.100 libswresample 5. 2.100 / 5. 2.100 libpostproc 58. 2.100 / 58. 2.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 000001b2922910c0] Auto-inserting h264_mp4toannexb bitstream filter Input #0, concat, from 'merge_list.txt': Duration: N/A, start: 0.000000, bitrate: 17345 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 17088 kb/s, 30 fps, 30 tbr, 90k tbn Metadata: creation_time : 2024-05-23T13:02:03.000000Z handler_name : VideoHandle vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s Metadata: creation_time : 2024-05-23T13:02:03.000000Z handler_name : SoundHandle vendor_id : [0][0][0][0] Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Output #0, mp4, to 'merged.mp4': Metadata: encoder : Lavf61.3.103 Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, q=2-31, 17088 kb/s, 30 fps, 30 tbr, 90k tbn Metadata: creation_time : 2024-05-23T13:02:03.000000Z handler_name : VideoHandle vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s Metadata: creation_time : 2024-05-23T13:02:03.000000Z handler_name : SoundHandle vendor_id : [0][0][0][0] Press [q] to stop, [?] for help [mov,mp4,m4a,3gp,3g2,mj2 @ 000001b2922b0fc0] Auto-inserting h264_mp4toannexb bitstream filter [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 824975, current: 140284; changing to 824976. This may result in incorrect timestamps in the output file. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 824976, current: 140796; changing to 824977. This may result in incorrect timestamps in the output file. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 824977, current: 141308; changing to 824978. This may result in incorrect timestamps in the output file. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 824978, current: 141820; changing to 824979. This may result in incorrect timestamps in the output file. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 824979, current: 142332; changing to 824980. This may result in incorrect timestamps in the output file. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 824980, current: 142844; changing to 824981. This may result in incorrect timestamps in the output file. .I removed hundreds of similar messages to reduce the size of this email. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 825241, current: 276476; changing to 825242. This may result in incorrect timestamps in the output file. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 825242, current: 276988; changing to 825243. This may result in incorrect timestamps in the output file. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 825243, current: 277500; changing to 825244. This may result in incorrect timestamps in the output file. [vost#0:0/copy @ 000001b292c6d1c0] Non-monotonic DTS; previous: 825244, current: 278012; changing to 825245. This may result in incorrect timestamps in the output file. [out#0/mp4 @ 000001b292276940] video:21041KiB audio:430KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.058467% size= 21484KiB time=00:00:03.09 bitrate=56870.0kbits/s speed=1.53x _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".