I'm trying to recode the 384kbs AC3 6 channel in an MP4 file down to 128kbs AAC. I get an error message when I try to save it. Cannot setup audio encoder, make sure your stream is compatable with audio encoder (number of channels, bitrate, format). It recodes when using AAC (FAAC) but the audio part of the MP4 file is the same large size wheather I set it at 384kbs or 128kbs. Is it Avidemux or do I have something else in the system messed up (FFD Show setting).
Avidemux menu: Audio: Select track:
AC3 track: change [copy] to [AAC (lav)]
then in same pop-up window:
[Filters] -> Audio Filters window
Mixer [v] Remix
Mixer: Stereo
Quote from: EEMcGee on September 10, 2016, 07:57:38 AM
I'm trying to recode the 384kbs AC3 6 channel in an MP4 file down to 128kbs AAC. I get an error message when I try to save it. Cannot setup audio encoder, make sure your stream is compatable with audio encoder (number of channels, bitrate, format).
IMHO, it is worth trying again: [Lav/AAC/Encoder] Bump max number of channels to 6 (https://github.com/mean00/avidemux2/commit/b464a481b3f88293f4a84cd361495898f753c2c9). If you don't build Avidemux yourself, you will have to wait till the next nightly build is out.
Thanks I will try that.
I might revert it, the channel mapping is probably incorrect
you got PM regarding AC3, just in case.
Thanks, but it's about the encoder setup
The decoder is already ok
probably you already have this: https://www.ffmpeg.org/ffmpeg-codecs.html#ac3-and-ac3_005ffixed
Quote from: Jan Gruuthuse on September 10, 2016, 02:44:10 PM
probably you already have this: https://www.ffmpeg.org/ffmpeg-codecs.html#ac3-and-ac3_005ffixed
This topic is about
aac encoder. Not ac3.
To long behind the screen: bundled info https://en.wikipedia.org/wiki/Advanced_Audio_Coding#Container_formats
As you wrote 4 years ago in http://avidemux.org/smif/index.php/topic,10957.msg58738.html#msg58738 (http://avidemux.org/smif/index.php/topic,10957.msg58738.html#msg58738), the default channel mapping for 5.1 channel audio differs between AC3 and AAC. I haven't checked if the Lavcodec AAC encoder in Avidemux, since a few hours capable of encoding 6 channels, correctly remaps the channels when using 5.1 channel AC3 audio as input. This is the problem Mean is speaking about.
did forget about that.
perhaps something useful in here https://trac.ffmpeg.org/wiki/AudioChannelManipulation
It looks ok, but i'm not 100 % sure
I think it is really OK. I reencoded the audio using ffmpeg
ffmpeg -i ChID-BLITS-EBU.mp4 -c:v copy -c:a ac3 ChID-BLITS-EBU-ffmpeg-ac3-reenc.mp4
confirmed with mplayer that channels are mapped correctly, loaded the new mp4 file in Avidemux and reencoded the audio as 5.1 AAC. The resulting video plays in mplayer still with correct mapping.
I didn't realize the options were in the select track menu option. I just set tjhe mode from copy to AAC lav and set the bit rate out in the main window. That's when it gave me the problem.
If you have more than one audio track then you have to pick one you'd like to encode unless you use copy and the target container supports multiple audio tracks. If your source mp4 file contains only a single 5.1 channel ac3 audio track alongside video, there is no point in selecting a track ;)
Prior to the aforementioned git commit you had to downmix to stereo as all the AAC encoder in Avidemux supported was 2ch audio. Now it can encode 6ch as well and the chances are good that the channel mapping is correct.