MustafaMoneer / subtitleedit

Automatically exported from code.google.com/p/subtitleedit
0 stars 0 forks source link

Read internal headers of binary subtitle files to decide on its format #205

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Sometimes I need to extract subtitle files from MKV files so that I can turn 
hem into srt format.

I use MKVCleaver and it does its job of extracting the file, but it gives them 
all '.unknown' extension.

That's when the trouble starts, because I susally have no idea what the actual 
extension should be (well, sometimes I can tell, most times I don't have a 
clue).

This gets really tough with binary formats.

Case in point, one extracted file had a 'PG' in its header (MediaInfo said 
'PGS' format).

I first tried to rename the extension to PG or PGS but SubtitleEdit refused to 
open them.

Then, it took me a dozen trial-and-error before I landed on '.sup'. And, voila. 
SubtitleEdit started OCR'ing it, doing what it does very good and finishing it 
in minutes.

I guess what I am trying to say is this: Is it possible for SubtitleEdit to 
look inside the file to decide what format it is before rejecting it. 

If it can, it would be so helpful.

Original issue reported on code.google.com by adem.meda@gmail.com on 31 Jan 2014 at 1:02

GoogleCodeExporter commented 8 years ago
Hi Adem,

I've actually been working on something like this - will be included in 3.3.13 
:)
You can also test this: http://www.nikse.dk/SubtitleEdit.zip

SE now detects several files types from the content like bluray, vobsub - but 
also zip and rar files as people often have problems with these files.

PS: SE can also extract subtitles from mkv files

Original comment by nikse.dk@gmail.com on 31 Jan 2014 at 9:28

GoogleCodeExporter commented 8 years ago
Hi Nikolaj,

Wow! You must be telepathic :)

I have tried 3.3.13 and yes, it does recognize the format from the file headers.

About importing subtitles from MKV files.

First, could you please change the menu line from 'Import subtitle from 
Matroska file' to 'Import subtitle from Matroska (MKV) file', because more 
people are familiar with the extension than the format name.

Secondly, I noticed a minute detail: When I tried this new import feature, the 
dialog opened lists all subtitle files and their languages correctly, except 
for the first one (en). I am not sure if it is doing it because that subtitle 
is the default, or because it is 'en'.

Could you plase take a look at that?

Finally, a big thank you for letting a MKV file be drag&dropped on SE and 
opening the relevant dialog. A good time saver.

Finally finally <g>, I think it is about time SE had its own Windows Context 
menu much like 7z or others. That would also be another time saver.

Thank you for the great work as always.

Cheers,

Adem

Original comment by adem.meda@gmail.com on 1 Feb 2014 at 4:14