# OBS Websockets "SendCaptions" doesn't work on Vimeo, but works with Twitch, YouTube, Wowza... ?



## adamborecki (Oct 24, 2020)

Howdy folks,

I'm using OBS Websockets and a custom javascript API that sends captions with the SendCaptions event to embed 608 captions

It works great in Twitch, Youtube and Wowza Cloud. But, I have not been able to get it to work with Vimeo Premium

Vimeo's support says it's possible: https://vimeo.zendesk.com/hc/en-us/articles/360040732851-Captioning-for-live-videos

Any ideas?

I noticed that Wowza reports the subtitles as "unknown cc", so maybe there's an issue with OBS not defining the language?

Or maybe the issue is with the obs_output_output_caption_text2 function that OBS is using?

It should be possible, especially judging from other websites that advertise live captioning to Vimeo.

Best,
-Adam

_(Note: In the Log file, look for *line 6353* for an example of a SendCaption request. I don't really know if the "messageid" needs to be unique, I've tested it out in the past using Wowza cloud with an empty string as the message id and it seems to work just fine. I.e., I can repeatedly send the message id "" with the caption "Subtitles are enabled for this live stream" and it shows the caption every time._


----------



## ContentDeveloper (Dec 13, 2020)

Can you share more on how/what you are doing, such as info on the “custom Javascript API”?

I am also trying to utilize captioning, and getting frustrated with not seeing much work.

Any idea as to which file the captions get “embedded” into?


----------



## adamborecki (Dec 14, 2020)

The code is pretty sloppy, so I won't share all of it, but the part that I think would be interesting to you is the bit where I connect a websocket to the obswebsockets plugin and send a caption message.

(FYI, I got this program to successfully work with YouTube and Twitch, but never with vimeo   )

have a look:


```
obsSocket = new WebSocket("ws://localhost:4444");

    obsSocket.onopen = function (event) {
        console.log("obsSocket successfully opened up!");
    //exampleSocket.send("Here's some text that the server is urgently awaiting!");
    };

    obsSocket.onmessage = function (event) {
        var result = JSON.parse(event.data)
        if(result["update-type"] == "Heartbeat" || result["update-type"] == "StreamStatus" || result["update-type"] == "SceneItemTransformChanged"){
            return;
        }
        console.log(result)
    }

    last_message_id = 0;

    function send_cap(filename,seq,caption){
        console.log("send_cap",filename,seq,caption);

        last_message_id++;

        var msg = {
            "request-type": "SendCaptions",
            "message-id": ""+(last_message_id+Date.now()),
            "text": caption.cap
            };

        // Send the msg object as a JSON-formatted string.
        obsSocket.send(JSON.stringify(msg));

    }
```


----------



## RogerA (Dec 17, 2020)

I have been trying to get Web Captioner and the Google Speech plug in from RatWithACompiler and having similar results.   I believe the OBS SendCaptions isn't properly defining what it's putting into the stream.


----------



## chrislim (Feb 19, 2021)

adamborecki said:


> Howdy folks,
> 
> I'm using OBS Websockets and a custom javascript API that sends captions with the SendCaptions event to embed 608 captions
> 
> ...



Maybe it's somewhere in this function?








						obs-studio/obs-output.c at master · obsproject/obs-studio
					

OBS Studio - Free and open source software for live streaming and screen recording - obs-studio/obs-output.c at master · obsproject/obs-studio




					github.com
				




Also, I got OBS to output captions to Twitch, but in YouTube, it shows up in the upper part of the video--were you able to see the captions in the lower third?


----------



## RogerA (Feb 23, 2021)

This is an ongoing issue with OBS.   The captions were developed for Twitch but never tested and debugged for other platforms.   If someone understands 608 captions they might be able to fix that issue and compile a custom OBS but that is outside of my skillset


----------



## chrislim (Feb 26, 2021)

I found this article that might have the details we need to know. I'm not an expert either, but wanted to post it here as a resource: https://www.adobe.com/content/dam/acom/en/devnet/video/pdfs/introduction_to_closed_captions.pdf


----------

