How do I use dual pass with vp9/webm?

I think you guys have tried everything that I could think of. Apparently it works for @sauron and it doesn’t work for @nyankatt when using the same files and configuration.

@nyankatt would you happen to have access to a different computer that you could try?

These are the most difficult issues to solve: when something works for some people and not others.

@nyankatt I tried to reproduce this failure on both Windows and Linux without any success.

What else can you tell use that might give some insight?
What Video mode are you using?
What OS are you using?
What language is your OS set to?
What language is Shotcut set to?

Thanks for taking a look at this.

I won’t have access to a different computer before sunday evening, so I can try then.

Video mode is set to automatic.
OS is Windows 10 Enterprise LTSB x64
My GPU is a GeForce GTX 770
System language is english
Shotcut language is english, but from the application log it sets the locale to norwegian. Shotcut language is still in english though.

I don’t know how helpful it is but here’s the application log: https://pastebin.com/raw/07wLpeRx

Two things of interest:

[Info ] Application::Application locale = QLocale(NorwegianBokmal, Latin, Norway)

[Debug ] MltXmlChecker::MltXmlChecker decimal point ‘,’

These would at least be a difference between your system and mine.

It must do that because your system locale is set to Norway (even though you set the language to English). Is it true that your system locale is set to Norway? You could try setting it to a different locale and see if the problem persists. If you make a change, look for “decimal point ‘.’” (period instead of comma). I know that has caused problems in other situations in the past. I thought we had most of those bugs fixed, but maybe something still persists.

hmm, perhaps average or constant bitrate works?

Same proble here.

[Debug ] MltXmlChecker::MltXmlChecker decimal point ‘,’
I noticed my Calc.exe also behave stangely, I guess my english windows is partly configured for the dutch units and numerical dividers.

This is what we use at work, to prevent scanf/printf to behave using regional settings, we like to have it forced to:
setlocale( LC_ALL, “C” );

Restarted Shotcut, it needed a repair on the mlt file, so I modified all 000:00:00,000 timestamps to 000:00:00.000 and also the other parameters in the file. Hopefully it will now do a dual pass.

But it did not help.

Thanks for the reply, mixing english languaged windows with norwegian locale sounds like something that could’ve made some issues, but unfortunately it doesn’t seem to be the case here, problem persists.

I changed the locale to american english, and the application log recognizes this as well:

[Info ] Application::Application locale = QLocale(English, Latin, UnitedStates)
[Debug ] MltXmlChecker::MltXmlChecker decimal point ‘.’

Changing the locale messed up the aspect ratio of my custom outputs, but using stock webm vp9 I still get the same issues trying to do a dual pass export.

libvpx dual pass does not write to the dual pass log file *_.2pass.log while the encoding is making progress like other codecs do. Instead, the data is collected and written at the end when flushing the codec. Thus the error “Additional information: rc_twopass_stats_in.sz indicates truncated packet.” in the second pass means the log file was empty or not existing. This might be because MLT did not send a null frame for whatever reason or perhaps some other reason not yet understood. As of v18.06 of Shotcut, MLT uses the new FFmpeg avcodec_send_frame(), avcodec_receive_packet() APIs (to facilitate AMD AMF GPU encoding). You should re-test this with a more recent version. I was not able to reproduce it on v18.07. MLT definitely appears to be flushing the codec at the end as long as there was no fatal error. I saw the log file fill at the end of pass 1, no error for pass 2, and a success.

I should’ve mentioned the last test was with the most recent version at that time, 18.07.02.

The log file is being created and filled with content during the process, I was able to copy it after the first pass was done just double check, so it’s definitely there.