-
Notifications
You must be signed in to change notification settings - Fork 538
Mplayer
again a dummy producer, using gstreamer
gst-launch -v videotestsrc ! "video/x-raw-yuv,width=640,height=360,framerate=30/1,format=(fourcc)I420" ! v4l2sink device=/dev/video1
minimal mplayer playback
mplayer tv:// -tv device=/dev/video1
It seems like MPlayer's "v4l2" output module is really only meant for MPEG-decoders. It doesn't support uncompressed video, which is what v4l2loopback is using.
In order to feed the loopback device with MPlayer's "yuv4mpeg" output module, you will need an intermediate program, that pushes the yuv4mpeg stream into the v4l2 device.
An example for such a module can be found in the examples/
directory; it's called yuv4mpeg_to_v4l2
and is courtesy by Eric Cooper.
mkfifo /tmp/pipe
./yuv4mpeg_to_v4l2 < /tmp/pipe &
mplayer movie.mp4 -vo yuv4mpeg:file=/tmp/pipe
To make it work with flash webcam you have to change in the examples/yuv4mpeg_to_v4l2.c
the line
v.fmt.pix.pixelformat = V4L2_PIX_FMT_YUV420;
to
v.fmt.pix.pixelformat = V4L2_PIX_FMT_YVU420;
and then use the producer above (mplayer with yuv4mpeg).
This was mentioned in https://github.com/umlaeute/v4l2loopback/issues/8