Ffmpeg 2.4.2 mp4 concatenation files

I am trying to merge some mp4 files one by one. I am doing the following:

ffmpeg -i concat:1.mp4\|2.mp4\|3.mp4\|4.mp4 -c copy final_output.mp4 

But always get the message "[mov, mp4, m4a, 3gp, 3g2, mj2 @ 0x148d420] Duplicate MOOV Atom found. Skipped it

Here is the result:

  ffmpeg version 2.4.2 Copyright (c) 2000-2014 the FFmpeg developers built on Oct 6 2014 17:33:05 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1) configuration: --prefix=/opt/ffmpeg --libdir=/opt/ffmpeg/lib/ --enable-shared --enable-avresample --disable-stripping --enable-gpl --enable-version3 --enable-runtime-cpudetect --build-suffix=.ffmpeg --enable-postproc --enable-x11grab --enable-libcdio --enable-vaapi --enable-vdpau --enable-bzlib --enable-gnutls --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libfaac --enable-libvo-aacenc --enable-nonfree --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfdk_aac --enable-libopus --enable-pthreads --enable-zlib --enable-libvpx --enable-libfreetype --enable-libpulse --enable-debug=3 libavutil 54. 7.100 / 54. 7.100 libavcodec 56. 1.100 / 56. 1.100 libavformat 56. 4.101 / 56. 4.101 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 1.100 / 5. 1.100 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 0.100 / 53. 0.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x148d420] Found duplicated MOOV Atom. Skipped it Last message repeated 2 times Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:1.mp4|2.mp4|3.mp4|4.mp4': Metadata: encoder : Lavf56.4.101 major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 Duration: 00:00:10.00, start: 0.000000, bitrate: 741 kb/s Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p, 640x480, 177 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default) Metadata: handler_name : VideoHandler Output #0, mp4, to 'final_output.mp4': Metadata: compatible_brands: isomiso2avc1mp41 major_brand : isom minor_version : 512 encoder : Lavf56.4.101 Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv422p, 640x480, q=2-31, 177 kb/s, 30 fps, 15360 tbn, 15360 tbc (default) Metadata: handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame= 300 fps=0.0 q=-1.0 Lsize= 221kB time=00:00:09.90 bitrate= 183.0kbits/s video:217kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.995090% 

As a result, I have an output file that contains only 1.mp4.

I heard that mp4 cannot be concatenated without re-encoding. But actually I have this problem (duplicate MOOV Atom found) for any format I tried (ts, mpg, etc.).

Please let me know what is wrong here. Because it seems that I have the same problem as I do.

Thanks in advance.

+6
source share
2 answers

The answer is correct, but not complete. The solution is to use a concat script that looks like you. "Ffmpeg-sound.txt" in your answer will look something like this:

 file 1.mp4 file 2.mp4 file 3.mp4 file 4.mp4 

With this file, you provide its ffmpeg as input using the concat format:

 ffmpeg -f concat -i ffmpeg-sound.txt -c copy final_output.mp4 

Thank you for submitting your solution. Hope this clarification of the input file format will help the next person.

+3
source

I found a solution that works for me:

 ffmpeg -f concat -i ffmpeg-sound.txt -c copy output-sound.mp4 

It is rather strange why others did not work, because it seems to me that this is almost the same.

+1
source

Source: https://habr.com/ru/post/976443/


All Articles