GNOME Bugzilla – Bug 731373
[pitivi] Temporary live playback restriction caps
Last modified: 2018-11-03 12:52:13 UTC
In Pitivi, we encounter the usecase where we would need to downscale videos during live playback, so that they are only processed at the resolution of UI widget displaying the sink/previewer. This approach has been demonstrated to significantly improve performance when applying effects on top of HD footage, with this proof of concept branch branch: https://github.com/nekohayo/pitivi/commits/low-quality-preview GES provides a set_restriction_caps method for tracks, allowing to set a width and height to clamp to. However, this API is insufficient because it was made to set permanent restriction caps (ex: rendering resolution scaling) and they get saved into the file format. Notwithstanding the fact that it interferes with the real rendering restriction caps, trying to manage this temporary stuff in Pitivi means piles upon piles of nasty hacks that conflict with each other. - Trying to work around the current API means tracking the state globally, setting restriction caps only in certain situations and then trying to surgically remove them right before rendering and right before any project file saving. This doesn't work. - Changes to restriction caps will make the pipeline go to pause. Since Pitivi autosaves a backup copy of the GES Project periodically, and GES serializes the restriction caps, Pitivi will uncontrollably stop playback whenever an automatic backup file save occurs. Hence I have come to the conclusion that trying to work around this in Pitivi is impossible and that it is the responsibility of GES to provide a way to (un)set temporary/live/playback restriction caps globally. You need to be able to (un)inhibit those playback restriction caps (easily toggle them on/off) at any time, and since they're UI-dependent (they don't make sense outside of this context), they should never be saved into the project file.
Could this be rephrased in terms of GES requirements ? Not 100% clear.
In GES terms it is something like: Have some API to allow scaling clips as much as possible for a specific video sink size (in playback mode) so that effects and transitions happen on smaller videos than the original one (improving perfs).
-- 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-editing-services/issues/15.