Log in

View Full Version : How to extract DVB-SUB from ts with ffmpeg ?


Music Fan
23rd November 2013, 16:05
Hi,
I'd like to know if there is a way to extract the dvb subtitles from a ts file (h264 in 1080i) with ffmpeg.
I also would like to know if there is a way to add DVB-SUB in ts.
After what I read it seems possible but I didn't find working command or clear tutorial.
My goal is to change the position of the subtitles (and perhaps also its timecode when it is displayed too late or too early), I believe the OCR step is not needed for this.
If a solution using another tool exists, I'm also interested of course.
Thanks ;)

kalehrl
23rd November 2013, 20:54
It is possible with ProjectX to extract subtitles even though h264 video can't be processed with it.

Music Fan
24th November 2013, 12:31
Thanks. Actually I had already tried with ProjectX but there are problems with colors (all lines have different properties, I see this in SubtitleCreator) and it seems the sup is converted in 720.576.
I'd like to keep it in 1920.1080 if possible.
If not, I have to find a way to edit the sup colors, change the resolution to 1920.1080, change the position (they are too high) then convert it to DVB-SUB if possible to put it again in TS. If not possible, I will have to make a Blu-ray sup and make an AVCHD (or so called by multiAVCHD).

kalehrl
24th November 2013, 15:09
There are subtitle options in ProjectX that can be tweaked:
http://i44.tinypic.com/28vc27r.png
I use 'additional export as vobsub' and you can also try setting a different 'IRD color model'. SVT works best for me.

Music Fan
24th November 2013, 15:38
Thanks, I had also tried additional VobSub but there were also color problems with that. But I will try SVT ;)
By the way, do you know if ProjectX can keep HD subtitles in HD ?

kalehrl
24th November 2013, 15:53
I don't know but you can ask the author on the dvbtechnics forum:
http://forum.dvbtechnics.info/forumdisplay.php?f=16

Music Fan
24th November 2013, 16:22
Thanks, I would prefer to avoid a new inscription on a forum, but I will look at this.

edit : this topic is interesting ;
http://forum.dvbtechnics.info/showthread.php?t=31788

I tested the command SubtitlePanel.enableHDSub=1 but it didn't change anything.
But SVT gave good colors, except on 1 line (on an extract containing only 17 lines).

Music Fan
24th November 2013, 17:58
Subtitle Edit can open the sub/idx created by ProjectX and make OCR very well :) The timecode looks good.
If I redo the subtitles from text, the result will be much better than if I simply resize the sub from 720.576 to 1920.1080 without making OCR.

Now I just have to find the way to adjust position on a HD picture with black bars (2.35 movie) ; I like to have a line in the picture and the second line in the black bar.
And when there is only 1 line, it should be below (in the black bar) and not above (in the picture).
If anyone knows how to ... ;)

Music Fan
24th November 2013, 18:39
Actually Subtitle Edit can create Blu-ray sup as I want :) ; the only little problem is that the space between the 2 lines is short.
Is there a tool that allow to choose the size of this space ?
On Blu-ray's, this space is generally bigger.

Ghitulescu
25th November 2013, 09:18
By the way, do you know if ProjectX can keep HD subtitles in HD ?
Yes I use PjX to extract subtitles from Satellite DVB-S2 streams.

Music Fan
25th November 2013, 10:39
How do you do to keep them in HD ?
Mine are converted in 720.576 while "enable HD subtitle" is checked in options.

Ghitulescu
25th November 2013, 16:25
I don't remember exactly, last time I did it was two or three years ago.

Music Fan
26th November 2013, 12:34
Ok, anyway I get best results by doing OCR and creating a new sup with Subtitle Edit, so the sub/idx created by ProjectX is enough for me.
By the way, I asked to Subtitle Edit's developer to add a setting to adjust the size of the space between the two subtitle lines and he did it ! :)
It's the "line height" setting, which moves the first line without moving the second (for which we can use the "bottom margin" setting).
He sent me a test version, I guess it will be available in the next official release.

von Suppé
1st January 2014, 23:33
Yes, version 3.3.11 has line height adjustment in export. Very cool indeed! Did you play with the settings? You can even make subtitles overlap each other.

I tended to use easySup for converting text to sup, but it has a 24 fps bug.

Music Fan, should you come across a better/faster solution for extracting dvb subs and exporting to BD sup, would you be so kind to post it here?
I've also been doing dvb subs; the ProjectX extraction and OCR for me is an acceptable, but a bit elaborate way. As I already spend a lot of time editing subs it'd be great to spare some.

Cheers

Music Fan
2nd January 2014, 09:08
Music Fan, should you come across a better/faster solution for extracting dvb subs and exporting to BD sup, would you be so kind to post it here?

Yes, I will.

von Suppé
4th January 2014, 11:12
Yes, I will.

Thank you :)

Music Fan
6th January 2014, 20:32
Music Fan, should you come across a better/faster solution for extracting dvb subs and exporting to BD sup, would you be so kind to post it here?
Already some news :
Nikse555 (Subtitle Edit's developer) is working on DVB-SUB extraction/conversion from TS files, so we won't need Project X anymore to extract sub before to open it in Subtitle Edit.:)

Ghitulescu
6th January 2014, 22:01
PjX can also recover Teletext / Videotext subtitles :)

Music Fan
6th January 2014, 23:27
I know, we discussed about Project X just above. But this makes an additional step.

von Suppé
22nd January 2014, 10:45
Already some news :
Nikse555 (Subtitle Edit's developer) is working on DVB-SUB extraction/conversion from TS files, ...

Good news, thanks :)