Replies: 1 comment
-
seems import { OBSWebSocket } from "obs-websocket-js";
import fs from "fs";
const response = await obs.call("GetSourceScreenshot", {
sourceName: "Testing",
imageFormat: "png",
});
const buffer = Buffer.from(
response.imageData.split("base64,")[1], // remove data URI
"base64"
);
fs.writeFileSync(`C:\test\screenshot.png`, buffer); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to use the SaveSourceScreenshot but it keeps giving me a 702 error.
Could anyone point me in the right direction? I know I am connecting to the websocket fine and I ahve been able to get other calls to work but I seem to be doing something wrong here. Here is the documentation https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#savesourcescreenshot . This is JS.
Heres my code,
Beta Was this translation helpful? Give feedback.
All reactions