VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date
    Feb 2011
    Location
    United States
    Search Comp PM
    I have successfully used ffmegX's subtitle burning feature to burn in english subtitles. However, when I use an SRT file with Arabic subtitles, the resulting MP4 does not show any subtitles burned into the video stream. At first, I used all the default values on the Filters page, but checked VOB Subtitles, selected 1, Burn, and loaded the SRT file. This resulted in no subtitles burned. I also tried changing the Text encoding to ISO-8859-6, but this made no difference. The SRT is well-formed and displays fine in Jubler. Opening with TextEdit (Mac) shows the arabic script fine.

    I have successfully used other language subtitles (English, Spanish, Portuguese), but Arabic doesn't work. Any suggestions?
    Quote Quote  
  2. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by eswenson View Post
    At first, I used all the default values on the Filters page, but checked VOB Subtitles, selected 1, Burn, and loaded the SRT file. This resulted in no subtitles burned.
    The Subtitle options {VOB subtitles, subtitle stream number, Burn} don't do anything for .srt subtitles. These three only have meaning for VOB-style subtitles inside VOB files or MKV files (as source file).

    Originally Posted by eswenson
    I also tried changing the Text encoding to ISO-8859-6, but this made no difference.
    The correct text encoding for arabic is CP 1256, UTF-8, or ISO-8859-6. I think CP 1256 (Windows Arabic) is the most common on the interwebs. Unfortunately, Code Page 1256 is not in ffmpegX. Which means you have to convert to e.g. UTF-8 with TextEdit or Jubler, if your .srt uses this text encoding.

    Besides the correct text encoding, you also have to select a font that has arabic glyphs: AlBayan or STHeiti. The other fonts in ffmpegX do not have arabic characters.
    Quote Quote  
  3. Member
    Join Date
    Feb 2011
    Location
    United States
    Search Comp PM
    Thanks for your reply. I'll not bother to set the VOB Subtitles options in the future (I was following a web post that said these were required!).

    I found that with Jubler, I was not able to use any other encoding than UTF-8, so that is what I chose. But when I select UTF-8 as the encoding in ffmpegX, the results were all messed up. However, I don't think I tried the AlBayan or STHeiti fonts -- I'll give them a try and see what happens.

    Other posts, however, have suggested issues with right-to-left languages -- will that be an issue for me here?

    I did notice that simply loading the UTF-8 .srt files into VLC along with my video resulted in the correct rendering of the Arabic subtitles. No other config was necessary. This leads me to believe that the .srt file are fine, as is, and it is simply a matter of getting the right fonts. I'll let you know how that goes.

    Again thanks. -- Eric
    Quote Quote  
  4. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by eswenson View Post
    Other posts, however, have suggested issues with right-to-left languages -- will that be an issue for me here?
    Not sure, as I can't read arabic. But my test does look a bit different from the .srt in TextEdit or VLC.
    (if you read this, Major, can you settle this?)

    Originally Posted by eswenson
    [...] This leads me to believe that the .srt file are fine, as is, and it is simply a matter of getting the right fonts. I'll let you know how that goes.
    Please do.

    There can be an additional issue with the Lion version of ffmpegX, but since you didn't mention your OS version, I'll wait for your reply first.
    Quote Quote  
  5. Member
    Join Date
    Feb 2011
    Location
    United States
    Search Comp PM
    I haven't had a chance yet to try out the fonts you suggested, but thought I'd mention that I am running on Lion.
    Quote Quote  
  6. Member
    Join Date
    Feb 2011
    Location
    United States
    Search Comp PM
    I did try out both the AlBayan and STHeiti fonts, but my subtitles were displayed mostly as just "_" characters in both cases. So this didn't work. I also found that if I didn't check the "VOB Subtitles" checkbox and select "1" from the drop-down, that no subtitles were burned at all. I'm selecting a Text encoding of "UTF-8" since this appears to be what the .SRT file is using.

    So I still don't have a solution here. What is strange is that VLC has no issue displaying the subtitles corrrectly. I simply start up VLC, select the option to "Advanced Load File..." and then select the MP4 file and the .SRT file. The video then displays with overlaid subtitles in some font (not sure what it uses). The resulting arabic script looks the same as Jubler shows in the .SRT file editor -- and which I assume is "good".

    So how can VLC do it?
    Quote Quote  
  7. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Originally Posted by eswenson View Post
    I did try out both the AlBayan and STHeiti fonts, but my subtitles were displayed mostly as just "_" characters in both cases. So this didn't work.
    There is a bug in ffmpegX-Lion in that mencoder always uses the Arial font, regardless of what font you selected. Only the developer can fix that. I'm also not convinced the right-to-left text direction is done properly, as the preview by mplayer (which does not have the font issue) looks quite different from the TextEdit and VLC display.

    I'll show an alternative below.

    Originally Posted by eswenson
    So how can VLC do it?
    VLC is open source. Feel free to examine their code.
    But seriously, ffmpegX and VLC are too different to make conclusions about how they handle certain options.
    ffmpegX probably needs newer compilations of the binaries to handle some stuff that it has issues with now. Again, this is up to the developer. The binaries are from 2006, and the code has been improved a lot since.

    Now for the alternative solution to your original problem:
    There is this 3rd party QuickTime component, that extends QuickTime's capabilities and includes subtitle support: Perian.
    ffmpegX can make use of this component for the subset of conversions that make use of QuickTime.
    So this alternative solution is to bypass ffmpegX's subtitle feature and use Perian instead.

    1/ Install Perian. Subtitle support is ON by default.
    2/ Make sure the base name of the movie and the subtitles match: e.g. "movie-1.mp4" and "movie-1.srt".
    3/ Put the files in the same folder.
    These two steps ensure that Perian will find the subtitles by itself.
    Try playing the file in QuickTime Player 7 to see if the subtitles are rendered correctly. A UTF-8 .srt file should work fine.

    4/ Load the source file in ffmpegX.
    5/ Set preset that allows for QuickTime decoding, e.g. "h264 x264" (MP4) or "XviD ffmpeg" (AVI)
    6/ Set "Decode with QT" in the Option tab.
    7/ Optionally set other options as needed.
    8/ Do not specify subtitles in ffmpegX.
    9/ Encode.

    The font that Perian uses is quite bold, compared to how other players render subtitles, and it has no font options at all, but it works.
    Quote Quote  



Similar Threads