cabiria

module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2020 License: MIT

README

Film poster for Cabiria (1914)
Film poster for Cabiria (1914). Original artwork by Leopoldo Metlicovitz.

Cabiria

An ASS intertitle generator, for silent films.

StatusKey ObjectivesSystem RequirementsInstallBasic UsagePlanned UsageContributingLicense

[Build Status] GitHub go.mod Go version [Go Report Card]

⚔️ 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

  1. Clone this repository for the bleeding edge version, or download from the Releases page for a stable version.
  2. Run:
make install
  1. 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:

  1. Fork the master branch of this repository.
  2. Run make install
  3. 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.
  4. Run cabiria-processdata. This will generate data/intertitle/data.csv, which holds the training data.
  5. Run cabiria-trainer. This will generate data/intertitle/intertitlePredictor.model, which is the saved predictor.
  6. Run make install, which will install the new predictor on your machine.
  7. Try and generate intertitles for your film again, and see if there is an improvement.
  8. 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL