title: Stream video to VM as virtual camera input using gstreamer
body: <p>I stream my camera from a PC to a remote VM using VLC.</p>
  
  <p><code>cvlc v4l2:///dev/video0 :live-caching=300 :sout="#transcode{vcodec=FLV1,scale=0.75,vb=128,acodec=none}:http{dst=:8080/stream.wmv}"</code></p>
  
  <p>I can see the camera from the VM with port forwarding (<code>ssh -C -X -p 22 user@83.*.*.* -R 8080:localhost:80</code>) and with this command:</p>
  
  <p><code>wget http://13.*.*.*:8080/stream.wmv -O - | mplayer mplayer -cache 8192 -</code></p>
  
  <p>I would like to take that stream and send it to a virtual camera, lets say /dev/video9. This virtual camera should be readable from Skype.
  For the virtual camera I use v4l2loopback. In order to receive the stream I use gstreamer and mjpegtools_yuv_to_v4l.</p>
  
  <p>I have read from 
  [How can I use vloopback mjpeg pipe without WebcamStudio][1]
  something like this:</p>
  
  <p><code>gst-launch-1.0 souphttpsrc location=http://13*.*.*.*:8080/stream.wmv ! decodebin ! y4menc ! filesink location=output.yuv &amp; cat output.yuv | mjpegtools_yuv_to_v4l /dev/video9</code></p>
  
  <p>but I get errors like </p>
  
  <p>sfdemux0: Could not demultiplex stream.
  Additional debug info:
  EOF in read stream header, stop.</p>
  
  <p>Thank you.</p>