Proxying from the Media Library
Here, simply adding the option to create scaled proxies alongside the newly renamed “Use Optimized Proxy” option provided a easy and elegant UX.
And to distinctly display scaled assets, a new brightly colored lightning icon was introduced to be shown on suitable thumbnails in the Media Library.
Automatic Proxying during Import
The import dialog already looked quite bloated with the old proxy settings so it was decided to redesign the dialog to make it look lean and clean.
The settings for optimized media were compressed into a single line with a checkbox providing easy enable-disable functionality.
For scaled proxies, it was decided to use the already present scaled proxy resolution as the cut-off resolution for automatic scaling. Care was taken to let the user to see and modify this resolution quickly and easily. This allows them to specify a single resolution and be confident that only the assets that need scaling will be transcoded.
Using the Import Dialog during ingestion of media
This method is automatic in nature and enables the user to just import all the media he/she needs and let Pitivi chose when to use proxies.
Pitivi will automagically replace poorly supported media with Optimized Media during the import itself.
While this works seamlessly for optimized media, the situation is slightly complicated for scaled proxies. Not only can it be difficult to determine which assets to scale, we also want to know what resolution to scale them to.
Plus, letting Pitivi automagically scale down media to a noticeably lower resolution might backfire if the user isn’t privy to what is happening behind the scenes.
Using the Media Library during editing
This approach involves much less “magic” and is bit more WYSIWYG in its character.
In the Media Library the user can start proxying assets with just two clicks and see which assets are proxied or being proxied in a single glance. This is useful if the user wishes to modify the state of assets while editing.
It’s much easier to fit scaled proxies here as long as we take care to make it obvious which assets are proxied and with what type of proxies.
Internally, most of the code for handling proxies resides in
proxy.py which exposes the
proxy_manager class to create and monitor proxy assets.
To create a proxy, we call
add_job function in
proxy_manager which takes the
GES.Asset that we wish to proxy as its argument, performs some checks and passes it on to another function.
This function is now responsible for getting the suitable
EncodingProfile and starting off a
GstTranscoder on the asset with this profile as its target format.
The transcoder runs asynchronously, reporting progress periodically which is used to update the UI in the Media Library.
When the transcoder finishes, we
GES.request_async the resulting proxy file and set it as the proxy on the original asset.
The modifications required for the generation of scaled proxies are fairly straightforward, just
set_restriction on the
EncodingProfile telling it the height and width that we wish to scale the asset to and let
GstTranscoder work its wonders.
The complications lie mostly in adapting the current framework that is used for initiating proxy creation, managing proxies during their lifecycle and handling of edge cases like poorly supported the formats or the changing of the target resolution for scaled proxies mid-way through.
This summer I , under the mentorship of Thibault Saunier, will be working on adding scaled proxies to Pitivi. While Pitivi already provides its users the option to use Optimized Media (aka HQ Proxies) for problematic file formats, having scaled proxies would allow them to transcode their high resolution video assets to a more manageable resolution at the time of editing which would make both editing and previewing much quicker.
Some of the other editors allow users to attach externally transcoded assets as proxies, this approach is flexible but not very user friendly. Pitivi, a bit like Final Cut Pro, provides a single unified experience where user can create and manage proxies right there in the application itself.
My project aims to integrate scaled proxies within Pitivi’s current framework for creating proxies and making sure that they are adaptable yet remain easy to use.
You can find in
#newcommers on GIMPNet as
yat_irc or look at (most of) my work on this issue.