Film poster for Cabiria (1914). Original artwork by Leopoldo Metlicovitz.
Cabiria
An ASS intertitle generator, for silent films.
Status •
Key Objectives •
System Requirements •
Install •
Basic Usage •
Planned Usage •
Contributing •
License
⚔️ Status
Cabiria is available for general usage!
🛡️ Key Objectives
- Generate pretty ASS intertitles, in a style that is not jarring.
- Provide a method for users to improve the generation accuracy (see Contributing)
👺 System Requirements
- Linux
- Golang
- ffmpeg
- mediainfo
🗡️ Install
- Clone this repository for the bleeding edge version, or download from the Releases page for a stable version.
- Run:
make install
- Start generating!
🤺 Basic Usage
• Generate intertitles
To generate appropriate styled intertitles for existing (e.g. LesVampires1915.srt
) subtitles:
cabiria-generate -video LesVampires1915.mkv -srt LesVampires1915.srt -ass LesVampires1915.ass
🎭 Planned Usage
cabiria-resync
: Sync external subtitles to detected intertitles in a video.
🐉 Contributing
• Submit training data
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 with intertitle.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 generate data/intertitle/data.csv
, which holds the training data.
- Run
cabiria-trainer
. This will generate data/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. :)
• Code changes
If you wish to make a code change, then I suggest making an issue for your proposal.
🦄 License
See LICENSE