GNOME Bugzilla – Bug 723778
new fakevideodec element
Last modified: 2018-11-03 13:20:50 UTC
I have started a fakevideodec element here http://cgit.collabora.com/git/user/julien/gst-plugins-good.git/commit/?h=fakevideodec&id=7a4c1ce6e3ecaa35ffbd74b7e37968e3adc70485 It's useful when you have a new embedded platform and you want to know what would be the performance if you had a decoder that use 0% CPU. (hardware decoder except the zero-copy part) videotestsrc is not really usable on embedded like RPI, I mean it uses so much CPU so not really useful to identify what would be the best FPS. Also fpsdisplaysink uses textoverlay for the visual fps information. When you want a visual information only (and not a console info) Also fakevideodec is compatible with playbin as long as you increase its rank. For now fakevideodec just draw a kind of snake on 1 line (to make it use the CPU the less possible) And the snake moves from left to right in 1 sec if no drop. So that when there are frame dropping the snake freez and you see it jumps to other positions. At every new frame it clears the line and draw the next position base on the framerate and the resolution. I made it quite quickly so it may not being exactly correct right now. Also even if it currently visually gives an idea of the FPS, it still does not allow to determine visually what is the precise FPS (can't say 24 or 25 FPS) It could be improved to draw a kind of minimal meter and then draw a spot to indicate what is the current framerate. There are several ideas. Do no hesitate to put a comment :)
Can you put up a patch against gst-plugins-bad in the debugutils plugin here? Also why a decoder instead of a debug source?
Btw, we should add a property to videotestsrc to not re-create the image on each frame (ie, always re-send the same one). At least for static patterns.
Yes, there's a bug about that :) Bug #500152
(In reply to comment #1) > Also why a decoder instead of a debug source? What do you mean by debug source ? (GstPushSrc?) Would a debug source be usable with playbin ?
I mean a fast videotestsrc :) You can let it handle an URI scheme like "videotestsrc:" for example, then it just works in playbin.
(In reply to comment #5) > I mean a fast videotestsrc :) You can let it handle an URI scheme like > "videotestsrc:" for example, then it just works in playbin. Ok. Well, fakevideodec would be useful to let other elements be plugged in for a real URI. I mean everything would be there: httpsource, demuxer, codec parser, streamsynchronizer, videoconvert, videoscale, and also the audio branch. But yeah basically fakevideodec (or debugvideodec) should also be able to do everything videotestsrc can.
Created attachment 268398 [details] [review] add new element fakevideodec I made quite quickly so be easy on me about the snake drawing :) Also there is a rank property so that you can get the fakevideodec loaded easily: gst-launch-1.0 fakevideodec rank=512 playbin uri=http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 (I wonder if we could add this property for all gstreamer elements (or at least all important element decoders, sources, sinks...) and should be per-pipeline modifier like suggested here https://bugzilla.gnome.org/show_bug.cgi?id=705976)
ping ?
The problem with a rank property is that the rank is globally, and actually part of the element factory and not the element instance. If you use a pipeline with two fakevideodecs and set different ranks on them, it's not clear which rank will be used in the end :) It should rather be part of a more elaborate configuration system as described in that other bug. Apart from that this seems like a good idea. Are you planning to continue working on it?
For me it was ready so I do not plan to work more on this. About the problem you mentioned it will be solved automatically when the other bug will be solved. Not sure if this is really blocking to merge it :)
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/131.