Avidemux Forum

Avidemux => MacOSX => Topic started by: K Hindall on October 30, 2018, 11:03:27 PM

Title: 2.7.1 crashes when I try to load an MKV file
Post by: K Hindall on October 30, 2018, 11:03:27 PM
I tried to load an MKV file into Avidemux 2.7.1 for Mac. It crashed. I checked this forum and decided to try loading the most recent build I could find, Avidemux 2.7.1 180930-09h25m_425d03a4370.

But it still doesn't work. I've attached the error dialog that I got.

I'm sorry, I am no longer a geek (I was in my youth). Can anyone tell me what I should do?

[Added on edit.] My apologies. I should've included that I am running Mac OS 10.13.6 (High Sierra) on an iMac (21.5 inch, late 2009). The computer is too old to run Mojave. (If you'd like to pay for a new computer for me, let me know! It's not happening otherwise.)

Thank you.

Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: eumagga0x2a on October 30, 2018, 11:14:58 PM
Please launch Avidemux from the terminal

/Applications/Avidemux_2.7.1.app/Contents/MacOS/Avidemux2.7 > ~/admlog.txt 2>&1

reproduce the crash, then compress admlog.txt (gzip, zip or 7z) and attach it to your reply. Alternatively, provide the problematic mkv right away as a sample using a service like WeTransfer, Mega, Dropbox or Google Drive.

The crash message says that initialization of the opus decoder with given sampling rate and number of channels fails.
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: K Hindall on October 30, 2018, 11:34:49 PM
I think I've got it attached now. My apologies if I should've known to do that already.

Thank you!

K
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: eumagga0x2a on October 31, 2018, 12:06:50 AM
Thank you for the log. Can you play this video with e.g. mpv or vlc? Do you have another video with opus audio track which Avidemux loads successfully? If yes, I guess that it would be necessary to have a look at the file which triggers the crash.
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: K Hindall on October 31, 2018, 12:30:24 AM
The original MKV plays in VLC 3.0.4 just fine.

I didn't make the file, and I think this is the first time I've met Opus. There may be another MKV tucked away in my archives that's an Opus file from a different source, but I don't think so.

I've more than one MKV from this source. They all have Opus audio, and all of the ones I've tried make Avidemux crash.

I've tried other MKV files, and they have opened, but they have AAC audio.

Any suggestions on what I should try next? Is Avidemux designed to handle Opus?

Thank you!
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: eumagga0x2a on October 31, 2018, 07:19:11 AM
Avidemux on macOS (I haven't updated to Mojave either) can play videos with opus audio – it works just fine with a vp9 + opus .mkv sample video on my system using my own builds. The audio track has 2 channels only, however. Either there is an issue with official builds regarding libopus or there is something special with the audio track the video which is not obvious from the log.
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: K Hindall on October 31, 2018, 12:33:45 PM
Is there any way for me to check either contingency?

Thank you!

K
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: eumagga0x2a on October 31, 2018, 01:36:32 PM
If you have homebrew installed, use youtube-dl to download a video of your choice and the corresponding opus audio track. Use

ffmpeg -i source_video -i source_opus_audio -c copy out.mkv

to generate a sample. Try to load out.mkv in Avidemux. This will clarify whether there is a general problem with libopus in official builds.
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: K Hindall on November 02, 2018, 02:08:58 PM
My apologies for taking so long to respond. It's been a rather busy few days, and then I had a little trouble with my assignment. (And technology used to come to me so easily . . . )

The out.mkv file does load into Avidemux, but it has only two tracks. The original video that spawned this thread has six. (I dropped it into Audacity to check what VLC meant by "3F2R/LFE", which I assume is obvious to audio mavens.)

So I take it that Avidemux doesn't handle that many tracks of audio—or at least not of Opus audio?

Thank you.

K
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: eumagga0x2a on November 02, 2018, 03:48:59 PM
The libopus API explicitely states that max 2 channels are supported (http://opus-codec.org/docs/opus_api-1.2/group__opus__decoder.html#ga753f6fe0b699c81cfd47d70c8e15a0bd), so it is a libopus limitation. How did you obtain the file which claims to have 6 channels? I can't generate such an audio track.

Avidemux supports max. 6 channels.
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: K Hindall on November 02, 2018, 04:42:13 PM
Well, that's a very long story, and it's not Avidemux related. I admit that the file was from an illegal TV site, but I was only going to make a file for Halloween, show it to my sister, and then delete it (and the original I downloaded).

There isn't a virus in the file. I scanned for that.

So . . . Avidemux supports six audio channels, but not with Opus audio because libopus doesn't? Am I understanding correctly?

Thank you.

K
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: eumagga0x2a on November 02, 2018, 05:29:35 PM
I was curious about the technical background of the file, not about copyright issues.

Quote from: K Hindall on November 02, 2018, 04:42:13 PM
So . . . Avidemux supports six audio channels, but not with Opus audio because libopus doesn't?

Yes, right. And the audio decoder API in Avidemux doesn't allow decoders to advertise their limitations WRT sampling rate and channel layout.

I've pushed a simple patch limited to the libopus decoder plugin. I strongly suspect that the audio track has really only 2 channels and the only thing we need is to ignore wrong info from the container. Please test a future nightly for macOS.
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: K Hindall on November 02, 2018, 10:12:03 PM
Well, Audacity broke it into six tracks. That's all I know.

Thank you for pushing the patch! I'll check for new nightly versions of Avidemux.

K
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: eumagga0x2a on November 04, 2018, 01:34:16 AM
A proper fix for multistream opus audio tracks upcoming. I was on a completely wrong track as multichannel is handled by a different API.
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: eumagga0x2a on November 08, 2018, 12:42:52 AM
Please try the 181107 nightly: https://avidemux.org/nightly/osx_highsierra/

Local audio output without downmixing is known to have issues with multichannel audio. Output with downmixing to stereo or dolby should work,  copy mode or re-encoding with or without downmixing should work.
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: K Hindall on November 08, 2018, 02:56:27 PM
It works!

Thank you so much! I appreciate all your effort in fixing this.

K
Title: Re: 2.7.1 crashes when I try to load an MKV file
Post by: eumagga0x2a on November 10, 2018, 12:52:09 PM
Glad to hear that, thanks. Meanwhile, the playback without downmixing has been fixed in code, will work in future nightlies.

Please note that on a MacBook*, 5.1 audio doesn't get automatically downmixed by the sound system, so with local downmixing in Avidemux disabled in preferences, you would hear really only the front left and the front right channels out of the internal speakers.