Remember docks with OBS Profile

xcelr8

New Member
I stream on youtube and twitch daily and switch all the settings with my OBS profile and scene collection.
If I could save the docks with them as well, for eg, my twitch chat dock and alerts dock open when i load my twitch obs profile and my yt docks open when i select the profile i use for my yt settings, it would save a lot of repetitive boring tasks everyday.
Thanks
 

hlc

New Member
I'm sure there are more elegant ways of doing this, but I wanted this too so I created a cmd file for each scenario. There's no limit to how many you could create. In my case there are 2, normal and without any docks displayed, that I use for demos. I'm running Windows 10.

When you change your dock layout and exit the app, the global.ini file is updated (Specifically, the DockState variable). I made a copy of my default global.ini that I use most of the time, to global-Deafault.ini. I then made the DOCK changes that I wanted, exited the app (so the global.ini would update) and then copied that global.ini to global-NoDocksForDemos.ini

I then created 2 cmd files as follows (replacing [your user name] in the path):
note: The START prefix in the last line is so that the CMD window will close when the OBS exe starts. Without that, the CMD window would remain open until OBS is closed. The "" prefix is needed if the command that follows it is in double quotes. See this article for the details.

You can then either put those on your desktop to execute or create short cuts for them so that you can add icons and other parameters and put the shortcuts on the desktop.

Then you simply click the one that you want for the layout that you want..

OBS_ForDemo.cmd
---------------------------
@Echo Off
CD C:\Users\[your user name]\AppData\Roaming\obs-studio
Copy global-NoDocksForDemos.ini global.ini
CD "C:\Program Files\obs-studio\bin\64bit"
START "" "C:\Program Files\obs-studio\bin\64bit\obs64.exe"

OBS_Default.cmd
---------------------------
@Echo Off
CD C:\Users\[your user name]\AppData\Roaming\obs-studio
Copy global-Default.ini global.ini
CD "C:\Program Files\obs-studio\bin\64bit"
START "" "C:\Program Files\obs-studio\bin\64bit\obs64.exe"
 
Last edited:

hlc

New Member
I'm sure there are more elegant ways of doing this, but I wanted this too so I created a cmd file for each scenario. There's no limit to how many you could create. In my case there are 2, normal and without any docks displayed, that I use for demos. I'm running Windows 10.

When you change your dock layout and exit the app, the global.ini file is updated (Specifically, the DockState variable). I made a copy of my default global.ini that I use most of the time, to global-Deafault.ini. I then made the DOCK changes that I wanted, exited the app (so the global.ini would update) and then copied that global.ini to global-NoDocksForDemos.ini

I then created 2 cmd files as follows (replacing [your user name] in the path):
note: The START prefix in the last line is so that the CMD window will close when the OBS exe starts. Without that, the CMD window would remain open until OBS is closed. The "" prefix is needed if the command that follows it is in double quotes. See this article for the details.

You can then either put those on your desktop to execute or create short cuts for them so that you can add icons and other parameters and put the shortcuts on the desktop.

Then you simply click the one that you want for the layout that you want..

OBS_ForDemo.cmd
---------------------------
@Echo Off
CD C:\Users\[your user name]\AppData\Roaming\obs-studio
Copy global-NoDocksForDemos.ini global.ini
CD "C:\Program Files\obs-studio\bin\64bit"
START "" "C:\Program Files\obs-studio\bin\64bit\obs64.exe"

OBS_Default.cmd
---------------------------
@Echo Off
CD C:\Users\[your user name]\AppData\Roaming\obs-studio
Copy global-Default.ini global.ini
CD "C:\Program Files\obs-studio\bin\64bit"
START "" "C:\Program Files\obs-studio\bin\64bit\obs64.exe"

Since I only have 2, that's no big deal, but for those of you that have more than that, you can create 1 cmd file and pass in a parameter for the configuration that you want. I will provide that script when I get a chance.
 

Denvahluvah

New Member
Since I only have 2, that's no big deal, but for those of you that have more than that, you can create 1 cmd file and pass in a parameter for the configuration that you want. I will provide that script when I get a chance.
This is pretty much Greek to me. I would not know how to create a command prompt for a program. I know how to access the Command Prompt, but beyond that, I am pretty much lost. In the scripting do I include the "@Echo Off" or not. Not sure how to go about this. Currently I have 6 docked items, and when I close and reopen, the 2 latest ones are barely visible. I have to place them again, size everything again, and it gets to be a pain. Locking the UI does not help at all.
 

hlc

New Member
This is pretty much Greek to me. I would not know how to create a command prompt for a program. I know how to access the Command Prompt, but beyond that, I am pretty much lost. In the scripting do I include the "@Echo Off" or not. Not sure how to go about this. Currently I have 6 docked items, and when I close and reopen, the 2 latest ones are barely visible. I have to place them again, size everything again, and it gets to be a pain. Locking the UI does not help at all.
So sorry for the months long delay in responding; I missed the notification and you were the first.

1. You don't have to create command prompt for a program, what you do is create a shortcut to the cmd file on your desktop. I will explain how to do that in bullet 3 because I want you to read bullet 2 first.

2. You can copy and paste the 2 scripts in my original message into Notepad and then do a Save As and name them as you like but I suggest 1 of them be OBS_Default.cmd to represent the true default configuration. My names were based on their purpose (OBS_Default and OBS_ForDemo.cmd). Maybe your name would be OBS_Show6Docks.cmd.

Also, don't forget to create you own .ini files by following the directions in the original post and then referencing them in the copy line of the cmd files. All this process really is, is a way to update the global.ini file to meet your needs prior to the application starting.

3. To create the shortcut, open Windows Explorer (file cabinet) and go to where ever you saved the above 2 cmd files. Right click on them and near the bottom of the popup menu you should see Create Shortcut. You can then move those shortcuts to your desktop. Then click on the corresponding shortcut for the type of configuration you want.
 

hlc

New Member
Ignore the last message from me. I added more clarity but ran out of time during editing so it blocked me from making the change to the original post:


This is pretty much Greek to me. I would not know how to create a command prompt for a program. I know how to access the Command Prompt, but beyond that, I am pretty much lost. In the scripting do I include the "@Echo Off" or not. Not sure how to go about this. Currently I have 6 docked items, and when I close and reopen, the 2 latest ones are barely visible. I have to place them again, size everything again, and it gets to be a pain. Locking the UI does not help at all.
So sorry for the months long delay in responding; I missed the notification and you were the first.

1. You don't have to create command prompt for a program, what you do is create a shortcut to the cmd file on your desktop. I will explain how to do that in bullet 3 because I want you to read bullet 2 first.

2. You can copy and paste the 2 scripts in my original message into Notepad and then do a Save As and name them as you like but I suggest 1 of them be OBS_Default.cmd to represent the true default configuration. My names were based on their purpose (OBS_Default and OBS_ForDemo.cmd). Maybe your name would be OBS_Show6Docks.cmd.

Also, don't forget to create you own .ini files by following the directions in the original post. They should be stored here: C:\Users\[your user name]\AppData\Roaming\obs-studio.

Then referencing them in the "copy" line of the cmd files. All this process really is, is a way to update the global.ini file to meet your needs prior to the application starting.

Assuming that you aren't familiar with writing CMD files, what that cmd file does is:
@Echo Off [ Hides what's going on from the interface so that it executes silently. This is optional ]
CD C:\Users\[your user name]\AppData\Roaming\obs-studio [ Change to the directory where the global.ini file resides. This is also where you should store your specific ini files ]
Copy global-NoDocksForDemos.ini global.ini [ Overwrite the global.ini file that OBS uses with the one that is configured to meet your needs ]
CD "C:\Program Files\obs-studio\bin\64bit" [ Change to the directory where the OBS executable is ]
START "" "C:\Program Files\obs-studio\bin\64bit\obs64.exe" [ Start OBS while also closing the CMD file ]

So what you end up with is 2 or more shortcuts with their own ini files. When you double click the shortcut, your specific config file (ini) will overwrite the one that OBS uses and then immediately launch OBS.

3. To create the shortcut, open Windows Explorer (file cabinet) and go to where ever you saved the above 2 cmd files. Right click on them and near the bottom of the popup menu you should see Create Shortcut. You can then move those shortcuts to your desktop. Then click on the corresponding shortcut for the type of configuration you want.

For me, when I click my OBS_Default shortcut, I get an interface with the Scenes, Sources, Audio Mixer and Control Docks at the bottom. When I click my OBS_ForDemo shortcut, I get an interface where there are no Docks displayed at all.
 

hlc

New Member
Screens shots of my OBS interface for the corresponding scenarios.
 

Attachments

  • OBS_w_Docks.png
    OBS_w_Docks.png
    61.1 KB · Views: 230
  • OBS_wo_Docks.png
    OBS_wo_Docks.png
    13.3 KB · Views: 230

GregPeatfield

New Member
Another options for this in the mean time is to create "Portable" versions of OBS, use different instances for different purposes. You can have different plugins and assets (lower 3rds etc) for each instance. Nutty has a great and simple explanation for how to do this:
 

DrasticMeasures

New Member
I found another solution based on what you all have been saying up there..^^ This works with obs 28. Not sure about older versions.

Since someone mentioned that it saved the dock locations if you had a streaming account linked, I tried some things. This method basically fools obs into thinking a youtube account is linked, but it's not accessible, so no risk of accidentally streaming.

Just paste this into the ini file while you have another profile selected. After saving the file and switching back to the profile you just edited, it should pop up with a youtube chat box and subsequently remember the dock positions whenever you switch to that profile.

[YouTube]
ChannelName=Dummy Account
RefreshToken=1
Token=
ExpireTime=1667585648
ScopeVer=1

[Auth]
Type=YouTube - RTMP
You might need to remove some other auto-filled settings from the ini file like the rtmp, rtmps, and anything that looks like the same thing as what I'm having you paste, but with different settings.

Hope it helps someone!
 
Last edited:
Top