Re: [vdr] How to extract HD dvb subtitles (and possibly convert to srt)?

2011-01-08 Thread Luca Olivetti

Al 04/01/11 10:01, En/na Luca Olivetti ha escrit:

En/na Luca Olivetti ha escrit:


Yesterday I noticed that the timing offset is not fixed but depends on
the recording (e.g, with my previous experiments I hardcoded a 4
seconds delay for the bbc channels, while yesterday I needed a 2
minutes delay).
I don't know the cause of this offset (ProjectX or the crappy media
player of my tv) but the problem can be easily solved with Subtitles:


I now know the cause of the offset, but I don't know how to (easily) fix
it: Project-X for some reason (maybe a wrong option I gave?) doesn't
extract the pts from the video stream, so it doesn't synchronize the
subtitles to the video but it simply assumes the time starts with the
first subtitle.
If, e.g., the first subtitle appears 3 minutes into the recording, it
will get a timestamp of 0 seconds so it will show 3 minutes early.

These are the options I'm giving to Project-X (via its ini file):


Ok, I found there's an option to enable hd video demuxing 
(OptionPanel.enableHDDemux), *but* ProjectX crashes with it enabled, so 
I changed the script to use dvbsnoop to obtain the first pts of the 
video track and of the subtitles track, and use the difference as a time 
offset.


BTW: am I the only one needing this and/or wrestling with ProjectX to 
manipulate vdr recordings? I wasn't exactly overwhelmed with the replies...


Bye
--
Luca

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to extract HD dvb subtitles (and possibly convert to srt)?

2011-01-04 Thread Luca Olivetti

En/na Luca Olivetti ha escrit:

Yesterday I noticed that the timing offset is not fixed but depends on 
the recording (e.g, with my previous experiments I hardcoded a 4 seconds 
delay for the bbc channels, while yesterday I needed a 2 minutes delay).
I don't know the cause of this offset (ProjectX or the crappy media 
player of my tv) but the problem can be easily solved with Subtitles:


I now know the cause of the offset, but I don't know how to (easily) fix 
 it: Project-X for some reason (maybe a wrong option I gave?) doesn't 
extract the pts from the video stream, so it doesn't synchronize the 
subtitles to the video but it simply assumes the time starts with the 
first subtitle.
If, e.g., the first subtitle appears 3 minutes into the recording, it 
will get a timestamp of 0 seconds so it will show 3 minutes early.


These are the options I'm giving to Project-X (via its ini file):

# Application
Application.Agreement=1
Application.OutputDirectory=/temporary/word/directory

# CollectionPanel
CollectionPanel.CutMode=0

# SubtitlePanel
SubtitlePanel.SubpictureColorModel=UkFreeview(mc)
SubtitlePanel.enableHDSub=1
SubtitlePanel.exportAsVobSub=1

ExportPanel.Streamtype.MpgAudio=0
ExportPanel.Streamtype.Ac3Audio=0
ExportPanel.Streamtype.PcmAudio=0
ExportPanel.Streamtype.Teletext=0
ExportPanel.Streamtype.Subpicture=1
ExportPanel.Streamtype.Vbi=0


Any hint on what option I could try to get the video pts (but only the 
pts, I don't want to extract the video stream)?

Or simply Project-X cannot do it with h264 streams?

Bye
--
Luca

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to extract HD dvb subtitles (and possibly convert to srt)?

2011-01-02 Thread Luca Olivetti

Al 01/01/11 18:09, En/na Luca Olivetti ha escrit:



I found a simpler (i.e scriptable) way: I wrote a simple python script
that uses ProjectX (cvs version) to extract the subtitles from the ts
file, BDSup2Sub to convert the subtitles to png images, ImageMagick's
convert to improve the resulting images and finally gocr to convert the
images to text.
It seems to work acceptably with recordings from the bbchd/bbcone-hd.
It's available here:

http://ventoso.org/luca/vdr/vdrsubrip/

Both ProjectX and BDSup2Sub will spit a million warnings, but the final
result is ok. As always YMMV.


Yesterday I noticed that the timing offset is not fixed but depends on 
the recording (e.g, with my previous experiments I hardcoded a 4 seconds 
delay for the bbc channels, while yesterday I needed a 2 minutes delay).
I don't know the cause of this offset (ProjectX or the crappy media 
player of my tv) but the problem can be easily solved with Subtitles:


http://karasik.eu.org/software/

Bye
--
Luca

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to extract HD dvb subtitles (and possibly convert to srt)?

2011-01-01 Thread Luca Olivetti

Al 18/12/10 12:57, En/na Luca Olivetti ha escrit:

Al 15/12/10 18:28, En/na Luca Olivetti ha escrit:

I've a media player that only understand srt subtitles, so I'm looking
for a way to extract the dvb subtitles from a vdr ts recording, and then
use some kind of ocr to convert it to srt.
I asked google and I came empty handed (many people asking the same
question with no working answer).


[...]



I found how to do it but it's way too cumbersom:

the cvs version of ProjectX supports HD subtitles, *but* the sup
exported subtitles aren't readable neither by suprip (not subrip!) nor
by BDSup2Sub, so I additionally export to sub format and use BDSup2Sub
to convert it to a valid sup, that can then be processed by suprip.

Both ProjectX and BDSup2Sup, being java programs, work under Linux, but
suprip is windows only.


Projectx:
http://sourceforge.net/projects/project-x/

BDSup2Sub
http://forum.doom9.org/showthread.php?t=145277

SupRip
http://exar.ch/suprip/


I found a simpler (i.e scriptable) way: I wrote a simple python script 
that uses ProjectX (cvs version) to extract the subtitles from the ts 
file, BDSup2Sub to convert the subtitles to png images, ImageMagick's 
convert to improve the resulting images and finally gocr to convert the 
images to text.

It seems to work acceptably with recordings from the bbchd/bbcone-hd.
It's available here:

http://ventoso.org/luca/vdr/vdrsubrip/

Both ProjectX and BDSup2Sub will spit a million warnings, but the final 
result is ok. As always YMMV.


Bye
--
Luca

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] How to extract HD dvb subtitles (and possibly convert to srt)?

2010-12-18 Thread Luca Olivetti

Al 15/12/10 18:28, En/na Luca Olivetti ha escrit:

I've a media player that only understand srt subtitles, so I'm looking
for a way to extract the dvb subtitles from a vdr ts recording, and then
use some kind of ocr to convert it to srt.
I asked google and I came empty handed (many people asking the same
question with no working answer).

What I tried so far:

- ProjectX (fails because it doesn't like hd pixel coordinates)
- avidemux (it has a ts-srt option but it only allows pids up to to
255, and the lucky few that managed to make it work say that it doesn't
work with hd)
- mencoder -vobsubout (it just produces garbage instead of good
pictures, at least according to subrip)

Any other option?


I found how to do it but it's way too cumbersom:

the cvs version of ProjectX supports HD subtitles, *but* the sup 
exported subtitles aren't readable neither by suprip  (not subrip!) nor 
by BDSup2Sub, so I additionally export to sub format and use BDSup2Sub 
to convert it to a valid sup, that can then be processed by suprip.


Both ProjectX and BDSup2Sup, being java programs, work under Linux, but 
suprip is windows only.



Projectx:
http://sourceforge.net/projects/project-x/

BDSup2Sub
http://forum.doom9.org/showthread.php?t=145277

SupRip
http://exar.ch/suprip/


Bye
--
Luca

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr