Relative File Paths

ad1562

New Member
Dear Developers:

I wonder if it's possible to include in future versions the option of using file paths that are relative to the installation directory of OBS a la HTML.

I'm thinking of a specific use-case wherein a portable version of OBS is installed to a cloud service, e.g. Google Drive (or even a Pen Drive), for use on multiple machines. Because the local drive and/or path of one's Google Drive files will vary from machine to machine, relative paths would allow for seamless changeovers from one machine to another. At present, whenever I need to use my cloud-based copy of OBS on a different machine, I must go through the pain-staking process of re-locating every image file, video file, browser source, script file, etc.

If for whatever reason this feature is not feasible, can anyone suggest a work-around for the issue outlined above? Thanks for a great product!

Alex
 

tensor

New Member
It's been a long time, but I remembered that somehow you can map a folder to disk letter. This worked for me:

net use M: \\localhost\D$\OBS\Media

If I do this on both computers then all my media sources can be based on M:\

I was also thinking of mapping O: just the top level OBS directory where the portable OBS is located.

YMMV
 

ad1562

New Member
Dear Developers:

I wonder if it's possible to include in future versions the option of using file paths that are relative to the installation directory of OBS a la HTML.

I'm thinking of a specific use-case wherein a portable version of OBS is installed to a cloud service, e.g. Google Drive (or even a Pen Drive), for use on multiple machines. Because the local drive and/or path of one's Google Drive files will vary from machine to machine, relative paths would allow for seamless changeovers from one machine to another. At present, whenever I need to use my cloud-based copy of OBS on a different machine, I must go through the pain-staking process of re-locating every image file, video file, browser source, script file, etc.

If for whatever reason this feature is not feasible, can anyone suggest a work-around for the issue outlined above? Thanks for a great product!

Alex

I also have this exact issue.

[UPDATE] Found a Windows-based workaround using mklink to create a directory junction which may help others to use portable OBS more seamlessly across multiple PCs - provided you have admin privileges on those PCs. With this solution you will still need to have a unique profile for each PC with streaming and recording settings, but you will be able to use the same scene collections and any path dependent elements within the same.

1. I would recommend that you keep a basic folder structure similar to the following for your portable OBS installation and the sources that you use within. This can be kept on a pen drive or uploaded to a cloud service:
Code:
[[For this example]]
\obs-studio-and-sources
    \obs-studio
    \sources-images
    \sources-browser

2. Choose a common drive, path and folder name to use on every PC that you use with OBS when creating the directory junction - the directory should not exist, we will create it below. For this example I'll be using C:\Program Files\obs-portable\. Note: most typical Windows installations will have the C:\Program Files\ system folder, feel free to name the directory junction whatever you want.

3. Download or make a local copy of the obs-studio-and-sources mentioned in Step 1 on the PC you'll be using, and make a note of the FULL path of that folder. For this example, C:\Users\Fungi\Desktop\obs-studio-and-sources

4. Creating the directory junction.
4.1. Open a Command Prompt window using Run as administrator
4.2. Type mklink /J "C:\Program Files\obs-portable\" "C:\Users\Fungi\Desktop\obs-studio-and-sources\"
Note: The directory junction is essentially a mirror of whatever folder it targets

5. The very first time you do this, make sure to browse to all path-dependent items within your portable OBS (i.e. images, videos, music, media, scripts, shaders, etc) through the directory junction from Step 4, then save and update your portable OBS copy (i.e. overwrite the copy on the cloud or pen drive with the local copy that uses the directory junction paths).

For example, let's say we have an an image source on a scene using an image file that's located in C:\Users\Fungi\Desktop\obs-studio-and-sources\sources-images\image.jpg, open the image source properties click browse and navigate to the image file via the directory junction instead C:\Program Files\obs-portable\sources-images\image.jpg.

Not an ideal solution, but it works... hope this helps.
 
Top