websocat
websocat copied to clipboard
handshake with text and then pipe binary output to ffmpeg
Hello! Thanx for the great tool!
I have a question. I have following scenario to do:
- open wss connection
- send 'hello' text to socket
- receive some text from socket
- send 'start' text to socket
- start receiving binary data from socket and need to pipe this to FFmpeg
I tried all possible combinations ) but no luck. one message to socket work ok, but two is not working (
is it possible to achieve at all?
You can have full control over text and binary WebSocket message by using --binary-prefix
, --text-prefix
and --base64
options.
You'll need strip the output from binary prefixes and filter the output though something like perl -pe 'use MIME::Base64; $_=decode_base64($_);'
with --base64
though, prior to feeding it to FFmpeg.
You there is a publicly available endpoint that I can try myself, I can construct a command line for you.