Code
- Node.js
- Python
- cURL
How the FFmpeg command works
-i {{in_video}}— input video-ss 00:00 -to 01:00— only burn subtitles into the first minute (drop this to process the full video)-vf subtitles={{in_srt}}— subtitles video filter reads the SRT file-c:v libx264 -crf 20— re-encode video (required, since the filter modifies frames)-c:a aac -b:a 192k— re-encode audio{{out_1}}— output file
-c:s mov_text with an MP4 container and skip the -vf filter.