Webcam URI

Charlie X. Liu charlie at sensoray.com
Tue Aug 9 14:50:29 PDT 2011



If you preview/play using gstreamer, here are few sample commands you could
use:

gst-launch-0.10 v4l2src device=/dev/video1 ! autovideosink

gst-launch-0.10 v4l2src device=/dev/video0 ! xvimagesink

gst-launch-0.10 v4l2src device=/dev/video0 ! 'image/jpeg, width=640,
height=480, framerate=30/1' ! jpegdec ! xvimagesink

 

Also the "Webcam and Linux-GStreamer Tutorial" is at:

http://www.twm-kd.com/linux/webcam-and-linux-gstreamer-tutorial/

 

Other Linux Players/Apps include:

Mplayer:                     http://www.mplayerhq.hu/design7/news.html

VLC:
http://www.videolan.org/vlc/download-sources.html

TVtime:                        http://tvtime.sourceforge.net/

XawTV:                  http://www.kraxel.org/blog/linux/xawtv/

all play from a v4l/v4l2 device including webcam.

Best Regards,

Charlie X. Liu, Ph.D.

Sensoray Company Inc.

 

From: gstreamer-devel-bounces+charlie=sensoray.com at lists.freedesktop.org
[mailto:gstreamer-devel-bounces+charlie=sensoray.com at lists.freedesktop.org]
On Behalf Of Steve Cookson
Sent: Friday, August 05, 2011 7:53 AM
To: gstreamer-devel at lists.freedesktop.org
Subject: Webcam URI

 

Hi Guys,

I'm hoping you can help me.

I am writing a medical video application for live surgical examinations, eg
for endoscopies or laparoscopies. The application is written in wxPerl which
uses an API called wxMediaCtrl as a GStreamer front end.

The C++ code is shown here:

http://read.pudn.com/downloads69/sourcecode/embed/247385/wxWidgets-2.8.0/src
/unix/mediactrl.cpp__.htm

While the video playback from a file works fine, the functionality for
playing a webcam (wxGStreamerMediaBackend::Load (URI version)) does not. It
seems that the webcam is opened/loaded but no image appears.  If I use a
valid webcam name, I get no reaction, but if I use an invalid webcam name
the application crashes.  I am trying to track the API calls through
mediactrl.cpp which starts with this call, but should there be the
equivalent of "play" for a webcam?

Does anyone have or can you point me to a piece of Linux c++ code that plays
a Linux webcam (eg file:///dev/video0 <file:///\\dev\video0> )?

Any code or other advice would be much appreciated

Regards

Steve

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110809/7b94e476/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 145 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110809/7b94e476/attachment.gif>


More information about the gstreamer-devel mailing list