Monday, March 7, 2011

Subtitle Software Bundle Part II - Two subtitle software for getting subs from the original DVD or fansub Ver.2 (03072011 update)

 

(This article is strictly used for hobby and video backup purpose, it would be unethical and illegal to use the software for a profit.)

03072011 update, now includes changing vobsub path under win7 x64.

08242010 update, now includes matching audio that is of different length from original audio (mainly gaps).

06162009 update, now includes multi-angle subtitle decrypting using VOBSUB.

06152009 update, now includes updated easier tutorials on how to sync audios from different editions of DVDs, this method also gives more accurate results.

04182009 update, now includes detailed tutorials on how to sync subtitles and audios from different editions of DVDs.

 

So here are the two more subtitle software... Both of them try to get the subs from the original material, so don't use them for commercial purpose... First software is vobsub (or vsfilter), second is esrXP. Vobsub is used for decrypting subtitles from DVD, it can save as idx+sub file or save as sst/son in conjunction with a bunch of bmp/tiff pictures. idx+sub can be viewed on computer or be embeded into divx files viewed on a divx certified player; sst+scanned bmp/tiff can be used to reauthor DVD. esrXP is used for grabbing the hard-burned subtitles, particularly for Asian language.

Vobsub is designed to show subtitle on computers, but here I am using it to decrypt subtitles from DVD. (There are other software such as Subrip (has more advantage in OCR since it supports italic/bold tag which preserves the DVD typesetting as much as possible), a tool functions the same as vobsub and further more can ocr the pictures back to text or extract menu highlights; or the automation tool, but vobsub has been working fine since day 1 I started to use it, so I never bothered to find other ways to decrypt DVD subtitle. Manual decrypting is good if you want to vastly change the DVD structure such as putting several episodes onto the same disc, if you just want to add subtitle, the easy way is to use automation tools...)

Back to vobsub, here is a screenshot of all the components, three of them are the ones I'm using...

d1e84569.jpg picture by linkai8424

If you are upgrading the system to 64 bit, the first time you run vobsub configure, vobsub cutter, and vobsub joiner, you’ll be greeted with the following error: “The specified module could not be found.”

 

This is because windows changed the path in 64 bit system. You need to update the path.

Just right click –> Properties of the shortcut, change System32 to SysWOW64. And the program should run again. 

First use vobsub configure to get the idx+sub from the original DVD. If you intend to use the idx+sub for computers or divx certified machines, then that's the only step you need to do. If you want to put the subtitles onto another DVD, then you have to follow the next two steps. Vobsub configure is simple to use, first load the ifo from the original DVD, definitely NOT the VIDEO_TS.ifo one.

cef1a63b.jpg picture by linkai8424

Then select which PGC (program chain) and which subtitles.

f05788db.jpg picture by linkai8424

 

Multi-angle subtitle decrypting:

 

Multi-angle subtitles are pretty easy to identify between the chapter stops. Basically, one angle is a separate vob and 1 or more cell, and for movies, angles usually don’t last long, therefore when you see a vob with one cell or two, that’s an angle.

The second component is vobsub cutter, it is used for changing the framerate. If the video is NTSC dropped frame or PAL, you could skip this step; if the video is NTSC non-dropped frame, then change the framerate is a must.

3caa62b2.jpg picture by linkai8424

The last component, Subresync scans all the pictures back into sst/son+bmp/tiff files.

73607c54.jpg picture by linkai8424

22632e82.jpg picture by linkai8424

This process takes a while depends how long the video is. The files you get here are the original files (how the DVDs are authored) so that you can import these into muxman or professional tools for re-authoring.

7a900b94.jpg picture by linkai8424

 

That’s how the software basically operates, now more on time sync portion. If you want to put subtitles on two different versions of DVDs, you almost always have to resync the timing. So here’s my method to quickly adjust timing:

 

First comparing the original DVD and the new DVD to get an approximate time. Time conversions might needed, but it’s not hard to figure out.

Then creating a avs file for the audio and video. The m2v video you decrypt probably won’t play normally in any players, so avs script file is necessary. The m2v file has to be parsed in DGindex.

Then rename the subtitle (idx+sub) same as the avs file name, so that mpc could pickup the subtitles easily, or you can just put Vobsub code (last line in above picture) into avs.

If some further adjustment is needed, do it in vsfilter:

Save the last value and put it into idx, if you have multiple languages, you need to put the time delay before every language:

That’s basically the steps I used to sync subtitles, provided that the subtitles are the same framerate.

 

Here is the simple and accurate way to sync audios:

If you use audio editing program to sync and output, you'll always have to re-encode the audio, I would avoid that at all cost, unless you meet the bitrate limit or the dub won't fit the new remastered audio...


Use Delaycut instead.
http://www.videohelp.com/tools/delaycut
It can losslessly delay(+/-) any wav, ac3, dts audios.

When I sync audios, I never directly sync English dub to the Japanese audio/video. Always sync the Japanese on old disc to Japanese on new disc. Transcoding the audios if they are not *.wav. It's always easy and faster to work with LPCM (and from this point on, working with these wav files only, don't worry about original format). I DO use audio editing program (SONY vegas in my case) to compare the waveform so that I can sync the two audios properly. When importing the audios into the program, I set the new audio to completely left channel, and the old audio to completely right channel, then play them together. Move one of the audio so that the phase matches, the sound should center "above" your head, half of the time you might not be able to get them totally matched (this is mostly due to unnecessary gaps introduced on these English releases, the Japanese release almost always have very very accurate timing, some even down to frames), but get as close as you can. (I think +/- 5 frames, equivalent of approximately 150 ms is somewhat acceptable, if it’s too much, look for the solution list further down, this is especially true for multi-channel tracks since these aren’t easy to re-encode and maintain the same quality).

vegas frame quantize

The software I’m using here is Sony Vegas, it’s a pretty comprehensive video editor, but the audio editing capability is standing out to other more professional NLE. First, turn off “Quantize to Frames” option, this will let you move the tracks freely without snapping to frames. The Snapping option underneath also has the snapping feature, but it applies to a bigger entity.

Then, turn off “Quickfade Audio Edits”:

vegas quickfade0

vegas quickfade

This option will auto fade the splitting audio on each side, this is not desirable if you accidently cut the audio track in the middle of a dialogue.



Take down the time/frame from the software, that's where you put it into Delaycut (only takes ms, so some conversion might need, 1000ms=30fps in NTSC), again working on wav instead of original file. Don't close Delaycut after that.

A shortcut without the conversion is to change the ruler format to seconds:

vegas ruler format 

The timeline will show in seconds so that you pretty much don’t have to do any framerate conversion.


Then importing the new wav into the audio editing program to see how the waveforms look like, zoom in if you can't see them clearly. Then pick a very obvious waveform, set up a reference point. If your new audio is too ahead, bring up Delaycut and add xx ms to the previous delay number, this time just overwrite it, so that you don't have to importing it again (Not sure about Audacity, but SONY vegas never locks the audio so that you can always edit freely on other program, and it will update the changes accordingly). If your new audio is delayed, then minus xx ms to the previous delay number in Delaycut. The goal is to have the waveform's reference point totally matched.



Then remember that final delay number, input your English dub, process, you should get a perfectly sync'ed audio, audio difference should be no more than +/- 5ms.
The description might be long, but it's really not hard.
pre-mux checking:
parse the video in DGindex, write a simple avisynth script, as simple as this:
LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
#  SOURCE
mpeg2source("V:\GUNSLINGER GIRL VOL2\DVD_VIDEO\VTS_01\Titles\t01_v001x005.0.d2v")
Then rename your audio files to the same as this avisynth script's name.


Naming convention:



Play the avs script using MPC, the audios should be automatically picked up following these naming convention. Check the dub against the video, sound effects are easier for anime to spot any sync problem. If you don't trust the software's reading, you can add delays to the audio using "+/-" on keypad.



But any work you do here, you need to go back using delaycut again...

For tracks that have gaps, it’s a bit more complicated. Basically you have to cut the audio in pieces where the gaps are, sync these individual pieces based on the above guide, audios need to be the exact same length as the original, so if you cut something, you need to pad the amount at the end. Then joining all the audio pieces together. This process is incremental, so if any one of the pieces is off, the entire track from that point on will be off, so you should be very careful in sync’ing all the pieces… The software for cutting audio into pieces is DVD Decrypter, just extract the audio ONLY based on chapters. The software for joining audio losslessis eac3to.

This is a technique I learned from someone else on the other forum. I have thought of this kind of method (NOT exactly the same) before, but it’s a bit too complicated. The technique here is easier, and it’s actually not that hard to apply, but it’s still  quite some work…

Next is esrXP, this software is designed to extract the hard burned subtitle from the video (subrip has some similar function but I’ve never tried it either). The way it works is first set a subtitle area, then within this area set a filter, let only the subtitle pass thru the filter, the rest of the images get dumped. The intermediate files are black ground bitmaps with white subtitles on it. Then serve the bitmaps into ocr software to scan the texts. After that, import the texts back to esrXP, do some manual corrections. Finally export the text as srt file, yes, with subtitle timings! The timings are quite accurate, usually only needs to shift and extend a bit here and there. I've only tried good quality videos so far (supports mkv natively), so not sure how accurately it can handle poor quality videos... With the good quality videos, I can finish the subtitle extracting within about 3-4 hours for a 25 min episodes.

Filter setting explained here. 

ed224438.jpg picture by linkai8424

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. I am adding the Streamline dub of Akira to BD. The dub is coming from PAL disc.
    i am having to split the audio and introduce delay at places where there is no music, since over time, the track goes out of sync. I have already applied -slowdown to the audio since it came from a PAL DVD and I am adding to BD. But i think it may be missing some frames, or there is some issues due to poorly timecoded transfer/ inconsistent framerate, or just due to the fact that the dub was originally from an NTSC VHS source (29.97 ?) ported to PAL, and now I am porting it to 23.976.

    So I have the dub in wav xcoded from AC3.
    I am splitting the dub and adding delay.
    when I am trying to merge some split WAV files after adding delay with eac3to, I get an error.

    Can you offer any suggestions?

    eac3to log:

    [code]eac3to v3.18
    command line: "C:\eac3to\eac3to.exe" "D:\AKIRA_US-BD25_PREP\akira r4 dvd\Streamline_2.0_timed_2,860,000 ms splice A + 335ms at end.wav"+"D:\AKIRA_US-BD25_PREP\akira r4 dvd\Streamline_2.0_timed_2,860,000 ms splice B.wav" "D:\AKIRA_US-BD25_PREP\akira r4 dvd\Streamline_2.0_timed_2,860,000 MERGED.wav"
    ------------------------------------------------------------------------------
    WAV, 2.0 channels, 2:04:28, 24 bits, 2304kbps, 48khz
    Source file joining currently doesn't work for WAV files. [/code]

    ReplyDelete