A cool method to launch your video player with different settings

poisonborz

Novice Member
I often needed my video player to launch with some custom settings for some different video files (eg. I don't want madvr to be set in MPC for a very high bitrate 8k60fps video). I know that there are profile groups (in madvr) or automatic settings based on resolution (in some players) etc but setting those up is more tedious. Therefore I present a way to just exchange some settings on the fly, so you can have a shortcut to "LAV-lessVideoPlayer" or "FastVideoPlayer" etc. Solution is Windows only.

What is needed:
  • A video player that has config stored in files (portable versions are best)
  • AutoHotKey
  • Hugo AHK String library - copy-paste this and save it as "tf.ahk" in the same folder as you have the video player config file: https://raw.githubusercontent.com/hi5/TF/master/tf.ahk

I'm using the above example, but you can apply this to any player/setting.
Obvious TSA: be aware that this might bork your config. Make backups, mind what you do.

MPC-BE stores its settings in mpc-be64.ini. Make a copy of this file. Now make your changes, so for our case change the video renderer from madvr tp EVR-CP. Save and exit. Now look at the difference between the two .ini files (you can use WinMerge for this). As we see the change is a simple VideoRenderer=7 to VideoRenderer=3 (your numbers can vary).

We will create two scripts that launch with either this or that setting. The scripts will change the .ini file permanently so we need two shortcuts - to either launch with madvr or EVR-CP.

Make two new .ahk files (eg. mpc_madvr.ahk and mpc_evrcp.ahk) with the following contents - this does a "search and replace" in the file, changing the values. You can have more TF_Replace lines if you want to modify more things.

Code:
#Include tf.ahk
TF_Replace("!mpc-be64.ini","VideoRenderer=7","VideoRenderer=3") 
Run "mpc-be64.exe" %1%, %2%

In the other file, simply exchange the VideoRenderer numbers. You can customize the file paths (eg. c:\myapps\mpc-be\mpc-be64.exe) if the script is somewhere else. Don't forget that these changes are permanent, so you probably need to "undo" them in another script (your "normal" config). the % numbers ensure that command line arguments are passed to your player. You might want to associate video files with your "normal" player config .exe to ensure that you launch with those settings.

Now find Ahk2Exe.exe in the Autohotkey folder and run it, drag both of your scripts in there one by one and hit "Convert" - this creates the .exe files.

Verify that launching the two files, your settings are applied (so in this case, the video renderer changes to EVR-CP and madvr and vica versa).
 

Coulson

Distinguished Member
I often needed my video player to launch with some custom settings for some different video files (eg. I don't want madvr to be set in MPC for a very high bitrate 8k60fps video). I know that there are profile groups (in madvr) or automatic settings based on resolution (in some players) etc but setting those up is more tedious. Therefore I present a way to just exchange some settings on the fly, so you can have a shortcut to "LAV-lessVideoPlayer" or "FastVideoPlayer" etc. Solution is Windows only.

What is needed:
  • A video player that has config stored in files (portable versions are best)
  • AutoHotKey
  • Hugo AHK String library - copy-paste this and save it as "tf.ahk" in the same folder as you have the video player config file: https://raw.githubusercontent.com/hi5/TF/master/tf.ahk

I'm using the above example, but you can apply this to any player/setting.
Obvious TSA: be aware that this might bork your config. Make backups, mind what you do.

MPC-BE stores its settings in mpc-be64.ini. Make a copy of this file. Now make your changes, so for our case change the video renderer from madvr tp EVR-CP. Save and exit. Now look at the difference between the two .ini files (you can use WinMerge for this). As we see the change is a simple VideoRenderer=7 to VideoRenderer=3 (your numbers can vary).

We will create two scripts that launch with either this or that setting. The scripts will change the .ini file permanently so we need two shortcuts - to either launch with madvr or EVR-CP.

Make two new .ahk files (eg. mpc_madvr.ahk and mpc_evrcp.ahk) with the following contents - this does a "search and replace" in the file, changing the values. You can have more TF_Replace lines if you want to modify more things.

Code:
#Include tf.ahk
TF_Replace("!mpc-be64.ini","VideoRenderer=7","VideoRenderer=3")
Run "mpc-be64.exe" %1%, %2%

In the other file, simply exchange the VideoRenderer numbers. You can customize the file paths (eg. c:\myapps\mpc-be\mpc-be64.exe) if the script is somewhere else. Don't forget that these changes are permanent, so you probably need to "undo" them in another script (your "normal" config). the % numbers ensure that command line arguments are passed to your player. You might want to associate video files with your "normal" player config .exe to ensure that you launch with those settings.

Now find Ahk2Exe.exe in the Autohotkey folder and run it, drag both of your scripts in there one by one and hit "Convert" - this creates the .exe files.

Verify that launching the two files, your settings are applied (so in this case, the video renderer changes to EVR-CP and madvr and vica versa).
Actually setting up the MadVR profiles are pretty easy. I have profiles for 1080p, 1440p and 4k. Each profile has less post processing and lower quality scaling algorithms than the last because less is needed but also to be able to play them back smoothly.
 

The latest video from AVForums

Toy Stories - Turning Toys into Blockbuster Movies
Subscribe to our YouTube channel
Support AVForums with Patreon

Top Bottom