ffmpeg-python
ffmpeg-python copied to clipboard
How to display the following subtitles when there are multiple lines at a particular time?
I was trying to figure out how to write subtitles for the various places I plan to put them, but I couldn't come up with an answer, so I decided to ask for help.
import ffmpeg
mp4 = ffmpeg.input('input.mp4')
subtitle = ffmpeg.input('test.vtt')
out = ffmpeg.output(mp4, subtitle, 'output.mp4', vcodec='copy', acodec='copy', scodec='mov_text', **{'metadata:s:s:0':"language=eng"})
out.run()
WEBVTT
00:01.000 --> 00:30.000 line:70% position:30.00% align:start
test 1
00:01.000 --> 00:30.000 line:85% position:32.00% align:start
test 2
did you find a solution?