dfaker / VR-reversal

VR-Reversal - Player for conversion of 3D video to 2D with optional saving of head tracking data and rendering out of 2D copies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change default video settings on launch?

lunarwolfspirit opened this issue · comments

Hi, really new to MPV in general. Wanted to know if there's a way to change the launch settings - for instance, I would like to use the video's native resolution and have it sound muted on launch. Would that be through the 360plugin.lua file? Would the process be any different from the standard MPV player?

As best I can tell, the answer is "sorta." Basically, you need to set options for this specific script separately from options for mpv. Anything that's in the opts table in the script needs to be changed via --script-opts, while something like volume would need to be passed in a separate option to mpv directly.

So for example:

mpv --volume=-1 --script=360plugin.lua --script-opts=360plugin-enabled [filename]

For the resolution part, this requires editing the script itself. There's a variable res defined at the beginning, and it sets the quality. As best I can tell it's a scaling factor of some kind: a value of 1 resulted in a resolution that is 1/10 native on the one file I've tried, while a value of 10 was native. I haven't tried it, but I'm assuming that anything above 10 means mpv will try to upscale it.

The simplest way to address this, then, is simply to edit the res variable (line 91) to be 10.

I got a tad fancier: I added an option for it to the opts table, then combined that with a bash script that allows an optional value to be passed. But this is a little bit extra :)

Thanks that worked! I'll stick to simple changes for the time being ha!