I'm concatenating mp3 files into a single m4a.
To save time, I'm doing the mp3 to m4a conversion first (multi-threaded) and then concatenating the output files (m4a) into a single m4a file.
The concat works when I do the conversion (mp3 -> m4a) and cancat in one swoop. But it takes forever to run.
Example:
ffmpeg -i "concat:001.mp3|002.mp3|003.mp3" -codec:a aac -c copy output.m4a
If I take those same mp3 files and convert them to m4a in parallel and then concat, I can save myself a significant amount time.
The problem is if I run the concat command on the converted m4a files
Example cmd :
ffmpeg -i "concat:001.m4a|002.m4a|003.m4a" -c copy output.m4a
I getting the following error:
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000052f680] Found duplicated MOOV Atom. Skipped it
UPDATE: Ouput when concatenating m4a files (two track example):
C:\_ffmpeg>ffmpeg -i "concat:001.m4a|002.m4a" -c copy output.m4a
ffmpeg version N-79630-g9ac154d Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enabl
e-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable
-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --ena
ble-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx
264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable
-lzma --enable-decklink --enable-zlib
libavutil 55. 22.101 / 55. 22.101
libavcodec 57. 38.100 / 57. 38.100
libavformat 57. 34.103 / 57. 34.103
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 44.100 / 6. 44.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000048a9a0] Found duplicated MOOV Atom. Skipped
it
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:001.m4a|002.m4a':
Metadata:
track : 1
major_brand : M4A
minor_version : 512
title : 001 Moon Over Soho
artist : Ben Aaronovitch
album_artist : Narrated by Kobna Holdbrook-Smith
composer : Narrated by Kobna Holdbrook-Smith
album : Moon Over Soho
date : 2012
encoder : Lavf57.34.103
genre : Speech
copyright : Tantor Audio
compatible_brands: isomiso2
Duration: 00:44:03.83, start: 0.000000, bitrate: 251 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, flt
p, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
[ipod @ 000000000048bb20] Using AVStream.codec to pass codec parameters to muxer
s is deprecated, use AVStream.codecpar instead.
Output #0, ipod, to 'output.m4a':
Metadata:
track : 1
major_brand : M4A
minor_version : 512
title : 001 Moon Over Soho
artist : Ben Aaronovitch
album_artist : Narrated by Kobna Holdbrook-Smith
composer : Narrated by Kobna Holdbrook-Smith
album : Moon Over Soho
date : 2012
compatible_brands: isomiso2
genre : Speech
copyright : Tantor Audio
encoder : Lavf57.34.103
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, 128
kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 41892kB time=00:44:03.80 bitrate= 129.8kbits/s speed=2.21e+003x
video:0kB audio:41445kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 1.077122%
C:\_ffmpeg>pause
Press any key to continue . . .
It looks like, for whatever reason, if you try to join multiple .mp4 files, this error will occur. I found a workaround in that I was able to add a different extension in the intermediate version of the files (I was copying a large group of files and chunking them into a smaller group and then finally combining the chunked group into a final output). I used a .ts
extension on the intermediate files and then the final output is a .mp4
format.
That seems to have avoided the error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With