4

I'm trying to burn subtitles into a video. My subtitles are in CP1252 and I have this error, I don't know why:

[NULL @ 0x5fe0040] Unable to find a suitable output format for 'CP1252' CP1252: Invalid argument

ffmpeg -i input.mkv -acodec aac -ar 48000 -ab 128k -ac 2 -s 720x404 -vcodec libx264 -level 3.1 -tune film -preset slow -crf 19 -vf -sub_charenc CP1252 subtitles=sub.srt output.mp4

Note: If I delete -sub_charenc CP1252 it works but I have subtitles problems.

Kaayo25
  • 73

1 Answers1

4

Your syntax is malformed. The sub_charenc is a decoder option and applies when the subtitle file is fed as a regular input. The subtitle filter, however, takes in its input directly.

Use

ffmpeg -i input.mkv -vf subtitles=sub.srt:charenc=CP1252
       -s 720x404 -c:v libx264 -level 3.1 -tune film -preset slow -crf 19  
       -c:a aac -ar 48000 -b:a 128k -ac 2 output.mp4

You may have to quote the codepage i.e. 'CP1252' or "CP1252"

Gyan
  • 38,955