Persian/Farsi videos subtitle problem?
I have problem with subtitle in Persian/Farsi using all good video players.
I have tested all reading options formats (all different area and language to read), but all did not work. I can type Farsi, but it can not show subtitle to Farsi.
Solution 1:
If you have VLC may be I can help you.
Go to VLC:
- Click Tools and next Preferences
- Click Subtitle & OSD
- In section Subtitle Language and Default encoding
- Select Arabic (Windows-1256)
- In section font select the Tahoma font
Solution 2:
This is very simple using VLC :
- Go to Edit Menu
- Click on Preferences
- Change encoding to Arabic(Windows-1256)
- Change the Font to a Persian Font (I prefer B Nazanin)
Enjoy!
Solution 3:
This is a Python3 code for converting Persian/Farsi subtitles into the ones with UTF-8 encoding.
def correctSubtitleEncoding(filename, newFilename, encoding='windows-1256'):
with open(filename, 'r', encoding=encoding) as fr:
with open(newFilename, 'w', encoding='utf-8') as fw:
for line in fr:
fw.write(line[:-1]+'\r\n')