jonghwanhyeon / python-ffmpeg

A python binding for FFmpeg which provides sync and async APIs
MIT License
302 stars 53 forks source link

SRT Subtitles with pyton-ffmpeg #27

Closed EliasLumer closed 1 year ago

EliasLumer commented 1 year ago

I am trying to use your wrapper to input a .webm video, as well as hardburn .srt subtitles onto the video (force_style=Alignment=6, Fontsize=48, Outline=5, Shadow=1, Fontname='KOMIKAX')

Is this possible with your wrapper?

jonghwanhyeon commented 1 year ago

If your task can be done using ffmpeg, it can also be done using this wrapper.

According to the document,


ffmpeg = (
    FFmpeg()
    .option("y")
    .input("input.mp4")
    .output(
        "ouptut.mp4",
        vf="subtitles=subtitle.srt",
    )
)
EliasLumer commented 1 year ago

Ah great -- would you know how to change the font to a specified font in my directory? and the font color?