[gst-devel] optimal video type
bilboed at gmail.com
Wed Jan 27 20:50:54 CET 2010
On Wed, 2010-01-27 at 10:58 -0800, John Buckley wrote:
> I am running gstreamer on a small embedded Linux board with a USB 1.1 port.
> I have my v4l2src source setup as mjpeg and it is then decoded and converted
> to the output ximagesink which I believe is video/x-raw-rgb.
> #gst-launch v4l2src ! image/jpeg,width=320,framerate=\(fraction\)30/1 !
> jpegdec ! ffmpegcolorspace ! ximagesink sync=false
> My problem is that the video throughput is miserably slow. There is a
> significant delay in the video and if I set ximagesink sync=true and attempt
> to hold the framerate steady at 30fps it doesn't even come close.
Add a queue just after v4l2src in order to dedicate one thread to
capturing and another one to decoding/display. If critical... you could
also try adding a queue just before ximagesink (thereby creating a
dedicated thread for decoding and one for display).
> I thought I read that the mjpeg format would produce higher framerates than
> the raw video formats.
> Q1: Am I mistaken?
Depends on your hardware. The only 'advantage' to using jpeg is to be
able to cram more information through the usb 1.1 port. OTOH, you should
be able to fit 320x240 at 30fps in raw rgb through usb 1.1
> Q2: Would I be better off bringing the video off the device in
> video/x-raw-rgb or x-raw-yuv mode?
avoiding colorspace conversion would be a good idea, so
> Q3: Are there any tricks to improving the framerates or this just typical
> for USB 1.1. Is USB 2.0 that much faster?
usb 1.x goes up to 12Mbit/s
usb 2.x goes up to ... 480Mbit/s :)
More information about the gstreamer-devel