# Changing File Destination via Plugin



## astonish (Jan 8, 2014)

Context: I'm working on a project that records a bunch of real-time data from a number of proprietary sources using a number of tools we wrote. One portion of this set of data we wish to record is a video feed of the user's display during training. Untouched OBS fits the bill out of the box and so far performs perfectly.

We only need to customize two things: being able to start and stop OBS remotely and change the destination the recordings go to.  I originally looked into OBSRemote and, although it is great, for a number of reasons we are going to write our own plugin to do this.

The start/stop functionality seems trivial, but handling the destination filename seems a little more difficult.  

Snooping around it seems clear that in _OBSCapture.cpp_ in the _void OBS::StartRecording()_ function there is a simple pull from the AppConfig global variable.  Simply placing the correct filename I wish to record to using _AppConfig->SetString(TEXT("Publish"), TEXT("SavePath"), TEXT("C:\\MyExampleFilename.mp4"));_ before the StartStopStream would do the trick, but I'm not sure this structure is available to plugins in a safe manner.

I'd prefer to do this with my simple plug-in code rather than having to touch the OBS source itself and push a new patch for a feature nobody else likely needs... Any advice?


----------



## Shader (Feb 28, 2014)

Hi:

I just submitted to Jim consideration this feature.
See viewtopic.php?f=21&t=12137

Shader.


----------

