News:

--

Main Menu

Adding External AC3 6 Channel Audio

Started by jimmy, May 10, 2024, 06:27:43 PM

Previous topic - Next topic

jimmy

Adding an external AC3 6 channel to a project, this has happened several times:

1) open project and save in copy mode 6 channel AC3 audio
2) execute some edits to the video
3) add back in the external, unmolested 6 channel AC3 audio
4) encode both audio and video

The audio becomes muffled, skewed to the right channels.
Encoding the original internal track is fine. The problem is only with adding the external track.

Workaround, use mkvtoolnix, remux the encoded video with the original source file, then encode the audio in avidemux and the result is fine.

Audio samples attached.

https://we.tl/t-vrNluaaFIl

eumagga0x2a

For some reason WeTransfer has marked the samples as already expired (I expected to have time until May 16). I'm sorry for not trying to get them earlier.

Which encoder for which codec do you use in Step 4? Why do you mention encoding video? Is it relevant to the audio (probably channel layout) issue? What is with audio playback after Step 3? Is it already messed up?

jimmy

#2
Thanks for your time.

- I missed the option in WeTransfer to increase the default expiry from 3 to 7 days
- I confirmed the problem with a different video, so mentioning video encoding was not relevant
- I confirmed that the extra step of remuxing, using either mkvtoolnix or avidemux, is required, audio
  quality of the remuxed audio in copy mode is fine, encoding the audio of the remux is fine
- I confirmed that using one step, adding external AC3 6 channel to avidemux and encoding,
  distorts the audio, the external AC3 6 channel needs to be internal before encoding
- so for step 3, remuxing was not an option due to video edits, external audio in copy mode is fine, encoding the external audio is distorted
- the only change I wanted to make to the AC3 6 channel was the gain, all other parameters were unchanged

New sample link:

https://we.tl/t-s0K0vK2JDP


eumagga0x2a

Thank you, got the samples. Please specify which AC3 encoder you used. On Windows, there might be not just the AC3 encoder in libavcodec but also Aften among audio encoder plugins in Avidemux.

Quote from: jimmy on May 15, 2024, 08:33:26 PM- the only change I wanted to make to the AC3 6 channel was the gain

Was it necessary to reproduce the issue? Does re-encoding without any audio filters result in the same messed up channel layout?

jimmy

Quote from: eumagga0x2a on May 16, 2024, 08:01:36 AMspecify which AC3 encoder

AC3 (lav) is the only AC3 option in the drop down list. The second AC3 option was removed quite some time back, no? Only AC3 (lav) in the plugins folder.

Quote from: eumagga0x2a on May 16, 2024, 08:01:36 AMre-encoding without any audio filters result in the same messed up channel layout

Yes, I reproduced the issue using no audio filters.

eumagga0x2a

Should be fixed now, we were using old channel layout API, partially gone in FFmpeg 6, fully removed in FFmpeg 7.

Refresh of nightlies will be requested once bundled FFmpeg has been successfully upgraded to 7.0.1 (which requires a lot of changes in different parts of Avidemux) and the worst issues identified and solved.

Thank you very much for your report.