v4l2src and a usb tv tuner

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

v4l2src and a usb tv tuner

Dimitar Popov-2
Hi all,

I'm having problem using my usb tv tuner with gstreamer. I tried the
following
with gst-launch-0.10:

$ gst-launch-0.10 v4l2src device=/dev/video1 ! autovideosink

Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
'/dev/video1' cannot capture at 720x576
Additional debug info:
gstv4l2object.c(2093): gst_v4l2_object_set_format ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Call to S_FMT failed for YV12 @ 720x576: Invalid argument
Setting pipeline to NULL ...
Freeing pipeline ...

Then I checked what properties v4l2 reports:

$ v4l2-ctl -d /dev/video1 --all

and noticed that the tv tuner uses YUY2 (also known as YUYV) instead of YV12
as detected by GST:

Format Video Capture:
        Width/Height  : 720/576
        Pixel Format  : 'YUYV'
        Field         : Interlaced
        Bytes per Line: 1440
        Size Image    : 829440
        Colorspace    : SRGB
Format Video Output:
        Width/Height  : 720/576
        Pixel Format  : 'YUYV'
        Field         : Interlaced
        Bytes per Line: 1440
        Size Image    : 829440
        Colorspace    : SRGB

So I decided to explicitly tell GST to use YUY2:

gst-launch-0.10  v4l2src device=/dev/video1 ! video/x-raw-
yuv,format=\(fourcc\)YUY2 ! ffmpegcolorspace ! autovideosink

but got:

Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not
negotiate format
Additional debug info:
gstbasesrc.c(2778): gst_base_src_start ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...

Adding --gst-debug=v4l2:5 revealed that GST recognises YU12, YV12, BGR3 and
RGB3 pixel formats:

v4l2 gstv4l2object.c:1038:gst_v4l2_object_fill_format_list:<v4l2src0>   YU12
(emulated)
v4l2 gstv4l2object.c:1038:gst_v4l2_object_fill_format_list:<v4l2src0>   YV12
(emulated)
v4l2 gstv4l2object.c:1038:gst_v4l2_object_fill_format_list:<v4l2src0>   BGR3
(emulated)
v4l2 gstv4l2object.c:1038:gst_v4l2_object_fill_format_list:<v4l2src0>   RGB3
(emulated)

The version of gstreamer is 0.10.32 and the version of gst-plugins-good is
0.10.27 from the archlinux x86_64 repo.

I've attached the debug output from gst-launch and the output of v4l2-ctl,
but
if any other information is needed I'll provided of course.

I'm not an expert in the field so I have only a vague notion of what
colorspace and pixel formats are, so please, execuse me, if I've done some
stupid mistake :)

Thanks in advance for the help!

Dimitar
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

gst.log.zip (4K) Download Attachment
v4l2.log.zip (1K) Download Attachment