title: VLC RTSP stream of two input video streams - command line problems
body: <p>I'm trying to create an <strong>overlay of two security camera</strong> views onto one video stream, and streaming it out as <strong>RTSP</strong> protocol. There are two IP camera streams on input, and only one video stream combining both views in overlay - as output.</p>
  
  <p>To create overlay effect and to stream video out, I use <strong>VLC player v3.0.6</strong> on Windows 10. I run it from command line to setup everything (correct overlay, accepting input streams and creating output stream). I can receive my inputs and create overlay, and then either display it on screen, or stream it out using http protocol. <strong>HTTP steam works great</strong>, I can open it on another computer and watch it. Hovewer I cannot change output from HTTP to RTSP and make it work.</p>
  
  <p>This is a VLM config file, setting inputs and outputs. This one outputs HTTP stream.</p>
  
  <pre><code>del all
  
  new channel1 broadcast enabled                                                  
  setup channel1 input rtsp://xxx:xxx@192.168.xx.xx/profile2/media.smp
  setup channel1 output #duplicate{dst=mosaic-bridge{id=1,height=720},select=video}                                                                                                                                                                                         
  
  new channel2 broadcast enabled 
  setup channel2 input rtsp://xxx:xxx@192.168.x.x/profile2/media.smp
  setup channel2 output #duplicate{dst=mosaic-bridge{id=4,height=340},select=video}        
  
  new background broadcast enabled
  setup background input "file:///C:\Program Files\VideoLAN\VLC\pic.jpg"
  setup background option image-duration=-1
  setup background option image-fps=10
  setup background option mosaic-width=1280
  setup background option mosaic-height=720
  setup background option mosaic-keep-picture=1   
  
  
  setup background output #transcode{sfilter=mosaic,vcodec=mpeg,vb=2000,fps=10}:bridge-in{delay=0,id-offset=0}:standard{access=http,mux=ogg,dst=192.168.xx.xx:18554}
  
  control channel1 play
  control channel2 play
  control background play 
  </code></pre>
  
  <p>To run it, I call VLC using this command:</p>
  
  <pre><code>vlc "--vlm-conf=C:\Projekty\mosaic\mosaic4.vlm" "--clock-jitter=0" "--mosaic-width=1280" "--mosaic-height=720" "--mosaic-keep-picture" "--mosaic-row=2" "--mosaic-cols=2" "--mosaic-position=1" "--mosaic-order=1,2,3,4" "--ttl=12" "--udp-caching=800" --verbose=2
  </code></pre>
  
  <p>It sets the mosaic view and resolution. </p>
  
  <p>Now, the problem lies in the VLM file, when setting output. I use :standard module for output, but this module doesn't support RTSP. </p>
  
  <p>Ok, let's try and let VLC configure everything for me. There is option of streaming using regular VLC GUI. You choose what to steam (file/your screen/single input stream), then you choose output format, and that's it. At the end of process, VLC even shows you the commands it uses to stream. It looks like this:</p>
  
  <pre><code>:sout=#transcode{vcodec=h264,vb=56,venc=x264{profile=baseline},fps=12,scale=Automaticky,width=176,height=144,acodec=mp3,ab=24,channels=1,samplerate=44100,scodec=none}:rtp{sdp=rtsp://:8554/} :no-sout-all :sout-keep
  </code></pre>
  
  <p>It's a bunch of video transcoding settings, and then the output - <strong>:rtp{sdp=rtsp://:8554/}</strong> . But it works great, the other side receives working RTSP stream.</p>
  
  <p>Naturally, I try to replace my :standard(http) module with this :rtp setting, but for some reason, it just doesn't work - the other side can't open stream.</p>
  
  <pre><code>setup background output #transcode{sfilter=mosaic,vcodec=mpeg,vb=2000,fps=10}:bridge-in{delay=0,id-offset=0}:rtp{sdp=rtsp://:8554/} :no-sout-all :sout-keep
  </code></pre>
  
  <p>Any suggestions? I can receive my streams, I can merge them together, I just can't get them out. VLC documentation doesn't help much at this point.</p>
  
  <p>Any help would be greatly appreciated.</p>