View Full Version : How to extract subtitles from damage avi or repair avi?
nikmabc
21st April 2006, 03:51
I can open this file with vdub, but it reports: (1)the index is missing or damaged and reconstructs it and (2)an invaild chunk detected---aggressive recovery mode. I used fast recompression and save this and get a working avi, but I lose the subtitles. The new file is 77 mb smaller.
I have tried using avimux to extract the subtitles from the damage file but it crashes.
So, I have a repaired avi without subtitles and a damaged avi that I can't figure out how to extract the subtitles.
ai4spam
21st April 2006, 05:16
Are you using vdubmod? Is it reporting the subtitle streams?
nikmabc
21st April 2006, 06:05
Are you using vdubmod? Is it reporting the subtitle streams?
Yes, using vdubmod. No, it does not report the sub stream. The avi can be partially played with wmp9. Curiously, it reports the video codec as directvobsub. I have another avi file that was created the same way, and it works fine. This other file doesn't report a sub stream either but it can be opened with avimux which does find the sub stream.
I have made some subtitled avi using GKnot, but I kept the subtitle files separated from the avi. These avi have the subs embedded, but not hard encoded. As I mentioned, after the fast recompression, the avi was 77 mb smaller---the original size was 317 mb. This makes me think that the subtitles were video frames interlaced into the video stream---is this possible?
Vdubmod does report damage in this file, I was just wondering if I can salvage it.
ai4spam
25th April 2006, 07:12
Well, if you know a word that appears in the subtitles, search for it in your damaged file with a hex editor. Some formats embed the subtitles in one place, not interleaved, and if you're lucky enough you may be able to simply copy and paste them.
nikmabc
25th April 2006, 19:00
Are you using vdubmod? Is it reporting the subtitle streams?
The container used is avi and apparently vdubmod doesn't see the subtitle track. I used avimux on another avi file and put it in a mkv container and vdubmod found the sub track.
Because of the damage, avimux crashes when opening the avi. Seems I need to repair it before I can access the subs.
nikmabc
25th April 2006, 19:40
Well, if you know a word that appears in the subtitles, search for it in your damaged file with a hex editor. Some formats embed the subtitles in one place, not interleaved, and if you're lucky enough you may be able to simply copy and paste them.
I was hoping for an easy fix. I'm trying to learn japanese, so eventually I'll be able to watch and understand this show. Anyway, who needs dialog in p***, oops, nevermind.:rolleyes:
Thanks for the help. I read some of your threads here, but I don't know enough about subtitles to answer any of your questions.
The vid is xvid and the sub is ssa. Most likely they are intereaved and they can be turned on/off.
ai4spam
27th April 2006, 02:19
Well, use HexWorkshop to open the damaged file to check if they're interleaved anyway. All you need to do is search for a word you know is in the text. You can even use other things, like for example the hex viewer that ships with TotalCommander (F3 to view, then 3 to force hex display, then F7 to search).
nikmabc
27th April 2006, 08:07
Well, use HexWorkshop to open the damaged file to check if they're interleaved anyway. All you need to do is search for a word you know is in the text. You can even use other things, like for example the hex viewer that ships with TotalCommander (F3 to view, then 3 to force hex display, then F7 to search).
At first I used the hex editor in vdubmod, but I guess it doesn't load the whole file. I used another editor and did find the subtitles and copied them to notepad. Now I have to figure out how to format them and put them back in. Below is part of what I got.
Title: <untitled>
Original Script: <unknown>
ScriptType: v4.00
Collisions: Normal
PlayResY: 640
PlayResX: 480
Timer: 100.0000
[V4 Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: Style1,Arial Black,32,8454143,8454143,8454143,0,0,0,1,2,2,2,30,30,25,0,0
[Events]
Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: Marked=0,0:00:09.07,0:00:12.16,Style1,Comment,0000,0000,0000,,Man, life is boring.
Dialogue: Marked=0,0:00:12.34,0:00:14.74,Style1,Comment,0000,0000,0000,,You study like crazy\nwhen you're a kid...
If there is an easy way to put the subtitles back in, let me know. I'll try find out what I can too. Looks like I can take my time learning japanese...:D thanks
nikmabc
27th April 2006, 09:54
I found out this is ssa format and it was just missing the header.
[Script Info]
But found out there is damage to the video, vdub cut out the damage section and this messed the timing up. Oh, well, just a little more fixing.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.