how to simultaneously create rtsp and livehttp video streams in cvlc from the same live source?
Posted: 01 Jun 2018 02:18
I want to simultaneously create rtsp and livehttp video streams from the same live H.264 source in cvlc. I can individually create either kind of stream just fine, and I can also create two rtsp streams simultaneously using the 'duplicate' tag, so my basic setup is right. However, something is wrong when I try to do the two kinds of streams at the same time in a single command.
This runs in linux and the commands are written in bash. My frame rate, $fps, is 10 fps. /home/vout1 is my live H.264 source. Folders and the server URL are defined by variables. Note that I had to add dst= when I went from the single command to the combined command.
Here's the working rtsp command:
Here's the working livehttp command:
Here's a working command that creates two rtsp streams:
Here's the non-working combined, rtsp and livehttp command:
I don't get any streams and I get a multitude of these errors:
[0xca4540] access_output_livehttp access out error: cannot open `-treaming_video_folder/stream-001.ts' (No such file or directory)
For some reason, the previously working variable name, $streaming_video_folder, has been transformed to the erroneous, -treaming_video_folder.
Can someone tell me the proper syntax for the combined command ? Thank you in advance.
This runs in linux and the commands are written in bash. My frame rate, $fps, is 10 fps. /home/vout1 is my live H.264 source. Folders and the server URL are defined by variables. Note that I had to add dst= when I went from the single command to the combined command.
Here's the working rtsp command:
Code: Select all
cvlc -vvv stream:///home/vout1 --sout '#rtp{sdp=rtsp://:8554/}' --demux=h264 --h264-fps=$fps
Code: Select all
cvlc -vvv stream:///home/vout1 --sout "#standard{access=livehttp{seglen=5,delsegs=true,numsegs=2,index=$streaming_video_folder/stream.m3u8,index-url=$server_URL/stream-###.ts},mux=ts{use-key-frames},dst=$streaming_video_folder/stream-###.ts}}" --h264-fps=$fps --demux=h264
Code: Select all
cvlc -vvv stream:///home/vout1 --sout '#duplicate{dst=rtp{sdp=rtsp://:8554/},dst=rtp{sdp=rtsp://:9554/}}' :demux=h264 :h264-fps=$fps
Code: Select all
cvlc -vvv stream:///home/vout1 --sout '#duplicate{dst=rtp{sdp=rtsp://:8554/},dst=standard{access=livehttp{seglen=5,delsegs=true,numsegs=2,index=$streaming_video_folder/stream.m3u8,index-url=$server_url/stream-###.ts},mux=ts{use-key-frames},dst=$streaming_video_folder/stream-###.ts}}' :demux=h264 :h264-fps=$fps
[0xca4540] access_output_livehttp access out error: cannot open `-treaming_video_folder/stream-001.ts' (No such file or directory)
For some reason, the previously working variable name, $streaming_video_folder, has been transformed to the erroneous, -treaming_video_folder.
Can someone tell me the proper syntax for the combined command ? Thank you in advance.