I need to play multiple video for test a video server. I'm using lubuntu 14.04 and have installed V4l2loopback to make the device file ( /dev/videoN )
I am using mplayer to play video from this device as described mplayer cam
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.
Do you have some idea to do this? There is some particular pixelformat to define in examples/yuv4mpeg_to_v4l2.c ?
.....
I'm trying to find the problem using direct access to the resource with this script:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Test rtc</title>
<script type="text/javascript" charset="utf-8">
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");
}
</script>
</head>
<body>
<video>
</body>
</html>
The video constraingts are take from mplayer output:
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 => 640x360 Planar YV12
But the problem persists: "The following error occured: Starting video failed"..
The video is correctly played and visible both with xawtv and with flashplayer.