FFmpeg Subtitle Filter Failing to Correctly Render Complex Tamil Characters

I am trying to burn subtitles into a video using FFmpeg. The subtitles are for a video in the Tamil language, and the source is an .srt file.

The issue I’m facing is with FFmpeg’s font rendering for complex, multi-part characters. In the Tamil script, certain consonant-vowel combinations are represented by a base consonant character followed by a vowel sign. The rendering engine is supposed to combine these into a single glyph. However, FFmpeg is rendering them as two separate, unjoined characters.

For example, the character for ku is being displayed as the consonant க் followed by the vowel sign ு, instead of the single correct character கு.

Following is the code I used.

ffmpeg -loop 1 -i background.png -i audio.mp3 -shortest -vf "subtitles=3.srt:force_style="Fontname=Catamaran"" -c:v libx264 -pix_fmt yuv420p -c:a copy output.mp4

I have tried with default font as well as other fonts like Catamaran, NotoSansTamil. But I am getting two separate unjoined characters in all cases. Any help would be greatly appreciated.

Read more here: Source link