Hi,
I try to use gstreamer to use the internal cam of my n900 as a webcam, this is
my setup:
* on the n900 I'm running:
gst-launch v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! smokeenc ! \
udpsink host=$DESKTOP_HOST port=$PORT
* on my desktop:
gst-launch udpsrc port=$PORT ! smokedec ! v4l2sink device=/dev/video0
/dev/video0 is the v4l2loopback device.
I'm using the v4l2loopback 0.3.1-1 package from ubuntu natty.
% LANG=C gst-launch -vvvv udpsrc port=$PORT ! smokedec ! v4l2sink
device=/dev/video0
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstSmokeDec:smokedec0.GstPad:src: caps =
video/x-raw-yuv, format=(fourcc)I420, width=(int)320, height=(int)240,
framerate=(fraction)2993/100
** (gst-launch-0.10:4842): CRITICAL **: gst_v4l2sink_sync_overlay_fields:
assertion `v4l2_ioctl (fd, VIDIOC_G_FMT, &format) >= 0' failed
/GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0.GstPad:sink: caps =
video/x-raw-yuv, format=(fourcc)I420, width=(int)320, height=(int)240,
framerate=(fraction)2993/100
And when using mplayer on /dev/video0 I get:
% mplayer -fps 15 tv:// -tv driver=v4l2:device=/dev/video0
MPlayer 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing tv://.
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come ;-)
Selected device: Dummy video device
Capabilites: video capture video output read/write streaming
supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR; 4 = NTSC-443; 5 = PAL; 6 = PAL-BG; 7 = PAL-H; 8 = PAL-I; 9 = PAL-DK; 10 = PAL-M; 11 = PAL-N; 12 = PAL-Nc; 13 = PAL-60; 14 = SECAM; 15 = SECAM-B; 16 = SECAM-G; 17 = SECAM-H; 18 = SECAM-DK; 19 = SECAM-L; 20 = SECAM-Lc;
inputs: 0 = loopback;
Current input: 0
Current format: YUV420
v4l2: ioctl set format failed: Invalid argument
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] Can't open /dev/fb0: No such file or directory.
[VO_3DFX] Unable to open /dev/3dfx.
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 320x240 => 320x240 Planar I420
Selected video codec: [rawi420] vfm: raw (RAW I420)
==========================================================================
Audio: no sound
FPS forced to be 15.000 (ftime: 0.067).
Starting playback...
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
Frame too small! (76800<115200) Wrong format?
MPlayer interrupted by signal 2 in module: sleep_timer
V: 0.0 39/ 39 0% 0% 0.0% 0 0
MPlayer interrupted by signal 2 in module: free_demuxer
I'm not sure where exactly the problem is, but for me it looks like the looback
device is not working with the v4l2sink.
I'm more than happy to help debuggingthis furth.
Thanks for your help.
Original issue reported on code.google.com by markus.k...@gmail.com on 22 Dec 2010 at 2:11
Original issue reported on code.google.com by
markus.k...@gmail.com
on 22 Dec 2010 at 2:11