ffmpeg to embed subtitles [closed]

Intend to collect some stuff for academical purpose, to introduce in a seminary.
Attempting to embed subtitles in the frames of a mp4 file, below some commands that i’ve been tried out:

ffmpeg -i input.mp4 -vf subtitles=subt.srt output.mp4 

ffmpeg -i VID_20230918_161450.mp4  -f srt -i subtitles1.srt -map 0:0 -map 0:1 -c:v copy -c:a copy -c:s mov_text output.mp4

ffmpeg -i seu_video.mp4 -vf "subtitles=seu_arquivo.srt" -c:v libx264 -c:a aac -strict experimental -b:a 192k -y seu_video_com_legendas.mp4

…according to the major issues/responses/or “oracles” around the web.

With the first one, i got as response:

[AVFilterGraph @ 0x557e87157240] No such filter: ‘subtitles1.srt’ < br/> > Error reinitializing filters!

The second creates the output.mp4 but it comes without subtitles.

The third, surprisingly, was well succed, for a moment. I will explain:
as i’d to translate the video, I wanted to conduct some tests… At the first, the mp4 had a little more than few seconds, which was well succed. Calling the purposed video, it brokes:

[Parsed_subtitles_0 @ 0x558e29010280] Unable to open subtitles1.srt

…subtitles.srt which is exatcly the same file tried firstly.

“Phantonessly”, both of they, the test and the purposed video ones, doens’t work anymore.

I made up some changes here and there, but for summarize is it.
The SRT file have none syntax erros, as you can see:

1
0:0:0.000 –> 0:3:0.000
test, teste, teste, á?

It’s for academical purposes.

Thanks.

  • I’m voting to close this question because , as the ffmpeg tag states: Only questions about programmatic use of the FFmpeg libraries, API, or tools are on topic. Questions about interactive use of the command line tool should be asked on superuser.com or video.stackexchange.com. Please delete this.

    – 

Leave a Comment