Skip to content

rkulyassa/burner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

burner

Motivation

In the modern content space, subtitling videos has become standard practice, especially for short-form content. Many existing tools for this are paywalled or limited in functionality. burner aims to be a FOSS alternative providing advanced subtitling capabilities and simple implementation in Python.

Workflow

  1. Transcribe audio with whisperX
  2. Create text frames with Pillow
  3. Burn subtitles and render with ffmpeg

Usage

For now, download and import locally. I'll upload this to PyPI when I get around to it.

from burner import Burner, SubtitleOptions

with Burner("input.mp4") as burner:
    options = SubtitleOptions(font_size=90.0, font_fill=(255, 255, 0))
    burner.burn("output.mov", options=options)

Sample Output

Note: accuracy processing time are dependent on your machine and the whisper model you're running. burner is really only responsible for the subtitle generation.

output.mp4