[gst-devel] webcam recording

Joshua N Pritikin jpritikin at pobox.com
Mon Jun 16 00:04:31 CEST 2008


Can I get some help recording my webcam?

I followed the instructions at:

http://www.buberel.org/serendipity/index.php?/archives/263-But-wait,-theres-more-to-using-a-webcam-on-Linux!.html

I tried video and audio separately.

gst-launch-0.10 alsasrc device="hw:0,0" ! audio/x-raw-int,rate=16000,channels=1,depth=16 ! audioconvert ! alsasink

gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=352 ! ffmpegcolorspace  ! xvimagesink

They work fine. However, when i record them together the video is either 
too slow (stamp sync-margin=1 sync-interval=1) or too fast (stamp 
sync-margin=2 sync-interval=5).

gst-launch-0.10  v4l2src queue-size=16 ! image/jpeg,width=352,framerate=30/1 \
    ! stamp sync-margin=2 sync-interval=5  \
    ! queue2 max-size-buffers=10000 max-size-bytes=0 max-size-time=0   \
    ! ffdec_mjpeg \
    ! ffmpegcolorspace ! theoraenc quality=60 name=venc alsasrc device="hw:0"  \
    ! audio/x-raw-int,rate=44100 ! audioconvert \
    ! queue2 max-size-buffers=10000 max-size-bytes=0 max-size-time=0 \
    !  vorbisenc quality=0.9 name=aenc oggmux name=mux \
    ! filesink location=out.ogg aenc. ! mux. venc. ! mux.

This is on Ubuntu Hardy. Gstreamer 0.10.18-4ubuntu1 and Gentrans 
compiled from source from sourceforge.

T:  Bus=07 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(unk. ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=05a9 ProdID=2640 Rev= 1.00
S:  Manufacturer=OmniVision Technologies, Inc. -2640-07.07.20.3
S:  Product=Laptop Integrated Webcam
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=0e(video) Sub=03 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=4096ms
I:* If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#= 1 Alt= 1 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS=1020 Ivl=125us




More information about the gstreamer-devel mailing list