Thursday, February 2, 2012

How to convert Arabic .srt subtitle to PSG (.Sup) using tsMuxeR ?

I have been experimenting lately with tsmuxer (linux version) to convert some mkv files into ts streams, to watch them on PS3, Thankfully, Crank at Archlinux provided a GUI for the tool which makes the process easy even for newbies.
Tsmuxer capable of outputing the file into AVCHD, Bluray structure or directly Ts stream.
one of the features less mentioned on the technical forums , is abiltiy to convert .srt subs PSG ( the format used in bluray disks, similar to IDX on DVDs), unfortunately no Support for Arabic subtitles, (words reversed, letters disconnected, same result we had back then on Ps3Showtime, so I asked myself why not try to modify the Arabic subtitles with the same tool used to render the Arabic subs into readable form on Ps3SHowtime? to my surprise , it worked like charm, finally, we had proper Arabic PSG subs , compatible with Ts streams (mkv containers as well) and ready to burned on bluray movies, one more thing, we can convert this PSG subtitle into IDX or XML using java-based BdSup2sub tool programmed by e[as far as i know , no such way was available on linux to do so]
here is a short How-to Guide:
1-refer to this page to convert the Arabic subtitles into ps3showtime compatilbe , readable subtitle.
2- then TsMuxeR to mux all streams into Ts file, actually we do this to convert .srt to .sup subtitles ,

3- once this is done,we demux the Ts file we made with tsumuxer again, the output is basically all the streams we used first to produce the Ts file plus .Sup subtitles
4-if all you need Sup subtitles, the job is done, but if you want to convert it further into IDX or xml png , use java-based tool, BDSup2Sub, to do so.
now you can Enjoy your Bluray Movie with Arabic subtitles

if you have troube running TsmuxeR gui, you can use this Meta File after you modify it according to your streams (notice , this meta requires tsMuxer tool)

MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr --vbv-len=500
V_MPEG4/ISO/AVC, "little.mosque.on.the.prairie.s05e01.720p.hdtv.x264-aero.mkv", fps=23.976, insertSEI, contSPS, track=1, lang=eng
A_AC3, "little.mosque.on.the.prairie.s05e01.720p.hdtv.x264-aero.mkv", track=2, lang=eng
S_TEXT/UTF8, "little.mosque.on.the.prairie.s05e01.720p.hdtv.x264-aero.mkv",font-name="Arial",font-size=65,font-color=0x00ffffff,bottom-offset=24,font-border=2,text-align=center,video-width=1280,video-height=720,fps=23.976, track=3, lang=und
S_TEXT/UTF8, "",font-name="Arial",font-size=65,font-color=0x00ffffff,bottom-offset=24,font-border=2,text-align=center,video-width=1280,video-height=720,fps=23.976, lang=ara