<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-size: 10pt'>
<p>Hello,</p>
<p>I'm working on a gstreamer application intended to simultaneously playback and save video from a Pinnacle Dazzle. I'm having troubles with my caps filter. If I run the following pipeline video displays but it's not the correct resolution so the aspect ratio looks off:</p>
<p>gst-launch -v v4l2src device=/dev/video0 ! xvimagesink </p>
<p>When I play from the capture card with mplayer it plays back at 640x480:</p>
<p>mplayer -tv driver=v4l2:norm=NTSC:input=0 tv://<br />Failed to read /etc/mplayer/mplayer.conf.local: No such file or directory<br />Warning unknown option include at line 177<br />MPlayer SVN-r37232 (C) 2000-2013 MPlayer Team<br />mplayer: could not connect to socket<br />mplayer: No such file or directory<br />Failed to open LIRC support. You will not be able to use your remote control.<br /><br />Playing tv://.<br />TV file format detected.<br />Selected driver: v4l2<br /> name: Video 4 Linux 2 input<br /> author: Martin Olschewski <olschewski@zpr.uni-koeln.de><br /> comment: first try, more to come ;-)<br />Selected device: Pinnacle Dazzle DVC 90/100/101/<br /> Capabilities: video capture read/write streaming<br /> 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;<br /> inputs: 0 = Composite1; 1 = S-Video;<br /> Current input: 0<br /> Current format: YUYV<br />v4l2: ioctl set format failed: Invalid argument<br />v4l2: ioctl set format failed: Invalid argument<br />v4l2: ioctl set format failed: Invalid argument<br />Selected input hasn't got a tuner!<br />v4l2: ioctl set mute failed: Invalid argument<br />open: No such file or directory<br />[MGA] Couldn't open: /dev/mga_vid<br />open: No such file or directory<br />[MGA] Couldn't open: /dev/mga_vid<br />[VO_TDFXFB] This driver only supports the 3Dfx Banshee, Voodoo3 and Voodoo 5.<br />s3fb: Couldn't map S3 registers: Operation not permitted<br />Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory<br />[vdpau] Error when calling vdp_device_create_x11: 1<br />==========================================================================<br />Opening video decoder: [raw] RAW Uncompressed Video<br />Movie-Aspect is undefined - no prescaling applied.<br /><strong>VO: [xv] 640x480 => 640x480 Packed YUY2</strong> <br />Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)<br />==========================================================================<br />Audio: no sound<br />Starting playback...<br /><br /></p>
<p>So I'm trying to correct that with a caps filter. v4l2-ctl tells me it supports 640x480:</p>
<p>v4l2-ctl --all<br />Driver Info (not using libv4l2):<br /> Driver name : em28xx<br /> Card type : Pinnacle Dazzle DVC 90/100/101/<br /> Bus info : usb-0000:00:14.0-2<br /> Driver version: 3.14.15<br /> Capabilities : 0x85000001<br /> Video Capture<br /> Read/Write<br /> Streaming<br /> Device Capabilities<br /> Device Caps : 0x05000001<br /> Video Capture<br /> Read/Write<br /> Streaming<br />Priority: 2<br />Video input : 0 (Composite1: ok)<br />Video Standard = 0x0000b000<br /> NTSC-M/M-JP/M-KR<br />Format Video Capture:<br /> Width/Height : 640/480<br /> Pixel Format : 'YUYV'<br /> Field : Interlaced<br /> Bytes per Line: 1280<br /> Size Image : 614400<br /> Colorspace : Broadcast NTSC/PAL (SMPTE170M/ITU601)<br />Streaming Parameters Video Capture:<br /> Frames per second: 29.970 (30000/1001)<br /> Read buffers : 4<br /><br />User Controls<br /><br /> brightness (int) : min=0 max=255 step=1 default=128 value=128 flags=slider<br /> contrast (int) : min=0 max=127 step=1 default=64 value=64 flags=slider<br /> saturation (int) : min=0 max=127 step=1 default=64 value=64 flags=slider<br /> hue (int) : min=-128 max=127 step=1 default=0 value=0 flags=slider<br /> red_balance (int) : min=-48 max=48 step=1 default=0 value=0 flags=slider<br /> blue_balance (int) : min=-48 max=48 step=1 default=0 value=0 flags=slider<br /> sharpness (int) : min=0 max=15 step=1 default=0 value=0 flags=slider<br /> chroma_agc (bool) : default=1 value=1 flags=update<br /> chroma_gain (int) : min=0 max=127 step=1 default=40 value=42 flags=inactive, slider, volatile</p>
<p>So I'm trying to fix the gstreamer output with a filter cap but getting "Could not negotiate format":</p>
<p>gst-launch -v v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=640,height=480,framerate=30/1' ! xvimagesink<br />Setting pipeline to PAUSED ...<br />ERROR: Pipeline doesn't want to pause.<br /><strong>ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format</strong><br />Additional debug info:<br />gstbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:<br />Check your filtered caps, if any<br />Setting pipeline to NULL ...<br />Freeing pipeline ...</p>
<p>I've seen other threads[1] on the mailing list about these types of issues with the Dazzles but can't seem to find a working solution. v4l2-ctl doesn't seem to be listing all supported formats and the video capture format is different sometimes. Am I missing something in configuring the capture card to produce the correct output before I start the gstreamer pipeline or is the filter cap supposed to do that?</p>
<p>Thanks,</p>
<p>Keith.</p>
<p>1: <a href="http://lists.freedesktop.org/archives/gstreamer-devel/2013-February/039548.html" target="_blank">http://lists.freedesktop.org/archives/gstreamer-devel/2013-February/039548.html</a></p>
<p> </p>
</body></html>