2

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. 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:

cvlc -vvv stream:///home/vout1 --sout '#rtp{sdp=rtsp://:8554/}' --demux=h264 --h264-fps=$fps

Here's the working livehttp command:

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

Here's a working command that creates two rtsp streams:

cvlc -vvv stream:///home/vout1 --sout '#duplicate{dst=rtp{sdp=rtsp://:8554/},dst=rtp{sdp=rtsp://:9554/}}' :demux=h264 :h264-fps=$fps

Here's the non-working combined, rtsp and livehttp command:

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

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.

0

Your working livehttp command has double quotes, and your non-working duplicate command has single quotes. Your shell is interpolating the variables in the double-quote example but passing them as a string literal in the latter case. You can see what the shell is doing by changing cvlc to echo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.