Log in

View Full Version : Linux + SUP Subtitles


jason50146
19th April 2009, 20:42
I thought I would pass on some experience gained this weekend. Searches indicate this is not covered elsewhere, specifically, for Linux.

I was working on recoding the blu-ray U.S. version of A Bridge Too Far. This movie has multiple languages and the non-english portions are covered by forced subtitles. To my knowledge, there are no re-coding utilities, or players, for Linux that directly support blu-ray SUP. However, you can convert them to vobsub format. The procedure is simple.

First, demux the graphics stream desired from the m2ts. I use TSMuxer, which is available for linux.

Next, use BDSup2Sub (http://forum.doom9.org/showthread.php?t=145277&highlight=bdsup2sub) to convert the SUP subs to vobsub format. This utility is written in Java, so it works just fine under Linux, as long as you have Java installed. Once downloaded and unzipped, you can run it from shell with the following:

java -server -jar BDSub2Sub.jar

It did a great job of pulling in and converting the SUP file to vobsub. Once you have the vobsub file, you can handle the subtitles just like you have in the past.

Hope this helps!

-Jason

ggking7
20th April 2009, 16:01
Nice Jason, subtitles for Blu-Ray discs will come in very handy.

0xdeadbeef
20th April 2009, 21:21
Nice to hear that it works under Linux without problems. I hoped so but was too lazy to try ;)
Now if someone could report that it works under Mac Os X as well.

ggking7
22nd April 2009, 23:10
I have the "El Norte" Blu-Ray and I'd like to see English subtitles. How can I get the sup subtitles so I can use BDSup2Sub?

I usually decrypt and rip with dumphd, demux with eac3to, and then remux with tsmuxer. I've never bothered with subtitles before since sup doesn't work in linux yet.

EDIT: I think I see how to do it. I'll report back.

ggking7
6th May 2009, 19:50
I've got an .idx and .sub file now. Does anyone know how to write a tsmuxer meta file to include subtitles? I tried adding this:

S_TEXT/UTF8, subtitles.sub, video-width=1920, video-height=1080, fps=24

but I got:

Can't convert source text to UTF-32. Invalid chars sequence.

If I switch to "S_HDMV / PGS", I get:

Unsupported codec S_HDMV / PGS

jason50146
7th May 2009, 03:00
I've got an .idx and .sub file now. Does anyone know how to write a tsmuxer meta file to include subtitles? I tried adding this:

S_TEXT/UTF8, subtitles.sub, video-width=1920, video-height=1080, fps=24

but I got:

Can't convert source text to UTF-32. Invalid chars sequence.

If I switch to "S_HDMV / PGS", I get:

Unsupported codec S_HDMV / PGS

I do not know the exact answer to your question, and you have probably already tried this, but there is a GUI for TSMuxer. Have you checked the contents of the meta file it creates when you set up subtitles?

Edit: There is a thread for TSMuxer in the authoring section. You may find something there. http://forum.doom9.org/showthread.php?t=134104&highlight=tsmuxer+subtitle

nm
7th May 2009, 08:41
I've got an .idx and .sub file now. Does anyone know how to write a tsmuxer meta file to include subtitles?
TSMuxeR can only import BD-SUP (PGS) and SRT subtitles, so VobSub needs to be converted to a text-based format first. I haven't seen tools that could convert VobSub to BD-SUP.
However, since your subtitle source is BD-SUP, you could simply feed that to TSMuxeR.

Whatever the source format is, TsMuxeR can only give you a M2TS/TS stream with BD-SUPs, so it won't help you with getting the subtitles to display in Linux players.

I usually decrypt and rip with dumphd, demux with eac3to, and then remux with tsmuxer.
To get VobSub subtitles working, you'll need to remux everything to Matroska container with mkvmerge. Subtitles can be either muxed to the MKV file or kept in properly named separate files.

ggking7
7th May 2009, 15:59
Thanks jason and nm. The last time I tried mkvmerge it created an a/v sync problem no matter what I did when used with eac3to. Has anyone been able to use eac3to+mkvmerge without sync trouble?

ksa242
19th June 2013, 19:11
To my knowledge, there are no re-coding utilities, or players, for Linux that directly support blu-ray SUP. <…> Use BDSup2Sub to convert the SUP subs to vobsub format.

When I was recently faced with ripping BD-SUP subtitles to a usable SRT, I realised the situation is pretty much the same in 2013. I've decided neither to try my luck with Wine and various Windows utils, nor to install Java runtime just for BDSup2Sub, but to code a native transcoder.

Through the years of occasional DVD ripping I've grown used to the following procedure: extract the program stream with tcextract (transcode suite), convert it to PGM images w/ timecodes with subtitle2pgm (subtitleripper), then OCR it. So the only logical choice for me was to make a functional replacement for subtitle2pgm that can handle BD-SUP, and here it is: sup2pgm (https://github.com/ksa242/sup2pgm)

It's pretty much in beta right now, so any feedback is appreciated.

paradoxical
19th June 2013, 19:35
When I was recently faced with ripping BD-SUP subtitles to a usable SRT, I realised the situation is pretty much the same in 2013.

That's untrue. ffmpeg had Bluray PGS support added 4 years ago. VLC has had the same for around 3 years or so. Handbrake added Bluray subtitle support about a year and a half ago. If the player or utility you use in 2013 still doesn't support Bluray PGS than it's likely junk.

Selur
19th June 2013, 21:43
@paradoxical: at least the latest ffmpeg compiled with libbluray can't extract pgs subtitles here,... (there's also an entry about it in the bug tracker: https://ffmpeg.org/trac/ffmpeg/ticket/2208)
-> How do you extract pgs subtitles with ffmpeg? (most of the time I can use tsMuxeR as alternative, but whenever the current mpls consists of too many m2ts files, tsMuxeR always creates to large output file names :()

ksa242
20th June 2013, 13:07
That's untrue. ffmpeg had Bluray PGS support added 4 years ago. VLC has had the same for around 3 years or so. Handbrake added Bluray subtitle support about a year and a half ago. If the player or utility you use in 2013 still doesn't support Bluray PGS than it's likely junk.

I was not talking about media players; in fact, I'm using mplayer as a reference BD-SUP renderer.

Handbrake is masked in Gentoo and depends on masked bleeding edge libs, which I'm not yet ready to accept. Can it convert PGS subtitles to anything else, preferably OCRable?