A command line interface for the pycaption module.
python setup.py install
From your command line:
pycaption <path to caption file> [--sami --dfxp --srt --transcript --vtt --unpositioned_dfxp]
e.g.
pycaption ../caption.scc --dfxp --transcript
Output is written to the screen. To write to a file, use something like this:
pycaption ../caption.scc --dfxp > caption.xml
- SCC (read)
- SRT (read/write)
- SAMI (read/write)
- DFXP (read/write)
- VTT (read/write)
- Transcript (write)
-
--read_invalid_positioning(a bool parameter with this key will be passed to all readers who accept it). This parameter has effect only on the DFXPReader currently. Its effect is that the reader will try to parse positioning info the best it can, even if it doesn't conform to the specs (for instance attributes liketts:originthat are specified on elements where they should have no meaning. -
--video_heightand--video_width. These will serve when converting to webvtt, if the input source file has units other than percents. WebVTT will only output percent units, but in order to do this, the video height and witdh must be specified (so we know that 32px means 5% of 640 for instance) -
--unpositioned_dfxp. This acts like--dfxp, but the file it outputs, will only contain a default positioning of bottom center, for every caption
This module is Copyright 2012 Joe Norton and is available under the Apache License, Version 2.0.