Log in

View Full Version : HD subtitle ripping (SUPread)


Pages : 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16

manusse
24th February 2007, 21:41
Hi pel,

It seems there is no carriage return in the generated subrip.txt file.
Could it be the problem?

Cheers
Manusse

Pelican9
24th February 2007, 21:46
Hi pel,

It seems there is no carriage return in the generated subrip.txt file.
Could it be the problem?

Cheers
Manusse

Your version could be quite old... :)

manusse
24th February 2007, 21:47
Downloaded 5 minutes ago.
;-)

Pelican9
24th February 2007, 21:49
Downloaded 5 minutes ago.
;-)
Well, I don't know...
Look at my post, there are CRLFs...

manusse
24th February 2007, 22:26
I tried again with the last versions of EVOdemux and SUPread and have still the same problem.
I've carefully checked the file with a binary editor and it seems each line is separated by 0x0a followed by 0x0d whereas notepad.exe puts 0x0d followed by 0x0a. This explains why notepad is confused. Could it be the same for subrip?

Hope this helps
Manusse

Deckard2019
24th February 2007, 22:47
Could you send me a valid file?
Just tried with a PAL DVD. Subtitle file can be found here (http://www.sendspace.com/file/2gdwbi).
DVDSupDecode generates :
;Subpictures_21.sup
FrameRate=25
Palette=8328
Alpha=0FA0
{1293}{1355}{Subpictures_21_000001.bmp}
{1361}{1425}{Subpictures_21_000002.bmp}
{1460}{1507}{Subpictures_21_000003.bmp}
...

Supread generates :
;Subpictures_21.sup

FrameRate=23.976

Alpha=FFF0

{1240}{1299}{line0001.bmp}

{1305}{1366}{line0002.bmp}

{1400}{1445}{line0003.bmp}
...


As you can see, Palette info is in the .txt file. Also, Supread seems to always set Alpha to FFF0 ...

Pelican9
24th February 2007, 22:47
I tried again with the last versions of EVOdemux and SUPread and have still teparhe same problem.
I've carefully checked the file with a binary editor and it seems each line is sated by 0x0a followed by 0x0d whereas notepad.exe puts 0x0d followed by 0x0a. This explains why notepad is confused. Could it be the same for subrip?

Hope this helps
Manusse

:confused:
My notepad works normally with it...
I've tried to change 0d0a but then my notepad can't handle it.

each line is sated by 0x0a followed by 0x0d
Are you sure? This is definitly 0D0A...

7B 31 32 30 31 7D 7B 31 32 37 32 7D 7B 56 54 53 {1201}{1272}{VTS
5F 30 31 5F 30 2E 32 30 5F 30 30 30 30 30 35 2E _01_0.20_000005.
62 6D 70 7D 0D 0A 7B 31 33 33 30 7D 7B 31 34 31 bmp}..{1330}{141
36 7D 7B 56 54 53 5F 30 31 5F 30 2E 32 30 5F 30 6}{VTS_01_0.20_0

manusse
24th February 2007, 22:59
I've rechecked and I confirm what I've written.
Really strange...

Manusse

manusse
24th February 2007, 23:01
00000000:3b 2e 53 75 62 70 69 63 74 75 72 65 2e 30 30 2e ;.Subpicture.00.
00000010:73 75 70 0a 0d 46 72 61 6d 65 52 61 74 65 3d 32 sup..FrameRate=2
00000020:33 2e 39 37 36 0a 0d 41 6c 70 68 61 3d 46 46 46 3.976..Alpha=FFF
00000030:30 0a 0d 7b 37 32 39 7d 7b 37 35 39 7d 7b 6c 69 0..{729}{759}{li
00000040:6e 65 30 30 30 31 2e 62 6d 70 7d ne0001.bmp}

Pelican9
25th February 2007, 09:32
00000000:3b 2e 53 75 62 70 69 63 74 75 72 65 2e 30 30 2e ;.Subpicture.00.
00000010:73 75 70 0a 0d 46 72 61 6d 65 52 61 74 65 3d 32 sup..FrameRate=2
00000020:33 2e 39 37 36 0a 0d 41 6c 70 68 61 3d 46 46 46 3.976..Alpha=FFF
00000030:30 0a 0d 7b 37 32 39 7d 7b 37 35 39 7d 7b 6c 69 0..{729}{759}{li
00000040:6e 65 30 30 30 31 2e 62 6d 70 7d ne0001.bmp}



Hmmm, interesting.
1:1 :-)

dr4g0n
25th February 2007, 13:53
Few (friendly) advices:
1. Use formatdatetime like FormatDateTime('h:m:s.z', myDate) so the ppl regional settings won't affect.
2. In every loop use application.processmessages insted of item.refresh or similiar to prevent app from "non-responding".
3. Use image object to temprary load image, resize them and write output to file.
4. Do not use "writeln" to write to file, use memory allocating - it's more reliable, add manual #$D#$A at the end of the row.
Is there any api for image reading? It will be easier to insert it into supread and produce results with 1 tool.
Great job, btw...

Pelican9
25th February 2007, 19:00
Few (friendly) advices:
1. Use formatdatetime like FormatDateTime('h:m:s.z', myDate) so the ppl regional settings won't affect.
2. In every loop use application.processmessages insted of item.refresh or similiar to prevent app from "non-responding".
3. Use image object to temprary load image, resize them and write output to file.
4. Do not use "writeln" to write to file, use memory allocating - it's more reliable, add manual #$D#$A at the end of the row.
Is there any api for image reading? It will be easier to insert it into supread and produce results with 1 tool.
Great job, btw...

Thanks.
1. I'm using TFormatSetting, the result is the same, I think.
2. Yes, I usually use Processmessages, but until now I've tried with only little size subtitles, the process takes only a second.
3. I'm using image object.
4. I'm not using writeln.
5. What do you mean? What kinf of API? I think, there is no tool to handle this new subtitle format.

Pelican9
25th February 2007, 19:14
DVDSupDecode generates :

Supread generates :


As you can see, Palette info is in the .txt file. Also, Supread seems to always set Alpha to FFF0 ...
Yes, it's just a test, not the final. Anyway, this new sup has 256 colour, and the palette size is 768 byte...
Could you send me a txt which works with Subrip?
I cannot create a good one, maybe my Supread doesn't work.

dr4g0n
25th February 2007, 20:00
Thanks.
1. I'm using TFormatSetting, the result is the same, I think.
2. Yes, I usually use Processmessages, but until now I've tried with only little size subtitles, the process takes only a second.
3. I'm using image object.
4. I'm not using writeln.
5. What do you mean? What kinf of API? I think, there is no tool to handle this new subtitle format.

1. I had same problem as you and solve it with formatdatetime. It forces conversion by user date/time format completly ignoring reg settings.
2. Ok, but extraction of 1150 images can take quite a while.
3. Ok, just a suggestion, is resizing works ?
4. Good.
5. I tought some component or API for image recognizing (OCR, reading bmp file and returning text) instead of exporting bmp and then using subrip or whatever to handle (OCR) those bitmaps. I'm pretty sure there's some of it around (will make user life easier).

Maybe u had some bugs in Delphi. Fileinfo says u're using Delphi 3.0 ?

Pelican9
25th February 2007, 20:57
1. I had same problem as you and solve it with formatdatetime. It forces conversion by user date/time format completly ignoring reg settings.
2. Ok, but extraction of 1150 images can take quite a while.
3. Ok, just a suggestion, is resizing works ?
4. Good.
5. I tought some component or API for image recognizing (OCR, reading bmp file and returning text) instead of exporting bmp and then using subrip or whatever to handle (OCR) those bitmaps. I'm pretty sure there's some of it around (will make user life easier).

Maybe u had some bugs in Delphi. Fileinfo says u're using Delphi 3.0 ?
1. My way solves the problem too. :-)
3. I haven't tried yet. Strech is working on the screen, but I don't know, what happens when save the bitmap.
5. Understand. It could be useful...
It's a newest one (2006).

Deckard2019
26th February 2007, 00:44
Could you send me a txt which works with Subrip?
1/ I can open the attached file in Subrip. But I can't get any subtitles from it :(
Subrip works great with VOB files but with image sequence ...
2/ If I open subrip.txt (from Supread) in Ultraedit, it says it's in Unix format.
I convert it to DOS format and then I can open it in Subrip.
But Subrip exits suddenly ...

JnZ
26th February 2007, 13:55
I try SUPread on Pitch Black and discovered this:

Exported images can be readed via SubRip only when resized to 720 x XXX. subrip.txt script works fine.

So I create script in PSP-X - increase contrast for 100% (liquidate gray colors), resize to 720 x XXX. Runs this script on all images. Then open in SubRip, set OCR sensitivity around 950-980, and all works fine.

Pelican9
26th February 2007, 14:07
I try SUPread on Pitch Black and discovered this:

Exported images can be readed via SubRip only when resized to 720 x XXX. subrip.txt script works fine.

So I create script in PSP-X - increase contrast for 100% (liquidate gray colors), resize to 720 x XXX. Runs this script on all images. Then open in SubRip, set OCR sensitivity around 950-980, and all works fine.

Good news!
Which version of Subrip did you use?

JnZ
26th February 2007, 14:33
Good news!
Which version of Subrip did you use?

SubRip 1.50b3.
I think it can handle only images of specific resolution. I try 720x405 and works fine. Images converted like this: Black background with white text, preserved original pallete. I only liquidate gray shade beneath text (subs can be easily OCRed wia subrip). This action can be scripted in most graphics editors...

EDIT: Image can be 256, but also 16M colors.

Pelican9
26th February 2007, 15:20
SubRip 1.50b3.
I think it can handle only images of specific resolution. I try 720x405 and works fine. Images converted like this: Black background with white text, preserved original pallete. I only liquidate gray shade beneath text (subs can be easily OCRed wia subrip). This action can be scripted in most graphics editors...

EDIT: Image can be 256, but also 16M colors.

I've tried to feed Subrip with 720x480 size bitmaps, but always give an error message (1.50b4).

JnZ
26th February 2007, 16:35
I've tried to feed Subrip with 720x480 size bitmaps, but always give an error message (1.50b4).
After some experimenting, I must say, that SubRip open this images very strangely. Sometimes not, sometimes opens only first one and next images are only black...etc. :(

dr4g0n
26th February 2007, 21:41
I've also got #$0A#$0D in text file.
Must use Ultraedit to change it...
BTW i use same source to extract subs as the Pelican9.

Pelican9
27th February 2007, 00:25
I don't understand how you can get 0a0d instead of 0d0a... :confused:

Deckard2019
1st March 2007, 21:41
Still working on EVODemux ? ;)
Now we found a way to decode DD+, the only thing I need is subtitles ...

Pelican9
2nd March 2007, 01:01
Still working on EVODemux ? ;)
Now we found a way to decode DD+, the only thing I need is subtitles ...
Me too.
I've got an HD DVD player, so I'm playing with my new toy. :-)
But I would like to write back the compressed movie to HD DVD or BluRay.
Not an easy task for me...

Pelican9
4th March 2007, 16:10
Changes for v0.24

- Cancel button
- Remove 'Save BMPs'
- New feature 'Save bitmaps' writes PNGs and subtitles.scn-sst (Scenarist ACA compatible script)

SUPread v0.24 (http://pel.hu/down/SUPread.exe)

tjf
4th March 2007, 20:24
SUPread v0.24 crashes towards the end of the SUP file (line 981) during bitmap writing with Out of system resources message.

Is there a way to mux the subtitles into matroska container without OCR?

Deckard2019
4th March 2007, 20:32
It works for me but I don't know what to do with these files :(
I would like to have a .srt file, to mux into mkv too.

Pelican9
5th March 2007, 01:48
SUPread v0.24 crashes towards the end of the SUP file (line 981) during bitmap writing with Out of system resources message.

Fixed (I hope).
Try the new beta.

Pelican9
5th March 2007, 01:50
It works for me but I don't know what to do with these files :(
I would like to have a .srt file, to mux into mkv too.
Sonic Scenarist ACA can read those files.
I haven't got yet a working OCR...

ai4spam
5th March 2007, 17:15
SubRip expects the bitmaps in the format DVDSupDecode writes them (supported options are Palette, FrameRate and Alpha).
The images need not be full-screen, they should be cropped like in .idx/.sub. Also, they are 256-color .bmp files (8 bits per pixel).
Finally, SubRip can process characters of at most 80x44 pixels, so if your characters are larger than that, you need to do a resize. Careful with bilinear interpolation, make sure it doesn't create new color values (only 4 colors are supported).

dchard
5th March 2007, 20:53
With a.25b and demuxed Batman begins (with latest evodemux) and 32bit sp2 XP I got access violation errors, when trying to open demuxed .sup-s in supreader.

Dchard

Pelican9
6th March 2007, 15:16
With a.25b and demuxed Batman begins (with latest evodemux) and 32bit sp2 XP I got access violation errors, when trying to open demuxed .sup-s in supreader.

Dchard

Download the newest EVOdemux and demux the subtitle again.

tjf
7th March 2007, 08:43
I am trying to convert the demuxed sup subtitles to idx and then mux it to Matroska. I do not care much for OCR as the file size savings do not make sense compared to those huge video and audio files. So I tried to open the sup file in SubtitleCreator but at the end of import I get .NET Framework unhandled exception.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at SubtitleCreator.SUPPreviewForm.UpdateMenu()
at SubtitleCreator.SUPPreviewForm.ListBoxSUPSelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ListBox.set_SelectedIndex(Int32 value)
at SubtitleCreator.SUPPreviewForm.ShowSUPPreview(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
SubtitleCreator
Assembly Version: 2.0.0.0
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Program%20Files/SubtitleCreator/SubtitleCreator.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
DShowNET
Assembly Version: 1.0.0.1
Win32 Version: 1.0.0.1
CodeBase: file:///C:/Program%20Files/SubtitleCreator/DShowNET.DLL
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ListViewEx
Assembly Version: 1.0.2297.19690
Win32 Version: 1.0.2297.19690
CodeBase: file:///C:/Program%20Files/SubtitleCreator/ListViewEx.DLL
----------------------------------------
SubtitleCreator.resources
Assembly Version: 2.0.0.0
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Program%20Files/SubtitleCreator/en/SubtitleCreator.resources.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Deckard2019
7th March 2007, 10:15
I am trying to convert the demuxed sup subtitles to idx and then mux it to Matroska.
You're right. This is the best thing we can do now, as SubRip works strangely with image sequence.
Maybe SUPread can directly export idx/sub files ?
Maybe this code can be included in EVODemux ?
For this, we need to find idx/sub file specs ...

EDIT:
A good start point : http://www.matroska.org/technical/specs/subtitles/images.html

Pelican9
7th March 2007, 14:14
I think the idx/sub structure can contain only the DVD's subtitles, but cannot the HD DVD's subtitles because the subtitle streams are different.

Deckard2019
7th March 2007, 17:31
I think the idx/sub structure can contain only the DVD's subtitles, but cannot the HD DVD's subtitles because the subtitle streams are different.
As we can mux the files in MKV container, I don't think it's only relative to DVD.

Pelican9
7th March 2007, 18:12
As we can mux the files in MKV container, I don't think it's only relative to DVD.

I'm sure. :-)

I don't understand why the programmers don't develop their softwares to handle this new .sup format of HD DVD...
(Manusse! Do you hear me?)

manusse
7th March 2007, 20:41
Hi Pel,

It's on my plans to have a look but at present I (and Paddington) are a bit busy and don't have much time for programming.
Also we want to add many features to SubtitleCreator like karaoke sup generation, sup or vobsub resize, HD compatibility, fix the annoying remaining bugs ...
I was wondering if at first a simple import function in SubtitleCreator would do the job. Like resizing the sup to SD and reducing the number of colors to 3. This may be an easier task for a beginning. :)

What do you (the users) think?

Manusse

dchard
7th March 2007, 23:12
Download the newest EVOdemux and demux the subtitle again.

With those the problem solved.

About HD-DVD subtitles:
now we had the complete subtitle in BMP/PNGs, so first the .sup --> .srt conversion have to be solved.

But a most annoying problem is, that we cannot convert any .srt to .sup and then remux the stream with it. Now if a rip done, than its very easy to find/resync existing subtitles and use them, but if I have a proper one for a HD-DVD movie I cannot use it. So I think the most important is the capability to convert .srt to .sup, and then remux the video with it. Teh second is .sup to .srt .

Dchard

Pelican9
7th March 2007, 23:40
With those the problem solved.

About HD-DVD subtitles:
now we had the complete subtitle in BMP/PNGs, so first the .sup --> .srt conversion have to be solved.

But a most annoying problem is, that we cannot convert any .srt to .sup and then remux the stream with it. Now if a rip done, than its very easy to find/resync existing subtitles and use them, but if I have a proper one for a HD-DVD movie I cannot use it. So I think the most important is the capability to convert .srt to .sup, and then remux the video with it. Teh second is .sup to .srt .

Dchard
No.
First thing first.
The hard part is the .sup to .srt conversion (OCR).
If it's working go to the next part.
I'll make the subtitle multiplex in EVOdemux.

Pelican9
7th March 2007, 23:47
Hi Pel,

It's on my plans to have a look but at present I (and Paddington) are a bit busy and don't have much time for programming.
Also we want to add many features to SubtitleCreator like karaoke sup generation, sup or vobsub resize, HD compatibility, fix the annoying remaining bugs ...
I was wondering if at first a simple import function in SubtitleCreator would do the job. Like resizing the sup to SD and reducing the number of colors to 3. This may be an easier task for a beginning. :)

What do you (the users) think?

Manusse

I (and many others) would like to use the features of Subtitle Creator for HD subtitles right now. :)

manusse
8th March 2007, 21:45
I (and many others) would like to use the features of Subtitle Creator for HD subtitles right now.
I've understood that. But let me ask again my question:

Would a first (fast to design) solution that would resize the HD-sub to SD and lower its colour number to 3 plus background be OK.

Of course, a fully working HD solution would be better but as I mentioned before it will take time and we don't have much at present.

So would my first proposal be OK?

Cheers
Manusse

Deckard2019
8th March 2007, 21:49
Would a first (fast to design) solution that would resize the HD-sub to SD and lower its colour number to 3 plus background be OK.

Of course !

Pelican9
9th March 2007, 00:56
I've understood that. But let me ask again my question:

Would a first (fast to design) solution that would resize the HD-sub to SD and lower its colour number to 3 plus background be OK.

Of course, a fully working HD solution would be better but as I mentioned before it will take time and we don't have much at present.

So would my first proposal be OK?

Cheers
Manusse

Sorry but it isn't clear for me.
Do you want to read the HD subtitles to the existing format that your sw can handle right now?
Anyway, my answer is yes. :-)

manusse
9th March 2007, 19:01
Sorry but it isn't clear for me.

Let me try to rephrase it simply:
Add an import function to SubtitleCreator. When importing a HD-DVD sup file (extracted using EvoDemux), SubtitleCreator would first internally convert it to SD sup (which means resize it to PAL or NTSC sup size, change its number of colors to 3 plus background) and then display it. It will then be possible to process it as a standart SD subtitle, i.e. save it to sup (SD) or VobSub (sub/idx) thus allowing to OCR it with DVDSubEdit or SubRip.

Hope it's clear now.
Cheers
Manusse starting to work on it. (Hoping it's not too time consuming)

Pelican9
9th March 2007, 19:22
Let me try to rephrase it simply:
Add an import function to SubtitleCreator. When importing a HD-DVD sup file (extracted using EvoDemux), SubtitleCreator would first internally convert it to SD sup (which means resize it to PAL or NTSC sup size, change its number of colors to 3 plus background) and then display it. It will then be possible to process it as a standart SD subtitle, i.e. save it to sup (SD) or VobSub (sub/idx) thus allowing to OCR it with DVDSubEdit or SubRip.

Hope it's clear now.
Cheers
Manusse starting to work on it. (Hoping it's not too time consuming)

Thanks, understood.

Deckard2019
9th March 2007, 21:06
It will then be possible to process it as a standart SD subtitle, i.e. save it to sup (SD) or VobSub (sub/idx) thus allowing to OCR it with DVDSubEdit or SubRip.
Great !

MichalHabart
13th March 2007, 21:03
Let me try to rephrase it simply:
Add an import function to SubtitleCreator. When importing a HD-DVD sup file (extracted using EvoDemux), SubtitleCreator would first internally convert it to SD sup (which means resize it to PAL or NTSC sup size, change its number of colors to 3 plus background) and then display it. It will then be possible to process it as a standart SD subtitle, i.e. save it to sup (SD) or VobSub (sub/idx) thus allowing to OCR it with DVDSubEdit or SubRip.

Hope it's clear now.
Cheers
Manusse starting to work on it. (Hoping it's not too time consuming)

Sounds more then promising :)

Deckard2019
13th March 2007, 21:47
There you are here MichalHabart ;)