Pitivi's Proxy Preparation Procedure

Pitivi Logo

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.

Google Summer of Code with GNOME

GSoC with GNOME

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 #pitivi and #newcommers on GIMPNet as yat_irc or look at (most of) my work on this issue.