title: Dummy video device - v4l2loopback - webRTC
body: <p>I need to play multiple video for test a video server. I'm using lubuntu 14.04 and have installed <a href="https://github.com/umlaeute/v4l2loopback" rel="nofollow">V4l2loopback</a> to make the device file ( /dev/videoN )</p>
  
  <p>I am using mplayer to play video from this device as described <a href="https://github.com/umlaeute/v4l2loopback/wiki/Mplayer" rel="nofollow">mplayer cam</a></p>
  
  <p>I have done the modify to the source code and successfully played the video and viewed with xawtv and with flashplayer (on firefox 28). I have tried to view with webRtc but it can't work.</p>
  
  <p>Do you have some idea to do this? There is some particular pixelformat to define in examples/yuv4mpeg_to_v4l2.c ?</p>
  
  <p>.....</p>
  
  <p>I'm trying to find the problem using direct access to the resource with this script:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;
  
      &lt;title&gt;Test rtc&lt;/title&gt;
      &lt;script type="text/javascript" charset="utf-8"&gt;
  
      navigator.getUserMedia = 
      ( 
          navigator.getUserMedia ||
          navigator.webkitGetUserMedia ||
          navigator.mozGetUserMedia ||
          navigator.msGetUserMedia
      );
  
      var constraints = 
      {
          audio: true,
          video:true,
          video: 
          {               
              mandatory: 
              {
                minWidth: 640,
                minHeight: 360
              }
          }
      };
  
      if( navigator.getUserMedia ) 
      {
          navigator.getUserMedia(
  
              // constraints
              constraints ,
  
              // successCallback
              function(localMediaStream) 
              {
  
                  var video = document.querySelector('video');
                  video.src = window.URL.createObjectURL(localMediaStream);
  
                  video.play();
  
                  console.log( video );
                  console.log( localMediaStream );
              },
  
              // errorCallback
              function(err) 
              {
                  console.log("The following error occured: " + err);
              }
          );
      } 
      else 
      {
          console.log("getUserMedia not supported");
      }
  
      &lt;/script&gt;
  
  &lt;/head&gt; 
  &lt;body&gt;
      &lt;video&gt;   
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>The video constraingts are take from mplayer output:</p>
  
  <pre><code>VIDEO:  640x360  25.000 fps  555.0 kbps (69.4 kB/s)
  [swscaler @ 0x7f83633f3640]BICUBIC scaler, from yuv420p to yuv420p using MMXEXT
  VO: [yuv4mpeg] 480x360 =&gt; 640x360 Planar YV12 
  </code></pre>
  
  <p>But the problem persists: "The following error occured: Starting video failed"..</p>
  
  <p>The video is correctly played and visible both with xawtv and with flashplayer.</p>