[FFmpeg-user] Fix .mp4 file with error: channel element 1.0 is not allocated

Tom Worster fsb at thefsb.org
Thu Nov 19 03:28:14 EET 2020


On 11/18/2020 6:59:38 PM, "Tom Worster" <fsb at thefsb.org> wrote:

>How can I repair a file with an error like this?
>
>     [aac @ 0x5d738c0] channel element 1.0 is not allocated
>
>Instead of what you see below, the file should have, i think
>
>     Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp,
>
>% ~/ffmpeg-git-20201020-amd64-static/ffprobe -i WOWD-20201116T210000Z.m4a
>ffprobe version N-54690-g682990a849-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2020 the FFmpeg developers
>   built with gcc 8 (Debian 8.3.0-6)
>   configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
>   libavutil      56. 60.100 / 56. 60.100
>   libavcodec     58.111.101 / 58.111.101
>   libavformat    58. 62.100 / 58. 62.100
>   libavdevice    58. 11.102 / 58. 11.102
>   libavfilter     7. 88.100 /  7. 88.100
>   libswscale      5.  8.100 /  5.  8.100
>   libswresample   3.  8.100 /  3.  8.100
>   libpostproc    55.  8.100 / 55.  8.100
>[aac @ 0x5d738c0] channel element 1.0 is not allocated
>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'WOWD-20201116T210000Z.m4a':
>   Metadata:
>     major_brand     : M4A
>     minor_version   : 512
>     compatible_brands: M4A isomiso2
>     encoder         : Lavf58.45.100
>   Duration: 00:04:59.45, start: 38994.477007, bitrate: 126 kb/s
>     Stream #0:0(und): Audio: aac (LTP) (mp4a / 0x6134706D), 7350 Hz, 5.0, fltp, 125 kb/s (default)
>     Metadata:
>       handler_name    : SoundHandler
>
>I've had no luck so far reproducing the error that created files like these. If that's important, lemmy know I'll keep trying.
>

I may have found a fix.

ffmpeg -i broken.m4a -af "channelmap=0|1:stereo" better.m4a

The channelmap spec was a guess but the file plays and the ffprobe looks 
reasonable so I guess that's enough.

Tom



More information about the ffmpeg-user mailing list