How to change colorspace on the fly

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change colorspace on the fly

AlannY-2
Hi there.

I have a dummy question. I need video in video/x-raw-rgb, but
<videotestsrc> generates video in video/x-raw-yuv format. How to convert
it? I found ffmpegcolorspace element, but really not understand how to
use it ;-)

Thank you.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to change colorspace on the fly

Thijs Vermeir-2
Hi,

AlannY wrote:
> Hi there.
>
> I have a dummy question. I need video in video/x-raw-rgb, but
> <videotestsrc> generates video in video/x-raw-yuv format. How to convert
> it? I found ffmpegcolorspace element, but really not understand how to
> use it ;-)
>  
You can use ffmpegcolorspace like this:
gst-launch -v videotestsrc ! ffmpegcolorspace ! video/x-raw-rgb ! fakesink

But you don't need ffmpegcolorspace because the videotestsrc can
also output video in rgb. (Try gst-inspect videotestsrc)

To force videotestsrc to use rgb use something like this:
gst-launch -v videotestsrc ! video/x-raw-rgb ! fakesink

Gr,
Thijs

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to change colorspace on the fly

AlannY-2
In reply to this post by AlannY-2
Thijs Vermeir wrote:
 > Hi,
 >
 > You can use ffmpegcolorspace like this:
 > gst-launch -v videotestsrc ! ffmpegcolorspace ! video/x-raw-rgb !
fakesink
 >
 > But you don't need ffmpegcolorspace because the videotestsrc can
 > also output video in rgb. (Try gst-inspect videotestsrc)
 >
 > To force videotestsrc to use rgb use something like this:
 > gst-launch -v videotestsrc ! video/x-raw-rgb ! fakesink
 >
 > Gr,
 > Thijs
 >

And how to do it programmaly? I'm trying, but everything I get
video/x-raw-yuv ;-(

(example)
source = gst_element_factory_make("videotestsrc", "source");
colorspace = gst_element_factory_make("ffmpegcolorspace", "colorspace");
myplugin = gst_element_factory_make("myplugin", "myplugin");
video_sink = gst_element_factory_make("xvimagesink", "video_sink");

gst_bin_add_many(GST_BIN(pipeline), source, colorspace, libass,
video_sink, NULL);

caps = gst_caps_new_simple("video/x-raw-rgb", NULL);
gst_element_link_filtered(source, colorspace, caps);
gst_caps_unref(caps);

gst_element_link(colorspace, myplugin);
gst_element_link(mypluin, video_sink);

Nothing works. Myplugin still receives video/x-raw-yuv

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to change colorspace on the fly

Julien Isorce
replace xvimagesink by ximagesink.

ffmpegcolorspace is there not really needed because videotestsrc can output rgb.

You forgot to add myplugin into the bin. (libass)

Julien

2008/4/11, AlannY <[hidden email]>:
Thijs Vermeir wrote:
  > Hi,

>
  > You can use ffmpegcolorspace like this:
  > gst-launch -v videotestsrc ! ffmpegcolorspace ! video/x-raw-rgb !
fakesink
  >
  > But you don't need ffmpegcolorspace because the videotestsrc can
  > also output video in rgb. (Try gst-inspect videotestsrc)
  >
  > To force videotestsrc to use rgb use something like this:
  > gst-launch -v videotestsrc ! video/x-raw-rgb ! fakesink
  >
  > Gr,
  > Thijs
  >


And how to do it programmaly? I'm trying, but everything I get
video/x-raw-yuv ;-(

(example)
source = gst_element_factory_make("videotestsrc", "source");
colorspace = gst_element_factory_make("ffmpegcolorspace", "colorspace");
myplugin = gst_element_factory_make("myplugin", "myplugin");
video_sink = gst_element_factory_make("xvimagesink", "video_sink");

gst_bin_add_many(GST_BIN(pipeline), source, colorspace, libass,
video_sink, NULL);

caps = gst_caps_new_simple("video/x-raw-rgb", NULL);
gst_element_link_filtered(source, colorspace, caps);
gst_caps_unref(caps);

gst_element_link(colorspace, myplugin);
gst_element_link(mypluin, video_sink);

Nothing works. Myplugin still receives video/x-raw-yuv


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel