ffmpeg -concat slowing down AAC audio files

0

I am concatenating six m4a files with this command

ffmpeg -f concat -i audiofiles.txt -c copy all_audio_edited.m4a

each file has a duration of 4 hours (24 in total) but the concatenation doesn't work quite well: the first part of the file (the first m4a) is perfect, but all the others are slowed down, so the final duration is >26 hours

What's wrong?

Thanks

Marcs-MacBook-Pro:Sof marc$ ffmpeg -report -f concat -i audiofiles.txt -c copy all_audio_edited.m4a
ffmpeg started on 2014-08-28 at 23:35:06
Report written to "ffmpeg-20140828-233506.log"
ffmpeg version 2.3 Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 26 2014 17:59:15 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-aacenc --enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-openssl --enable-libopus --enable-frei0r --enable-libcaca --enable-libquvi --enable-libvidstab --enable-libx265 --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1_1/include/openjpeg-1.5 '
  libavutil      52. 92.100 / 52. 92.100
  libavcodec     55. 69.100 / 55. 69.100
  libavformat    55. 48.100 / 55. 48.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 11.100 /  4. 11.100
  libavresample   1.  3.  0 /  1.  3.  0
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
[concat @ 0x7fcb6c803400] Estimating duration from bitrate, this may be inaccurate
Input #0, concat, from 'audiofiles.txt':
  Duration: 00:00:00.00, start: 0.000000, bitrate: 279 kb/s
    Stream #0:0: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 280 kb/s
Output #0, ipod, to 'all_audio_edited.m4a':
  Metadata:
    encoder         : Lavf55.48.100
    Stream #0:0: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 280 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 3020597kB time=26:07:14.44 bitrate= 263.1kbits/s    
video:0kB audio:3004946kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.520849%

Marc

Posted 2014-08-29T15:24:06.710

Reputation: 101

First, 6x6=36, do you mean 6x4=24? Second, verify the duration of the smaller files (and the larger). Ffmpeg sometimes reports just an estimated duration based on bitrate so that means you'll likely want to use ffprobe for that one.

The short of it may be nothing is wrong. – dstob – 2014-08-29T19:15:05.397

Yes, 6 videos, 4 hours each one. I edited the question to correct it. Ffprobe reports the right time, 04:00:00.00. When I play all files independently, they sound perfect, but when I play the concatenated one, everything after the first 04:00:00.00 sounds like it has been slowed down. – Marc – 2014-08-30T11:31:55.870

1Can you show the output from: ffmpeg -i input1 -i input2 -i input3 -i input4 -i input5 -i input6? – llogan – 2014-09-01T22:48:48.367

No answers