Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetRecordingFolder not working #332

Closed
abenmohamed opened this issue Jun 20, 2023 · 1 comment
Closed

SetRecordingFolder not working #332

abenmohamed opened this issue Jun 20, 2023 · 1 comment

Comments

@abenmohamed
Copy link

Hi,
I'm currently facing an issue while attempting to set the recording folder using the OBS WebSocket API. I'm receiving the following error message: OBSWebSocketError: Your request type is not valid.

According to the documentation, the SetRecordDirectory method was introduced in version v5.3.0 of obs-websocket. However, the latest available version of obs-websocket is 5.2.3, which does not include this method.

I have also tried using the GetRecordDirectory method, but it does not return the desired value for my use case. Specifically, I need to retrieve the URL when using Custom Output (Ffmpeg) with the output type set to "Output to URL". Currently, the method only returns the value when the output type is set to "Output to File".

Note:
Since the latest version of obs-websocket (5.2.3) does not include the SetRecordDirectory method, I would appreciate any guidance or suggestions for a workaround to achieve my desired outcome of setting the recording folder with the specified output type.

@SpaceBod
Copy link

@abenmohamed , 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"

Similarly you can change the output type. You can change these variables:

[SimpleOutput]
FilePath="path goes here"
RecFormat2=mkv
VBitrate=2500
ABitrate=160
UseAdvanced=false
Preset=veryfast
NVENCPreset2=p5
RecQuality=Small
RecRB=false
RecRBTime=20
RecRBSize=512
RecRBPrefix=Replay
StreamAudioEncoder=aac
RecAudioEncoder=aac
RecTracks=1
StreamEncoder=nvenc
RecEncoder=nvenc

@t2t2 t2t2 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants