Log in

View Full Version : Batch downmix AAC 5.1 to AAC 2.0


brunosso
27th January 2016, 18:39
Hi guys! I have this AAC audio file, and i want to downmix to 2.0 AAC.. how can i do in batch mode?

This is the Mediainfo report, i don't undertand why i have 2/6/6 channel!!! ?!?!

General
Complete name : D:\MUX\Audio01.aac
Format : ADTS
Format/Info : Audio Data Transport Stream
File size : 94.7 MiB
Overall bit rate mode : Variable

Audio
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : HE-AACv2 / HE-AAC / LC
Bit rate mode : Variable
Channel(s) : 2 channels / 6 channels / 6 channels
Channel positions : Front: L R / Front: L C R, Side: L R, LFE / Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz / 48.0 KHz / 24.0 KHz
Frame rate : 23.438 fps (1024 spf)
Compression mode : Lossy
Stream size : 94.7 MiB (100%)


I try with a bat file that do this command:

ffmpeg -i "%%f" -c:a libfdk_aac -b:a 96k -ac 2 "%%~nf.wav"

but i have this error! ... is it normal??

ffmpeg version N-77792-g5908638 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/brunosso/ffmpeg_build/sandbox/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --pkg-config=pkg-
config --disable-w32threads --enable-gpl --enable-libsoxr --enable-fontconfig --enable-libass --enable-libutvideo --enable-libbluray --enable-iconv --enable-lib
twolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpng --enable-libvidstab --
enable-libx265 --enable-decklink --extra-libs=-loleaut32 --enable-libx264 --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp
--enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus --enable-frei
0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --
enable-libschroedinger --enable-libvpx --enable-libilbc --enable-libwavpack --enable-libwebp --enable-libgme --enable-dxva2 --enable-libdcadec --enable-avisynth
--enable-gray --extra-libs=-lpsapi --extra-cflags= --enable-static --disable-shared --prefix=/home/brunosso/ffmpeg_build/sandbox/mingw-w64-x86_64/x86_64-w64-mi
ngw32 --enable-nonfree --enable-libfdk-aac --disable-libfaac --enable-nvenc --enable-runtime-cpudetect
libavutil 55. 13.100 / 55. 13.100
libavcodec 57. 22.100 / 57. 22.100
libavformat 57. 21.101 / 57. 21.101
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 23.100 / 6. 23.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[aac @ 00000169cc5ec700] element type mismatch 3 != 0
[aac @ 00000169cc5ec700] element type mismatch 1 != 0
Last message repeated 1 times
[aac @ 00000169cc5dada0] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'Audio01.aac':
Duration: 00:56:50.86, bitrate: 232 kb/s
Stream #0:0: Audio: aac (HE-AAC), 48000 Hz, 5.1, fltp, 232 kb/s
Output #0, wav, to 'Audio01.wav':
Metadata:
ISFT : Lavf57.21.101
Stream #0:0: Audio: aac (libfdk_aac) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, s16, 96 kb/s
Metadata:
encoder : Lavc57.22.100 libfdk_aac
Stream mapping:
Stream #0:0 -> #0:0 (aac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[aac @ 00000169ce471fc0] element type mismatch 3 != 0
[aac @ 00000169ce471fc0] element type mismatch 1 != 0
Last message repeated 1 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0
[aac @ 00000169ce471fc0] element type mismatch 1 != 0
Last message repeated 1 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0
[aac @ 00000169ce471fc0] element type mismatch 1 != 0
Last message repeated 1 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0
[aac @ 00000169ce471fc0] element type mismatch 1 != 0
Last message repeated 1 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0
[aac @ 00000169ce471fc0] element type mismatch 1 != 0
Last message repeated 1 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0
[aac @ 00000169ce471fc0] element type mismatch 1 != 0
Last message repeated 1 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0
[aac @ 00000169ce471fc0] element type mismatch 1 != 0
Last message repeated 1 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0
[aac @ 00000169ce471fc0] element type mismatch 1 != 0
Last message repeated 1 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0
Last message repeated 102 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0s speed=9.39x
Last message repeated 111 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0s speed=9.46x
Last message repeated 113 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0s speed=9.54x
Last message repeated 116 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0s speed=9.64x
Last message repeated 109 times
[aac @ 00000169ce471fc0] element type mismatch 3 != 0s speed=9.58x
Last message repeated 23 times
size= 295kB time=00:00:25.08 bitrate= 96.4kbits/s speed=9.56x
video:0kB audio:295kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.030770%
Exiting normally, received signal 2.
Terminare il processo batch (S/N)?

kuchikirukia
28th January 2016, 01:30
Well this is going to be informative thread since I've never seen anything like that mediainfo before.

What does it show when you throw it in Audacity?

tebasuna51
28th January 2016, 07:04
Yep, is not a normal AAC. Seems a mix of different AAC streams.

The HE-AACv2 can't have 6 channels, is a mono channel with extra info (Parametric Stereo) to obtain 2.0
https://en.wikipedia.org/wiki/High-Efficiency_Advanced_Audio_Coding

I don't know if there are a decoder than can preserve the 2.0 parts and downmix the 5.1 parts on the fly.
The decoders must be initialized each time than change some important parameter, like the channel number.

brunosso
28th January 2016, 09:15
Well this is going to be informative thread since I've never seen anything like that mediainfo before.

What does it show when you throw it in Audacity?

http://s15.postimg.org/a97uvhrnr/Immagine.jpg (http://postimg.org/image/a97uvhrnr/)

this is what i see in audacity! One channel is completely mute!!!

pandy
29th January 2016, 15:00
ffmpeg should be capable to do this things - from some time decoder is able to follow changes in stream (common in satellite).

I would try something like this:

-c:a aac -strict experimental -b:a 128k -af "pan=stereo|FL < FL + 1.414FC + .5BL + .5SL + 0.25LFE|FR < FR + 1.414FC + .5BR + .5SR + 0.25LFE,aresample=resampler=soxr:osr=48000:dither_method=0"

brunosso
29th January 2016, 16:57
ffmpeg should be capable to do this things - from some time decoder is able to follow changes in stream (common in satellite).

I would try something like this:

-c:a aac -strict experimental -b:a 128k -af "pan=stereo|FL < FL + 1.414FC + .5BL + .5SL + 0.25LFE|FR < FR + 1.414FC + .5BR + .5SR + 0.25LFE,aresample=resampler=soxr:osr=48000:dither_method=0"

Thanks for the reply, but i have the same output from ffmpeg... I try to find other sources from this file audio, and trash this shi*!

pandy
1st February 2016, 10:50
Perhaps this is LFE and LFE content is empty? Happen sometimes...