[gst-devel] Dropped frames at gstbaseaudiosrc

Mark Nauwelaerts manauw at skynet.be
Fri Jun 22 22:47:21 CEST 2007


Sebastian Voecking wrote:
>> Why the changes:
>> * it seems my (not that old) hardware can't keep up with real-time theora
>> encoding (or I am doing something wrong in the theora area)
>> * queue has been dropped because the mmap'ed buffers that v4l2src output
>> (somehow??) choke my (threading) performance further down (strange but real)
> 
> I dropped theora and tried other codecs and the only pipeline I found
> which produces a good video with audio was
> 
> gst-launch-0.10 v4l2src ! jpegenc ! avimux name="avi" alsasrc
> device=hw:1,0 ! audio/x-raw-int,rate=32000 ! queue ! avi. avi. !
> filesink location=test.avi
> 
> Unfortunately is the result AVI file huge. And totem can only play the
> first 30 minutes of it.
> Other codecs resulted in a choppy video and audio or a far to fast
> running video.

Can make partially sense; the "far to fast running video" is likely due to
framedrops, due to lack of buffers along the way.
Btw; I have also noticed that (in case of 0.10.6 at least) it is best to
explicitly include framerate in the caps, e.g. framerate=25/1 (in order to end
up with the right one).

>> What to do about this;
>> * newer v4l2src (queue-size) allows allocating more frame buffers; should
>> prevent dropping at that level.  In turn, however, this will lead to even more
>> "clustering" in the timestamps of the output buffers (and encoder complaints)
>> * this "clustering" can be somewhat counter-acted by using the videorate
>> element.  Although that should then result in pretty good audio-video sync
>> (without complaints), video may be a bit choppier, since videorate will respond
>> to the "clustering" by (lot of) dropping frames one moment, and (lot of)
>> duplicating frames other moments.
> 
> I tried upgrading by hand but afterwards my tv card (BTW it's a Terratec
> Cinergy 400) didn't work at all with v4l2src. It complained always that
> it could not negotiate a format. Now I went back to 0.10.5. So I guess I
> am stuck with the old version.

Hm, the latest 0.10.6 v4l2src fails to get going with my bttv card as well
(don't know if it is the same cause, but seems likely).
This is due to the new v4l2src expecting the driver to support some optional
ioctl's (which they don't all do); this has been entered into
http://bugzilla.gnome.org/show_bug.cgi?id=450190 along with a patch.

Regards,
Mark.




More information about the gstreamer-devel mailing list