Connecting to a mjpeg camera

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

Connecting to a mjpeg camera

Albert Costa
Hi
I have a webcam that I wish to connect to with gstreamer. This webcam can stream in 2 modes at max resolution, one is yuv at 5fps, the other one is mjpeg at 15fps.
If I use following pipeline:

gst-launch-0.10.exe ksvideosrc ! ffmpegcolorspace ! video/x-raw-rgb,width=1600 ! ffmpegcolorspace ! directdrawsink -v

then the cameras gets into YUV mode at fps as shows in the output:

/GstPipeline:pipeline0/GstKsVideoSrc:ksvideosrc0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)YUY2, width=(int)1600, height=(int)1200, framerate=(fraction)5/1

If I try the following to force the camera to go into mjpeg/15fps:
gst-launch-0.10.exe ksvideosrc ! ffmpegcolorspace ! video/x-raw-rgb,width=1600,framerate=15/1 ! ffmpegcolorspace ! directdrawsink -v

then I got an error saying the caps could not be negociated. I've tried putting a ffdec_mjpeg after the ksvideosrc element by different means, but could never get it to work.
Is there any way to tell the camera (using caps or specific plugin) to go into video/mjpeg mode ?

Thanks for any advice,
Al


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Connecting to a mjpeg camera

Wes Miller
Administrator
I'm not sure this is exacly what you asked but i hope it helps.

Here is your pipeline:

                 gst-launch-0.10.exe   ksvideosrc
                                               ! ffmpegcolorspace
                                               ! video/x-raw-rgb,width=1600,framerate=15/1
                                               ! ffmpegcolorspace ! directdrawsink -v


First, look at your CPAS.  Ty using image/mjpeg instead of video/x-raw-rgb.  
Secondly, you'll probably need a jpegdec in front of the ffmpegcolorspace element.

                                               ... ! jpegdec ! ffmpegcolorspace ! ...

I am unfamiliar with directdrawsink, but you might consider using dshowvideosink or autovideosink.

Wes Miller
Reply | Threaded
Open this post in threaded view
|

Re : Connecting to a mjpeg camera

Albert Costa
Hi,
thanks, yes that's what I was asking for. However it did not worked yet, as I think I need to set something with the camera api itself to make it go into mjpeg mode (connecting to it with VLC for example, I need to check an option in the advanced configuration...)
Thanks anyway
Al


De : Wes Miller <[hidden email]>
À : [hidden email]
Envoyé le : Mar 8 juin 2010, 16h 37min 59s
Objet : Re: [gst-devel] Connecting to a mjpeg camera


I'm not sure this is exacly what you asked but i hope it helps.

Here is your pipeline:

                gst-launch-0.10.exe  ksvideosrc
                                              ! ffmpegcolorspace
                                              !
video/x-raw-rgb,width=1600,framerate=15/1
                                              ! ffmpegcolorspace !
directdrawsink -v


First, look at your CPAS.  Ty using image/mjpeg instead of video/x-raw-rgb. 
Secondly, you'll probably need a jpegdec in front of the ffmpegcolorspace
element.

                                              ... ! jpegdec !
ffmpegcolorspace ! ...

I am unfamiliar with directdrawsink, but you might consider using
dshowvideosink or autovideosink.

Wes Miller
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Connecting-to-a-mjpeg-camera-tp2243366p2247501.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel