Choppy v4l2/bttv capture

Tim-Philipp Müller t.i.m at zen.co.uk
Thu Dec 22 15:06:52 PST 2011


On Wed, 2011-12-21 at 20:07 +0000, Andrew Clayton wrote:

> However, I just can't get smooth video with GStreamer.
> 
> E.g, using the following:
> 
> gst-launch oggmux name=mux ! filesink location=vid.ogv v4l2src device=/dev/video1 ! videorate ! video/x-raw-yuv,width=320,height=240,framerate=25/1 ! ffmpegcolorspace ! queue ! theoraenc bitrate=800 ! queue ! mux. alsasrc buffer-time=100000 device=hw:1,1 ! audio/x-raw-int,channels=1,rate=119466 ! audioconvert ! queue ! vorbisenc ! mux.
> 
> Works in as much as I get a Ogg Theora file that plays back and bits
> where there isn't a lot of movement look fine, however, scenes with a
> lot of (or not even that much) motion become choppy.
> 
> Note: The above command was cobbled together by a lot of scouring the
> internet and trial and error. So I wouldn't be surprised if it's wrong
> in various ways.
> 
> Any idea's would be appreciated.

Have you tried moving the first queue right after v4l2src, and making it
larger or removing all of its limits? (Try queue max-size-buffers=0
max-size-time=0 max-size-bytes=0) It's quite small by default. I have a
vague memory of theoraenc performing quite badly with lots of motion.

Cheers
 -Tim



More information about the gstreamer-devel mailing list