I am having an issue where i am unable to add arabic subtitles to an mp4
video. My old laptop running Ubuntu 20.04
can export video with arabic subtitles just fine. But on a new PC running Ubuntu 20.04
i cant't seem to do the same thing.
Please have a look of the code below.
generator = lambda txt: TextClip(txt, font='Arial', fontsize=24, color='white')
subtitles = SubtitlesClip(final_subs, generator)
video = VideoFileClip("english.mp4")
result = CompositeVideoClip([video, subtitles.set_pos(('center','bottom'))])
result.write_videofile("output_english.mp4", fps=video.fps, temp_audiofile="temp-audio.m4a", codec="libx264", audio_codec="aac", threads=12, verbose=False)
Where this is the content of final_subs
The exported video has contains only the sentence punctuation, and not the Arabic text. I have tried other languages and they work fine, this is only the case with Arabic
The image below shows the punctuation subtitles without text.