New versions of GStreamer record audio and video synced with v4l2src, and seem to handle a couple of UVC devices I've tried just fine. Try this:
gst-launch-0.10 v4l2src device=/dev/video0 queue-size=16 ! \ video/x-raw-yuv,width=640,height=480,framerate=30/1 ! \ tee name=tee tee. ! queue ! ffmpegcolorspace ! queue ! x264enc ! \ queue ! mux. matroskamux name=mux alsasrc device=hw:1,0 ! \ audiorate ! audio/x-raw-int,rate=48000,channels=2,depth=16 ! queue ! \ audioconvert ! lame ! mux. mux. ! queue ! \ filesink location=~/Desktop/test.mkv tee. ! ffmpegcolorspace ! queue ! \ xvimagesink That assumes that you have a newer version of gstreamer with things like the bad and ugly plugin sets. You may have to adjust your audio settings (I have a stereo webcam that works up to 48KHz, but a lot of webcams with audio only support 16000 Hz and 1 channel) and video size/rate to work, but that works just fine for me, and produces a perfectly synced matroska file (AVI's were always out of sync badly when I tried an AVI muxer with gstreamer). If you want a graphical tool to do this, try this script I wrote: http://forums.quickcamteam.net/showthread.php?tid=352 and replace every instance of 'avimux' with 'matroskamux' for proper syncing. Hope that helps, -Rich >Is there any work around for this yet? > > >Maurizio Monge wrote: >> Hi, >> please excuse me if this question is not exactly about uvcvideo >> development, but was anyone able to record sync'ed audio and video >> with some tool? >> This is really driving me mad... >> transcode for some reason only records at 1fps, mencoder segfaults, >> vlc and ffmpeg lose sync, lavrec does not work with v4l2. >> Any suggestion? thanks a lot! >> Regards. >> >> >> -- >> Ciao >> Maurizio >>http://stregatto.wordpress.com >> >> "Well we all shine on >> Like the moon and the stars and the sun" (John Lennon) >>
_______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
