obsproject / obs-websocket

Remote-control of OBS Studio through WebSocket
GNU General Public License v2.0
3.84k stars 704 forks source link

Feature Request: Re-add support for SetRecordingFolder, SetFileNameFormatting #1062

Closed acstark92 closed 1 year ago

acstark92 commented 1 year ago

Feature Request Type

RPC Request

Feature Request Type (Other)

No response

Requested Feature

obs-websocket version 4.9.1 contained support for setting the folder for saved video recordings, as well as support for setting the filename of said video. As of 5.0.0, this support seems to no longer be available.

Requested Feature Usage Scenario

As part of an automated test, I want to record my game and save those recordings off to dynamic locations for later validation. I would have a pipeline that calls obs-websocket to set the file location and filename, then start and stop recording.

DoubleF3lix commented 1 year ago

I'm proud to report that this works (in obsws-python) for SetFileNameFormatting:

connection.get_profile_parameter("Output", "FilenameFormatting").parameter_value
connection.set_profile_parameter("Output", "FilenameFormatting", "My File Name")
hendryman commented 1 year ago

+1 for setting folder names via script. Is there any update on that?

minorDeveloper commented 1 year ago

@acstark92, your request for setting filename formatting is possible with a request as shown below:

{"op": 6, "d":{"requestType": "SetProfileParameter", "requestId": "UUID", "requestData": {"parameterCategory": "Output", "parameterName": "FilenameFormatting", "parameterValue": "Test"}}}

However, I haven't been able to figure out the parameter name and category for setting the recording location, and in general the SetProfileParameter doesn't seem to be particularly well documented.

Qualzz commented 5 months ago

For anyone looking for it:

cl.set_profile_parameter("SimpleOutput", "FilePath", recording_path)
value = cl.get_profile_parameter("SimpleOutput", "FilePath").parameter_value
print(value)