AviDemux downmixing from Quad Channel to Stereo results to silent audio

Started by antoniu200, February 06, 2022, 07:38:30 PM

Previous topic - Next topic

antoniu200

Hi!

I have updated AviDemux today from 2.7.2 to 2.8.0 and tried to remux an MKV to MP4 and downmix the audio from Quad channel to Stereo channel.

In 2.7.2, the result would be a properly downmixed mono right channel and a totally silent (-96 dBFS) left channel.
In 2.8.0, the result is totally silent (-96 dBFS) stereo audio track.

I uploaded the input video to Drive here: https://drive.google.com/file/d/1rKxlMzoyh0UBIYFdQqEI9gnzL7hAJMsh/view
Is this a bug or a setting I might have improperly configured?

eumagga0x2a

Should be fixed by [audioDecoders/opus] Assign valid channel types when the number of channels lies between 2 and 5 too, please try a future nightly.

Thank you for your report and the sample. Rare channel layouts like Quad were not handled by the Opus decoder plugin in Avidemux.

antoniu200

Quote from: eumagga0x2a on February 06, 2022, 10:28:17 PMShould be fixed by [audioDecoders/opus] Assign valid channel types when the number of channels lies between 2 and 5 too, please try a future nightly.

I tried the 220207 nightly, but there is now another issue.

Not sure for other files, but if I load that file I attached you, I get this error:
The application has encountered a fatal problem
The current editing has been saved and will be reloaded at next start
EXCEPTION_ACCESS_VIOLATION
unknown function  [unknown module]
ADM_setCrashHook  [libADM_core6.dll]
ADM_setCrashHook  [libADM_core6.dll]
ADM_setCrashHook  [libADM_core6.dll]
UnhandledExceptionFilter  [KERNELBASE.dll]
memset  [ntdll.dll]
_C_specific_handler  [ntdll.dll]
_chkstk  [ntdll.dll]
RtlImageNtHeaderEx  [ntdll.dll]
KiUserExceptionDispatcher  [ntdll.dll]

After this, the program crashes.
When relaunching, I get these 2 messages, in this order:
Confirmation
Crash file
I have detected a crash file. Do you want to load it ?(It will be deleted in all cases, you should save it if you want to keep it)

TinyPy:Exception
Exception: (_tp_dict_get) KeyError: nud
BackTrack:
File: py2bc.py, line 51
File: py2bc.py, line 10
File: parse.py, line 424
File: parse.py, line 414
File: parse.py, line 199
File: parse.py, line 80
File: parse.py, line 63

After this, the program supposedly works, but the file in question is not loaded.

Is it possible another issue which prevents AviDemux from downmixing Quad to Stereo while playing back is causing this?

eumagga0x2a

If we crash hard (not an controlled assert failure but a real crash like here), the crash file (a tinyPy script describing the state of editing at the moment of the crash) can be damaged or otherwise unusable.

If the crash happens already on load and not later during an attempt to play the file, it is most likely not related to the Opus channel layout fix. You can easily check by temporarily moving libADM_ad_opus.dll out of Avidemux program directory.

Do other MKV files with H.264 video track crash too?

(I cannot test on Windows at the moment, while my macOS build works fine with your sample.)

antoniu200

Quote from: eumagga0x2a on February 07, 2022, 11:36:57 PMDo other MKV files with H.264 video track crash too?

(I cannot test on Windows at the moment, while my macOS build works fine with your sample.)

I tested another MKV of the same specs as the example one from above, only differences being this one was manually remuxed with mono Opus and i420 instead of i444. Same messages and behaviour from AviDemux. Same thing happens if I try and remove the libADM_ad_Opus.dll.

eumagga0x2a

Quote from: antoniu200 on February 08, 2022, 06:27:06 AMSame thing happens if I try and remove the libADM_ad_Opus.dll.

Thank you, this means the problem is not related to the Opus fix. Could you please test two more things:

1. Load a typical H.264 + AAC mp4 file.

2. Load a MKV or a MP4 with non-H.264 video (HEVC, Xvid, VP9 etc.)

3. Rename the "avidemux" folder in %appData% while Avidemux is not running.

antoniu200

Quote from: eumagga0x2a on February 08, 2022, 07:10:22 AM1. Load a typical H.264 + AAC mp4 file.

2. Load a MKV or a MP4 with non-H.264 video (HEVC, Xvid, VP9 etc.)

3. Rename the "avidemux" folder in %appData% while Avidemux is not running.

Tried all of these, same behaviour occurs for me.

eumagga0x2a

Does it mean that loading just any video results in this crash?

antoniu200

Quote from: eumagga0x2a on February 08, 2022, 10:41:48 AMDoes it mean that loading just any video results in this crash?

I have just tried some DVD rips in MKV format to test. Also, some HEVC files in 480p using AAC-LC.

It seems to me like trying to import any video leads to this crash.

I should maybe try on a newer version of Windows 10? I am currently on 1607.

eumagga0x2a

Thanks, no, this should not matter. Anything starting with Windows 7 should work. I need to be able to test myself again. This might take some time though.

eumagga0x2a

Just to rule out a very popular user error: you haven't mixed up a VC++ and a MinGW build of Avidemux in a single directory, have you?

antoniu200

Quote from: eumagga0x2a on February 08, 2022, 01:27:52 PMJust to rule out a very popular user error: you haven't mixed up a VC++ and a MinGW build of Avidemux in a single directory, have you?

Well, I do not compile AviDemux myself, so the only ones I combine are the official ones. Updated from 2.8.0 to the aforementioned nightly.
Aren't these two compiled the same way?

Can't uninstall and reinstall now, as I am away from my PC.

eumagga0x2a

No, they are built using very different compilers and not binary-compatible. You can have both installed at the same time, just never into the same directory and never run simultaneously.

antoniu200

Quote from: eumagga0x2a on February 08, 2022, 01:52:54 PMNo, they are built using very different compilers and not binary-compatible. You can have both installed at the same time, just never into the same directory and never run simultaneously.
I'll reinstall and test again in this case.

antoniu200

Quote from: eumagga0x2a on February 08, 2022, 01:27:52 PMJust to rule out a very popular user error: you haven't mixed up a VC++ and a MinGW build of Avidemux in a single directory, have you?

Reinstalled and tested again. It works fine now, thanks for the fix!

And sorry for the waste of time :-[