obsproject / obs-websocket

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

How to Set record directory folder #1142

Closed LuchunPen closed 1 year ago

LuchunPen commented 1 year ago

Feature Request Type

RPC Request

Feature Request Type (Other)

No response

Requested Feature

Hello ! I want to create some cuts of video and set it in different directories. Ho could I set record directory by API ? There is only GerRecordDirectory().

Thanks

Requested Feature Usage Scenario

No

dhruv-prajapati commented 1 year ago

@tt2468 When we can expect this feature to go live?

SpaceBod commented 11 months ago

@dhruv-prajapati, in case you still need a solution:

Since OBS Studio currently doesn't have v5.3.0 implemented, you can't use SetRecordDirectory, you can use the old method's SetProfileParameter:

This is for JavaScript

// Sets a new recording path
obs.call('SetProfileParameter', { 'parameterCategory': 'SimpleOutput', 'parameterName': 'FilePath', 'parameterValue': selectedFolderPath })

// Prints the now changed values
obs.call('GetProfileParameter', { 'parameterCategory': 'SimpleOutput', 'parameterName': 'FilePath' })
    .then(result => {
        console.log('Result:', result);
    })
    .catch(error => {
        console.error('Error:', error);
    });

What worked for me was setting: parameterCategory -> "SimpleOutput" parameterName -> "FilePath"

LuchunPen commented 11 months ago

Amazing! I really glad to see that, thanks :)