[Bf-python] embedding timecode

Jonathan Merritt j.merritt at pgrad.unimelb.edu.au
Mon Mar 28 16:33:00 CEST 2005


Hi Jocen,

>I am searching for an easy method to embed the timecode into each frame.
>  
>

If you can find a way to render the text you require into a Blender
image buffer, you could do this efficiently in C using a sequence
plugin.  Actually rendering the text into the image buffer is the
difficult bit; compositing it onto the frame in the plugin is easy.

Alternatively, if you fetch the framerate (available from
Blender.Render.RenderData objects using  the framesPerSec() method), you
could do this using a script that post-processes a sequence after it has
been rendered.  To do the actual post-processing, you can use the Python
Imaging Library (PIL):
       http://www.pythonware.com/products/pil/
PIL can draw on an image using either bitmap or OpenType/TrueType
fonts.  There is lots of documentation available on their website.

Hope the above helps.  I have used PIL for quick timecoding / frame
marking of several sequences.  I find myself using a script that runs
completely outside of Blender most of the time, because I also use it
for sequences rendered by Aqsis.

-- 
Jonathan Merritt BE(Mech)/BSc
PhD Student - Equine Biomechanics
The University of Melbourne
Veterinary Clinical Centre, Werribee




More information about the Bf-python mailing list