title: Use an IP-camera with webRTC
body: <p>I want to use an IP camera with webrtc. However webrtc seems to support only webcams. So I try to convert the IP camera's stream to a virtual webcam.</p>
  
  <p>I found software like <a href="http://ip-webcam.appspot.com/" rel="noreferrer">IP Camera Adapter</a>, but they don't work well (2-3 frames per second and delay of 2 seconds) and they work only on Windows, I prefer use Linux (if possible).</p>
  
  <p>I try ffmpeg/avconv:</p>
  
  <ul>
  <li><p>firstly, I created a virtual device with <a href="https://github.com/umlaeute/v4l2loopback/" rel="noreferrer">v4l2loopback</a> (the command was: <code>sudo modprobe v4l2loopback</code>). The virtual device is detected and can be feed with a video (.avi) with a command like:  <code>ffmpeg -re -i testsrc.avi -f v4l2 /dev/video1</code></p></li>
  <li><p>the stream from the IP camera is available with: <code>rtsp://IP/play2.sdp</code> for a Dlink DCS-5222L camera. This stream can be captured by ffmpeg.</p></li>
  </ul>
  
  <p>My problem is to make the link between these two steps (receive the rstp stream and write it to the virtual webcam). I tried <code>ffmpeg -re -i rtsp://192.168.1.16/play2.sdp -f video4linux2 -input_format mjpeg -i /dev/video0</code> but there is an error with v4l2 (v4l2 not found).</p>
  
  <p>Does anyones has an idea how to use an IP camera with webRTC?</p>