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'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"><<a href="mailto:wb666greene@gmail.com">wb666greene@gmail.com</a>></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>
><br>
> I need to do it in C but I can illustrate the problem simply with a few<br>
> gst-lanuch commands.<br>
><br>
> Basically I have a USB video capture device (Hauppauge WinTV-HVR 950Q)<br>
> that works with gstreamer if I simply do:<br>
><br>
> gst-launch v4l2src device=/dev/video2 ! xvimagesink<br>
><br>
> However I'm having trouble figuring out a caps filter to use that will let<br>
> me get the buffers in a yuv type format.<br>
><br>
><br>
> On a normal capture card if I do:<br>
><br>
> gst-launch v4l2src device=/dev/video1 ! video/x-raw-yuv,<br>
> framerate=\(fraction\)30000/1001, width=640, height=480 ! xvimagesink<br>
><br>
> It works fine, but change to /dev/video2 (the USB device) I get:<br>
><br>
> Setting pipeline to PAUSED ...<br>
> ERROR: Pipeline doesn't want to pause.<br>
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not<br>
> negotiate format<br>
> Additional debug info:<br>
> gstbasesrc.c(2719): gst_base_src_start ():<br>
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:<br>
> Check your filtered caps, if any<br>
><br>
><br>
><br>
> So I tried using ffmpegcolorspace to convert:<br>
><br>
> gst-launch v4l2src device=/dev/video1 ! ffmpegcolorspace !<br>
> video/x-raw-yuv, framerate=\(fraction\)30000/1001, width=640, height=480 !<br>
> ffmpegcolorspace ! xvimagesink<br>
><br>
> And get the same error message as without the ffmpegcolorspace elements<br>
> between the capsfilter.<br>
><br>
><br>
> One of my main reasons for trying to use gstreamer is to let it do the<br>
> heavy lifting of dealing with video input and output. At the end of the<br>
> day all I want from the appsink element is a pointer to the video data in<br>
> a format documented well enough that I can pull out a 640x480 intensity<br>
> (grayscale) image.<br>
><br>
> Up to getting this device, setting the caps to { video/x-raw-yuv,<br>
> framerate=\(fraction\)30000/1001, width=640, height=480 } has worked fine<br>
> for all the capture cards I've tried, and obviously needing to deal with<br>
> only a single raw format in my code simplifies it greatly.<br>
><br>
><br>
> I'm having trouble in my C code to extract the caps that get negotiated if<br>
> I leave out the capsfilter from my pipeline. Any samples out there of how<br>
> to do it?<br>
><br>
><br>
<br>
I figured out how to extract the caps.<br>
<br>
When using /dev/video1 (saa713x card) the "default" 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't give me any clues as to why ffmpegcolor space can't convert<br>
the rgb caps to the yuv or grey caps I'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>