Package toon :: Module mencoder
[hide private]
[frames] | no frames]

Module mencoder

source code

Converts a series a JPEG images to a MJPEG-4 video file using mencoder.

The output will be in the same dirctory than the inputs. It is possible to append the path to the mencoder executable like this : os.environ['PATH'] += ":/Applications/Toonloop.app/Contents/Resources/bin"

An other useful beautiful line of code : mencoder -oac copy -ovc copy *.mov -o final_movie.mov

Classes [hide private]
  MencoderError
Any error this module can raise.
Functions [hide private]
 
cb_error(command_failure, args) source code
 
cb_success(result, args)
Called once a bunch of child processes are done.
source code
 
jpeg_to_movie(filename_pattern, path='.', fps=12, verbose=False, w=640, h=480)
Converts a series a JPEG images to a MJPEG movie.
source code
Variables [hide private]
  mencoder_executable = '/usr/bin/mencoder'
  movie_name_suffix = ''
  __package__ = 'toon'

Imports: os, pprint, sys, traceback, StringIO, defer, reactor, protocol, utils, failure, procutils


Function Details [hide private]

cb_success(result, args)

source code 

Called once a bunch of child processes are done.

@param success_results a tuple of (boolean,str) tuples @param commands is a list of the provided commands @param callback is a callback to call once done.

Args are: the command that it the results if from, text data resulting from it, callback to call once done. callback should be called with the same arguments. command, results, callback (but results can be something else than text)

This is the default callback for commands. You should provide an other callback as argument to the commands starter functions. You can copy-paste this one to start with.

jpeg_to_movie(filename_pattern, path='.', fps=12, verbose=False, w=640, h=480)

source code 

Converts a series a JPEG images to a MJPEG movie.

:param input_files: string with a wildcard such as "spam_*.jpg" :param output_file: string such as "output.mov"