Wally,<br>  Theres other parts to the negotiation besides color space.  Framerate and size are also considered.  You may want to make it resemble:<br><br>gst-launch v4l2src device=/dev/video1 ! ffmpegcolorspace ! videoscale ! videorate ! video/x-raw-yuv, framerate=\(fraction\)30000/1001, width=640, height=480 ! ffmpegcolorspace ! xvimagesink<br>
<br>I don&#39;t think the second ffmpegcolorspace is needed either.<br><br>If you run this with GST_DEBUG=GST_CAPS:3, you will see the logs of the negotiations and you can hopefully decipher whats happening.<br><br>Hope this helps.<br>
<br>Tim<br><br><div class="gmail_quote">On Fri, Dec 10, 2010 at 12:13 PM, wally_bkg <span dir="ltr">&lt;<a href="mailto:wb666greene@gmail.com">wb666greene@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
<br>
wally_bkg wrote:<br>
&gt;<br>
&gt; I need to do it in C but I can illustrate the problem simply with a few<br>
&gt; gst-lanuch commands.<br>
&gt;<br>
&gt; Basically I have a USB video capture device (Hauppauge WinTV-HVR 950Q)<br>
&gt; that works with gstreamer if I simply do:<br>
&gt;<br>
&gt; gst-launch v4l2src device=/dev/video2 ! xvimagesink<br>
&gt;<br>
&gt; However I&#39;m having trouble figuring out a caps filter to use that will let<br>
&gt; me get the buffers in a yuv type format.<br>
&gt;<br>
&gt;<br>
&gt; On a normal capture card if I do:<br>
&gt;<br>
&gt; gst-launch v4l2src device=/dev/video1 ! video/x-raw-yuv,<br>
&gt; framerate=\(fraction\)30000/1001, width=640, height=480 ! xvimagesink<br>
&gt;<br>
&gt; It works fine, but change to /dev/video2 (the USB device) I get:<br>
&gt;<br>
&gt; Setting pipeline to PAUSED ...<br>
&gt; ERROR: Pipeline doesn&#39;t want to pause.<br>
&gt; ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not<br>
&gt; negotiate format<br>
&gt; Additional debug info:<br>
&gt; gstbasesrc.c(2719): gst_base_src_start ():<br>
&gt; /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:<br>
&gt; Check your filtered caps, if any<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; So I tried using ffmpegcolorspace to convert:<br>
&gt;<br>
&gt; gst-launch v4l2src device=/dev/video1 ! ffmpegcolorspace !<br>
&gt; video/x-raw-yuv, framerate=\(fraction\)30000/1001, width=640, height=480 !<br>
&gt; ffmpegcolorspace ! xvimagesink<br>
&gt;<br>
&gt; And get the same error message as without the ffmpegcolorspace elements<br>
&gt; between the capsfilter.<br>
&gt;<br>
&gt;<br>
&gt; One of my main reasons for trying to use gstreamer is to let it do the<br>
&gt; heavy lifting of dealing with video input and output.   At the end of the<br>
&gt; day all I want from the appsink element is a pointer to the video data in<br>
&gt; a format documented well enough that I can pull out a 640x480 intensity<br>
&gt; (grayscale) image.<br>
&gt;<br>
&gt; Up to getting this device, setting the caps to { video/x-raw-yuv,<br>
&gt; framerate=\(fraction\)30000/1001, width=640, height=480 } has worked fine<br>
&gt; for all the capture cards I&#39;ve tried, and obviously needing to deal with<br>
&gt; only a single raw format in my code simplifies it greatly.<br>
&gt;<br>
&gt;<br>
&gt; I&#39;m having trouble in my C code to extract the caps that get negotiated if<br>
&gt; I leave out the capsfilter from my pipeline.  Any samples out there of how<br>
&gt; to do it?<br>
&gt;<br>
&gt;<br>
<br>
I figured out how to extract the caps.<br>
<br>
When using /dev/video1 (saa713x card) the &quot;default&quot; Buffer caps:<br>
video/x-raw-gray, bpp=(int)8, framerate=(fraction)30000/1001,<br>
width=(int)704, height=(int)480<br>
<br>
When uisng /dev/video2 (the 950Q USB device) Buffer caps: video/x-raw-rgb,<br>
bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280,<br>
blue_mask=(int)16711680, endianness=(int)4321,<br>
framerate=(fraction)30000/1001, width=(int)720, height=(int)480<br>
<br>
But this doesn&#39;t give me any clues as to why ffmpegcolor space can&#39;t convert<br>
the rgb caps to the yuv or grey caps I&#39;d prefer to use.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Why-does-this-video-format-conversion-fail-tp3080822p3082344.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/Why-does-this-video-format-conversion-fail-tp3080822p3082344.html</a><br>

Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
<br>
------------------------------------------------------------------------------<br>
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,<br>
new data types, scalar functions, improved concurrency, built-in packages,<br>
OCI, SQL*Plus, data movement tools, best practices and more.<br>
<a href="http://p.sf.net/sfu/oracle-sfdev2dev" target="_blank">http://p.sf.net/sfu/oracle-sfdev2dev</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>