<p>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 <code>cvlc</code> to <code>echo</code>.</p>

CC BY-SA 4.0
2018-08-01T12:06:19.680Z
2018-08-01T12:06:19.680Z
Coderer
<p>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.</p>

<p>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.</p>

<p>Here's the working rtsp command:</p>

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

<p>Here's the working livehttp command:</p>

<pre><code>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></pre>

<p>Here's a working command that creates two rtsp streams:</p>

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

<p>Here's the non-working combined, rtsp and livehttp command:</p>

<pre><code>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
</code></pre>

<p>I don't get any streams and I get a multitude of these errors:</p>

<pre><code>[0xca4540] access_output_livehttp access out error: cannot open `-treaming_video_folder/stream-001.ts' (No such file or directory)
</code></pre>

<p>For some reason, the previously working variable name, $streaming_video_folder, has been transformed to the erroneous, -treaming_video_folder.</p>

<p>Can someone tell me the proper syntax for the combined command ? Thank you in advance.</p>

<streaming><vlc>
how to simultaneously create rtsp and livehttp video streams in vlc from the same live source?
NewtownGuy
# how to simultaneously create rtsp and livehttp video streams in vlc from the same live source?

(Asked by: username_0 on 2018-05-30)

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.

**Tags:** streaming, vlc


---

## 1 answers

### Answer by username_1 on 2018-08-01. Score: 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`.


---

