Skip to content

Instantly share code, notes, and snippets.

@balexandre
Last active August 30, 2023 08:51
Show Gist options
  • Save balexandre/60a4f89b3c79cb7adb5aaf87829207e8 to your computer and use it in GitHub Desktop.
Save balexandre/60a4f89b3c79cb7adb5aaf87829207e8 to your computer and use it in GitHub Desktop.
My F1Viewer configuration
{
"live_retry_timeout": 60,
"preferred_language": "en",
"check_updates": true,
"save_logs": true,
"log_location": "",
"horizontal_layout": false,
"theme": {
"background_color": "#000000",
"border_color": "#0CA597",
"category_node_color": "#0CA597",
"folder_node_color": "#0CA597",
"item_node_color": "#931547",
"action_node_color": "#0CA597",
"loading_color": "#931547",
"live_color": "",
"update_color": "",
"no_content_color": "#EEEEEE",
"info_color": "",
"error_color": "",
"terminal_accent_color": "",
"terminal_text_color": ""
},
"tree_ratio": 1,
"output_ratio": 1,
"custom_playback_options": [{
"title": "download with ffmpeg",
"command": ["ffmpeg", "-hide_banner", "-loglevel", "warning", "-i", "$url", "-c", "copy", "$title.mp4"]
}, {
"title": "Stream on VLC",
"command": ["C:\\Program Files\\VideoLAN\\VLC\\vlc.exe", "$url"]
}, {
"title": "Stream on MPV (1080p)",
"command": ["mpv", "--quiet", "--no-border", "$url"]
}, {
"title": "Stream on MPV (720p)",
"command": ["mpv", "--vid=2", "--no-border", "$url"]
}, {
"title": "Stream with Streamlink+MPV (720p)",
"command": ["streamlink", "--player", "C:\\ProgramData\\chocolatey\\lib\\mpv.install\\tools\\mpv.exe", "--hls-audio-select", "*", "$url", "720p"]
}, {
"title": "Stream with Streamlink+MPV (1080p)",
"command": ["streamlink", "--player", "C:\\ProgramData\\chocolatey\\lib\\mpv.install\\tools\\mpv.exe", "--hls-audio-select", "*", "$url", "1080p"]
}
],
"multi_commands": [{
"title": "Onboard, track and data (4k)",
"targets": [
{
"match_title": "Main Feed",
"command": ["mpv", "--start=0", "--quiet", "--no-border", "--autofit=2880", "--geometry=0:0", "$url"]
},
{
"match_title": "Charles Leclerc",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--autofit=960", "--geometry=100%:0", "$url"]
},
{
"match_title": "Sebastian Vettel",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--autofit=960", "--geometry=100%:33%", "$url"]
},
{
"match_title": "Lewis Hamilton",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--autofit=960", "--geometry=100%:67%", "$url"]
},
{
"match_title": "Max Verstappen",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--autofit=960", "--geometry=100%:100%", "$url"]
},
{
"match_title": "Lando Norris",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--autofit=960", "--geometry=67%:100%", "$url"]
},
{
"match_title": "Driver Tracker",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--autofit=960", "--geometry=0:100%", "$url"]
},
{
"match_title": "Data Channel",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--autofit=960", "--geometry=33%:100%", "$url"]
}
]}, {
"title": "Onboard, track and data (3440x1440) + drivers audio",
"targets": [
{
"match_title": "Main Feed",
"command": ["mpv", "--start=0", "--quiet", "--no-border", "--autofit=1750", "--geometry=0:0", "$url"]
},
{
"match_title": "Lewis Hamilton",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=1748:0", "--autofit=860", "$url"]
},
{
"match_title": "Daniel Ricciardo",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=2600:0", "--autofit=860", "$url"]
},
{
"match_title": "Charles Leclerc",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=1748:483", "--autofit=860", "$url"]
},
{
"match_title": "Lando Norris",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=2600:483", "--autofit=860", "$url"]
},
{
"match_title": "Max Verstappen",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=1748:960", "--autofit=860", "$url"]
},
{
"match_title": "Sergio Perez",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=2600:960", "--autofit=860", "$url"]
},
{
"match_title": "Driver Tracker",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=0:945", "--autofit=860", "$url"]
},
{
"match_title": "Data Channel",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=687:922", "--autofit=1064", "$url"]
}
]}, {
"title": "Onboard, track and data (3440x1440 + PLC)",
"targets": [
{
"match_title": "Pit Lane",
"command": ["mpv", "--start=0", "--quiet", "--no-border", "--autofit=1750", "--geometry=0:0", "$url"]
},
{
"match_title": "Lewis Hamilton",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=1748:0", "--autofit=860", "$url"]
},
{
"match_title": "Daniel Ricciardo",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=2600:0", "--autofit=860", "$url"]
},
{
"match_title": "Charles Leclerc",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=1748:483", "--autofit=860", "$url"]
},
{
"match_title": "Lando Norris",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=2600:483", "--autofit=860", "$url"]
},
{
"match_title": "Max Verstappen",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=1748:960", "--autofit=860", "$url"]
},
{
"match_title": "Sergio Perez",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=2600:960", "--autofit=860", "$url"]
},
{
"match_title": "Driver Tracker",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=0:945", "--autofit=860", "$url"]
},
{
"match_title": "Data Channel",
"command": ["mpv", "--aid=2", "--mute=yes", "--vid=2", "--start=0", "--quiet", "--no-border", "--cache-pause-initial=yes", "--cache-pause-wait=35", "--geometry=687:922", "--autofit=1064", "$url"]
}
]}
]
}
@zierbeek
Copy link

thanks man!

@JustJoostNL
Copy link

JustJoostNL commented Mar 31, 2022

Hi, i have 2 screens, a big 1680x1050 (main display) and a smaller 1920x1080 (second display) For my main display (1680x1050) i want to create a thing like this:
image

But then for my resolution (other sizes of the windows), how can i do that easily?

Also on my second smaller screen (1920x1080) i want like 15 driver cams (it doesnt matter if they are super small, i want them just as big as possible) how can i set that up also like the image above easily?

Is there software to make zones like this? (i really dont want to use powertoys because it using to much ram)

The help is welcome, because I am not really familiar with this!

@PhillipAlpha
Copy link

PhillipAlpha commented Mar 31, 2022

I oddly enough run that first screen layout but with the big screen at the bottom left rather than top right.

[[multi_commands]]
title = "Title "

[[multi_commands.targets]]
match_title = "" //Big screen here
command = ["mpv", "--quiet", "--mute=no", "--no-border", "--autofit=1280", "--geometry=0:0", "$url"]
proxy = false

[[multi_commands.targets]]
match_title = ""
command = ["mpv", "--mute=yes", "--vid=3", "--quiet", "--no-border", "--autofit=640", "--geometry=1280:0", "$url"]
proxy = false

[[multi_commands.targets]]
match_title = ""
command = ["mpv", "--mute=yes", "--vid=3", "--quiet", "--no-border", "--autofit=640", "--geometry=1280:360", "$url"]
proxy = false

[[multi_commands.targets]]
match_title = ""
command = ["mpv", "--mute=yes", "--vid=3", "--quiet", "--no-border", "--autofit=640", "--geometry=0:720", "$url"]
proxy = false

[[multi_commands.targets]]
match_title = ""
command = ["mpv", "--mute=yes", "--vid=3", "--quiet", "--no-border", "--autofit=640", "--geometry=640:720", "$url"]
proxy = false

[[multi_commands.targets]]
match_title = ""
command = ["mpv", "--mute=yes", "--vid=3", "--quiet", "--no-border", "--autofit=640", "--geometry=1280:720", "$url"]
proxy = false

@JustJoostNL
Copy link

Thanks, how do you create these multicommands "zones"? I also want to make a layout myself but i really dont know how to do and what to fill in at geometry and autofit.

@PhillipAlpha
Copy link

if you adjust and copy the bit above into your config file located at C:\users\your profile\appdata\roaming\f1viewer\config.toml on windows it should load up properly

you can even have muliple entries

@JustJoostNL
Copy link

Yeah, i know but i want to make mulitple multicommands, so i want to make the layout and scaling by myself, but how can i do that fast and efficiently. How does the --geometry and --autofit work? (so if i want to create a box like one on the image, but a other size/scaling how can i do that?)
image

@PhillipAlpha
Copy link

autofit is used to squeeze the window into a set width - and the corresponding height (i also use the vid command to ensure that i get the quality suitable for the window, otherwise it'll just pick the best quality possible)

all geometry does is placement of the window?

everything ultimately comes down to your native resulution and is based on the width of the window, thats the only scale you can adjust.

@JustJoostNL
Copy link

Thanks, but how do i know what to fill in at --geometry if i want it in the top right what to fill in then, i really dont know that....

@PhillipAlpha
Copy link

PhillipAlpha commented Mar 31, 2022

it'd be tough to fit to a 1680 by 1050 display tbh, as all the streams are locked in at 16:9 aspect ratio.

the main streams are:

vid=1 480x270
vid=2 512x288
vid=3 640x480
vid=4 960x540
vid=5 1280x720
vid=6 1920x1080 (this is only available for F1 Live, International, Data Channel and Driver Tracker)

so the best way to make it fit is to work out how big these 16:9 windows can be to on your screen with no gaps.

you can scale the width with autofit, but thats still not going to switch it to fit your 16:10 display.

But for top right to fit in would be 100%:0(or you can replace 100% with the width of your top left stream in pixels)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment