ruediger / VobSub2SRT

Converts VobSub subtitles (.idx/.srt format) into .srt subtitles.
GNU General Public License v3.0
294 stars 66 forks source link

Blank pgm images and no text data #39

Closed justyn closed 9 years ago

justyn commented 10 years ago

I'm having trouble getting VobSub2SRT to work.

On my files test.idx/test.sub, running the command:

vobsub2srt --langlist test

Produces output:

Languages: 0: en

Using the command:

vobsub2srt --lang en --tesseract-lang eng --dump-images test

Appears to work, with output:

Selected VOBSUB language: 0 language: en Wrote Subtitles to 'test.srt

However test.srt contains the timing data but no actual text. ~500 .pgm files are output but they are all blank.

Loading the same idx file with avidemux OCR Vobsub->SRT tool shows all the correct subtitles are in the file.

Any way I can get some more debug output? Running latest git master on Ubuntu 14.04 64-bit.

Thanks.

ruediger commented 10 years ago

Can you view the subtitles when using mplayer?

justyn commented 10 years ago

Ah, I can, but they seem to be black instead of white, I've no idea why. Presumably that is why the pgm images appear to be blank and VobSub2SRT can't see any text.

Clearly I need to sort out my vobsub file! I'll look into it. It is odd that the avidemux tool reads it okay though.

justyn commented 9 years ago

To update: it turned out that my subtitles had no palette data.

This is because they were extracted using mencoder from a file created using "mplayer -dumpstream", which loses the palette data stored in the IFO file on the DVD.

My new method for batch processing where I wish to extract multiple subtitle languages at once is to use HandbrakeCLI to create an MKV file from the DVD that contains multiple embedded VOBSUB streams, then extract the streams with mkvextract, then run VobSub2SRT on each, which works.

So thanks!