[Fwd: Re: Journey in cheese code;]





> I removed it given that we were not using anything but the maximum anyway.
> Did you experience any CPU load difference changing the framerate in
> v4l2src itself?
> I can run the following pipeline here with different framerates and
> there is no noticeable difference in speed load, I'd say 1% difference
> between 9/1 and 30/1 fps.
> gst-launch-0.10 v4l2src ! video/x-raw-yuv, framerate=30/1 ! fakesink
>
> So I think the cpu load becomes important when you pass those frames
> through other processing elements and you're right, decreasing
> framerate can be useful for that. But, it can easily be done with
> videorate.
> You set the src framerate to the maximum[1] available and then drop
> some frames setting the framerate caps after videorate.
> This way you can still control the framerate in your pipeline but you
> can avoid the whole hassle of enumerating and parsing supported
> framerates. You just have the maximum one and videorate does the rest
> with minimal overhead.
>
> Note: if anyone in the list thinks I'm missing anything and the
> previous paragraph is totally crack please talk now :)
>   

Hi,
 I  did some test on sevral gst pipes with an isight webcam on a imac
under ubuntu/karmic. Playing with framerate , filters , video sinks, and
ffmpegcolorspace, I measured  the CPU load ( not so accurate) :

gst-launch-0.10 v4l2src ! video/x-raw-yuv,framerate=5/1 !
ffmpegcolorspace ! ximagesink             22 %
gst-launch-0.10 v4l2src ! video/x-raw-yuv,framerate=30/1 !
ffmpegcolorspace ! ximagesink            70 %


gst-launch-0.10 v4l2src ! video/x-raw-yuv,framerate=5/1 !
ffmpegcolorspace ! xvimagesink            20%
gst-launch-0.10 v4l2src ! video/x-raw-yuv,framerate=30/1 !
ffmpegcolorspace ! xvimagesink           72 %



gst-launch-0.10 v4l2src ! video/x-raw-yuv,framerate=5/1 !
ffmpegcolorspace ! autovideosink          20 %
gst-launch-0.10 v4l2src ! video/x-raw-yuv,framerate=30/1 !
ffmpegcolorspace ! autovideosink         70 %

gst-launch-0.10 v4l2src ! video/x-raw-yuv, framerate=30/1 !
fakesink                                0-2 %
gst-launch-0.10 v4l2src ! video/x-raw-yuv, framerate=5/1 !
fakesink                                 0-2%

gst-launch-0.10 v4l2src ! video/x-raw-yuv, framerate=30/1 !
autovideosink                           2 %
gst-launch-0.10 v4l2src ! video/x-raw-yuv, framerate=5/1 !
autovideosink                            0 -2 %

gst-launch-0.10 v4l2src ! video/x-raw-yuv, framerate=30/1 !
ffmpegcolorspace ! fakesink             72 %
gst-launch-0.10 v4l2src ! video/x-raw-yuv, framerate=5/1 !
ffmpegcolorspace ! fakesink              20 %

gst-launch-0.10 v4l2src ! video/x-raw-yuv, framerate=30/1 ! videorate !
video/x-raw-yuv, framerate=5/1 ! ffmpegcolorspace ! autovideosink   70 %


So, I a first conlcusion ffmpegcolospace use a lot of CPU. In second the
videorate filter before ffmpegcolorspace has no effect on CPU load. Only
changing the framerate on v4l2src seems effective for CPU load . Weird ....


And it's true getting framerate from v4l2src and gstreamer is hassle. I
write a  python piece of code for that, if you are interested. 


Other point, does somebody or know somebody on how gnome python bindings
work ? I read out bindings for pygtk and  pygst.  they use the same
principle with .defs and .override files, but this method looks like un
documented, and "slightly" different from the python documented one. 

Ciao
Nico






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]