[FFmpeg-user] Subtitle Error - Suggestion

Jim Ruler2112 at charter.net
Mon Feb 1 04:55:05 EET 2021


I recently made a video that I wrote subtitles for - my first time 
writing them myself.  When I tried to burn them into the video using 
ffmpeg, it gave me the following:

[Parsed_subtitles_0 @ 0x554ed40] Shaper: FriBidi 1.0.1 (SIMPLE)
[Parsed_subtitles_0 @ 0x554ed40] Unable to open comments.srt
[AVFilterGraph @ 0x5528140] Error initializing filter 'subtitles' with 
args 'comments.srt:force_style=Fontsize=26'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid data found when 
processing input
Error while processing the decoded data for stream #0:0


After pulling my hair out trying to figure out why it couldn't find 
comments.srt when it was plainly right there, I gave up & tried a 
different tool.  It told me that there was an error in the SRT file 
structure.  Sure enough, I'd forgotten to include the milliseconds:

1
00:00:31 --> 00:00:35
My text was here.

was supposed to be

1
00:00:31,000 --> 00:00:35,000
My text was here.


After I added ,000 to every timestamp in the SRT file, ffmpeg worked 
perfectly.

My suggestion is simple - instead of having ffmpeg report that it is 
unable to open the file, make it say something like 'invalid subtitle 
structure' or 'fix your subtitle file stupid'. ;)  Really, just change 
the wording to be something relevant to what is wrong in order to make 
it easier to figure out what's wrong.

Jim


More information about the ffmpeg-user mailing list