Film poster for Cabiria (1914). Original artwork by Leopoldo Metlicovitz.
Status • Key Objectives • System Requirements • Install • Basic Usage • Planned Usage • Contributing • License
Cabiria is available for general usage!
- Generate pretty ASS intertitles, in a style that is not jarring.
- Provide a method for users to improve the generation accuracy (see Contributing)
- Linux
- Golang
- ffmpeg
- mediainfo
- Clone this repository for the bleeding edge version, or download from the Releases page for a stable version.
- Run:
make install
- Start generating!
To generate appropriate styled intertitles for existing (e.g. LesVampires1915.srt
) subtitles:
cabiria-generate -video LesVampires1915.mkv -srt LesVampires1915.srt -ass LesVampires1915.ass
cabiria-resync
: Sync external subtitles to detected intertitles in a video.
If you find that the application isn't generating accurate intertitles, then consider submitting some training data for the predictor model. To do so:
- Fork the master branch of this repository.
- Run
make install
- Add some training frames to
data/intertitle/frames
... importantly, if it is an intertitle frame, make sure that the name ends withintertitle.png
(and not if not). Some suggestions / requirements:- The images should be in PNG format.
- Try to select a variety of images, and balance the number evenly between intertitle images and non-intertitle images.
- Use
ffmpeg -i <videoPath> -r 1 -vf scale=64:48 <outputPath>/<filmName>%06d.png
to extract frames from a video for inclusion, as this is (roughly) what cabiria will use when running the generation process. - This will bulk rename all files in the current directory to have suffix intertitle.png:
ls | xargs -I fileName mv fileName fileName.intertitle.png
. - Please try not to submit more than ~60 images for a given film.
- Run
cabiria-processdata
. This will generatedata/intertitle/data.csv
, which holds the training data. - Run
cabiria-trainer
. This will generatedata/intertitle/intertitlePredictor.model
, which is the saved predictor. - Run
make install
, which will install the new predictor on your machine. - Try and generate intertitles for your film again, and see if there is an improvement.
- Make a Pull Request into master, so that we may all benefit from your addition. :)
If you wish to make a code change, then I suggest making an issue for your proposal.
See LICENSE