Avidemux 2.8.1 : Cannot convert files to webm?

Started by question, October 26, 2024, 06:23:33 AM

Previous topic - Next topic

question

I can't seem to convert files to webm using avidemux, i select vp9 video output and the webm muxer, but i just get an error "Cannot open" during the encoding process...

I can convert to other formats like mp4 though. The original file is a mkv.

sark

Firstly, version 2.8.1 is over two years old. I strongly recommend updating to the latest 2.8.2. You can then test again and post back.

https://www.avidemux.org/nightly/win64/

question

Quote from: sark on October 26, 2024, 09:21:10 AMFirstly, version 2.8.1 is over two years old. I strongly recommend updating to the latest 2.8.2. You can then test again and post back.

https://www.avidemux.org/nightly/win64/

Just tested with the Sep 8th version and i got the same error. "Could not open".

eumagga0x2a

The WebM muxer doesn't check audio track for being compatible with the format (it is built from the same code as the MKV muxer which accepts almost everything) like it does for the video track. Audio must be either Opus or Vorbis.

question

Quote from: eumagga0x2a on October 26, 2024, 11:28:27 AMThe WebM muxer doesn't check audio track for being compatible with the format (it is built from the same code as the MKV muxer which accepts almost everything) like it does for the video track. Audio must be either Opus or Vorbis.

Just tried both Opus and Vorbis, still says "could not open".

eumagga0x2a

Maybe there are multiple audio tracks and some of them aren't Opus or Vorbis. In doubt, please start Avidemux, reproduce the error, close Avidemux and attach admlog.txt from %localappdata%\avidemux directory to your reply.

question

I see the problem, when you select the audio output on the left, it only changes the audio output for the first track in the video. There were 6 tracks, and the other 5 were still set to "copy" instead of "vorbis". I had to manually go into "audio -> select track" and change every track to use vorbis instead of "copy".

That probably should be fixed.

Now my problem is that when i convert a mp4 file to webm using avidemux, for some reason the file size is actually larger?

sark

Quote from: question on October 26, 2024, 11:59:52 AMNow my problem is that when i convert a mp4 file to webm using avidemux, for some reason the file size is actually larger?

Many factors determine output size. By default I believe Avidemux uses 2 pass encoding for VP9. Changing to Constant Bitrate should reduce output size (significantly in some cases).

eumagga0x2a

Quote from: sark on October 26, 2024, 01:32:49 PMChanging to Constant Bitrate should reduce output size (significantly in some cases).
Please don't, constant bitrate is almost always a poor choice – just the default configuration of the libvpx VP9 encoder plugin is even worse.

Please use the 2-pass average bitrate option with an actually reasonable, non-zero bitrate. If I am not mistaken, two-pass is unfortunately the only way to make libvpx insert keyframes at scene changes rather than stupidly following the specified GOP length.

If keyframes placing is not important for you, use constant quantizer mode. Increasing "Speed" beyond "4" allows for much faster operation at the cost of massively worse compression.

question

Quote from: eumagga0x2a on October 26, 2024, 02:21:52 PM
Quote from: sark on October 26, 2024, 01:32:49 PMChanging to Constant Bitrate should reduce output size (significantly in some cases).
Please don't, constant bitrate is almost always a poor choice – just the default configuration of the libvpx VP9 encoder plugin is even worse.

Please use the 2-pass average bitrate option with an actually reasonable, non-zero bitrate. If I am not mistaken, two-pass is unfortunately the only way to make libvpx insert keyframes at scene changes rather than stupidly following the specified GOP length.

If keyframes placing is not important for you, use constant quantizer mode. Increasing "Speed" beyond "4" allows for much faster operation at the cost of massively worse compression.

Why does Avidemux say the optimal is two pass average + target bitrate of 0 then? Thats also the default setting. What should i use to keep reasonable quality but have the same or lower file size? I dont understand why converting mp4 to webm results in an increased file size...

eumagga0x2a

Quote from: question on October 26, 2024, 05:48:52 PMWhy does Avidemux say the optimal is two pass average + target bitrate of 0 then?

Honestly, I am not sure that this configuration works as intended. The idea was to benefit from reasonably chosen keyframes, which requires 2-pass mode, but at the same time to ask the libvpx library to do constant quality encoding. However, rc_max_quantizer (libvpx parameter describing the worst permitted quality) is set to the maximum allowed value rather than to rc_min_quantizer (libvpx parameter describing the best permitted quality) which Avidemux sets to 20. The output has a very high visual quality, else I would have written "best compression" ;-)

Quote from: question on October 26, 2024, 05:48:52 PMI dont understand why converting mp4 to webm results in an increased file size...

Every generation of lossy encoding worsens the quality and/or inflates the size of stream. This is a general rule. If the original stream was encoded using a very efficient codec like HEVC, re-encoding to VP9 will hardly allow to keep the same stream size without a substantial quality loss. If you really need to keep file size same or smaller, write down the average bitrate Avidemux displays in the video properties dialog for the original video and configure the VP9 encoder to use 2-pass mode with a bitrate slightly below (and also lower the value for "Speed").