Created
September 3, 2019 10:39
-
-
Save nazarovsky/11db50fd51ea425270948893c123eb79 to your computer and use it in GitHub Desktop.
ffmpeg: cut segment, convert into gif and integrate subtitles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ms.avi = Avengers: Infinity war | |
ffmpeg -ss 2:11:55 -i Ms.avi -r 1/1 Palette.png | |
ffmpeg -y -ss 2:11:38 -t 43 -i Ms.avi -filter_complex "fps=8,scale=420:-1:flags=lanczos,subtitles=Ms.srt:force_style='Fontsize=32',palettegen" palette.png | |
ffmpeg -y -ss 2:11:38 -t 43 -i Ms.avi -i palette.png -filter_complex "fps=8,scale=420:-1:flags=lanczos,subtitles=Ms.srt:force_style='Fontsize=32'[x];[x][1:v]paletteuse" output.gif | |
Ms.srt | |
0 | |
00:00:06,300 --> 00:00:07,800 | |
МУЦАРАЕВА ВКЛЮЧИ | |
1 | |
00:00:15,000 --> 00:00:17,000 | |
ДОРОГОЙ ТЕБЕ НЕЛЬЗЯ МУЦАРАЕВА, ОН ВЫЗЫВАЕТ АУТИЗМ | |
2 | |
00:00:019,700 --> 00:00:21,000 | |
МУЦАРАЕВА ХОЧУ | |
3 | |
00:00:028,000 --> 00:00:30,000 | |
НО Я ПЫТАЮСЬ ОБЪЯСНИТЬ... | |
4 | |
00:00:033,700 --> 00:00:35,700 | |
МУЦАРААЕВ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment