mpv
mpv copied to clipboard
Is this the proper way to stop stream recording via IPC?
Hi.
Supposing this stream playing:
mpv http://s1.myradiostream.com:12508/listen.mp3 --input-ipc-server=/tmp/mpvsocket
and this record starting via IPC:
echo '{ "command": ["set_property_string", "stream-record", "/home/user/record.mp3"] }' | socat - /tmp/mpvsocket
{"request_id":0,"error":"success"}
is this below the correct way to stop the recording?
echo '{ "command": ["set_property_string", "stream-record", ""] }' | socat - /tmp/mpvsocket
{"request_id":0,"error":"success"}
cheers
I do not think so. What you could do is stop the playback (that would stop the recording).
FWIW, I can't test this now, but stopping might indeed work, so you could try to send this command:
echo '{ "command": ["stop"] }' | socat - /tmp/mpvsocket