Python scripts / macros that can help automate common tasks

Registered by Jonathan Thomas

One of my favorite ideas is to have a Python-based script system built into the interface of OpenShot. It would work just like a simple macro system (common to many office programs). A user could create a new script, which would give the user access to the OpenShot API. Then, the user could map the script to a keyboard shortcut, or add their script to the toolbar or menu.

Some examples of scripts might be:

1) Create Photo Slide Show (which would prompt the user to choose a folder), then prompt the user to choose the type of transitions, length of transition, and length of photo, then it would auto-magically add each photo to the timeline, and add the transitions.

2) Fade to black - it would allow the user to select any clip, then it would add a black color clip to the next track, and do a luma transition between the two clips.

3) Random Video Project - Just a fun idea... it would prompt for a folder with media in it, and then randomly add videos, photos, and music to the timeline (also, random IN and OUT points for each video).

4) Earth-quake - The user would select a video clip, and then this script would add random X and Y keyframes to create the illusion of an earthquake.

You get the the idea...

Blueprint information

Status:
Not started
Approver:
Jonathan Thomas
Priority:
Medium
Drafter:
Jonathan Thomas
Direction:
Approved
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Not started
Milestone target:
None

Related branches

Sprints

Whiteboard

MC (28.4.2010):
- Workflow: User selects a range in the timeline. User selects a script. User sets script options in the scripts GUI. Script runs. User can continue to work (save, undo, etc)
- Scripts need to get the currently selected objects in the timeline, including their properties
- There needs to be a standard way to pack such a python script together with its documentation and an animated thumbnail.
- The script has access to some simple GUI elements (shown in a flat list (label/setting)) for parameter settings
  - GUI elements: drop-down list, show a video frame and click on a (x,y) position, color picker
  - To extend scripts so that they can work on files on the harddisk, provide a GUI element to select several media files/folders
  - Last thing in the list of settings are "Go" and "Cancel" buttons.
- During script execution, show that OpenShot is active using a small "processing..." window.
  - each script has a callback which will update information there ("applying transitions") or update an hourglass-animation

more examples for scripts:
- Ken Burns effect on a range of photos on the timeline, maybe using face detection to zoom in on faces e.g. using pygame/pycam/opencv http://code.google.com/p/pycam/)
- Audio analysis, zoom in on frames when a beat is detected or cut to the next clip when a beat is detected

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.