PDA

View Full Version : Need help with VobSub + AVISynth subtitles


droopy928gt
29th April 2003, 09:00
I've searched this forum and others but am not able to find a solution for my problem. Hope that someone here can help me.

I've recently started with subtitles and want to use the VobSub + AVISynth method to create an AVS script which when finalized is opened in TMPGenc to make the final movie with subtitles. This method gives me the flexibility of being able to change all using AVISynth while being able to use VDub-MPEG2 to preview before encoding the final MPEG using the created AVS script.

Problem is following. I Rip the DVD to HD using DVDDecrypter. Use DVD2AVI to create a D2V file. Use VFAPI to convert to AVI. Put AVI + WAV as below in AVS script. Lastly use VobSub to create IDX + SUB file. When opening the DVD VOB's directly in VDub-MPEG2 and using the VobSub VDub filter with created IDX and SUB file all works perfectly.

AVS script I use is following.

LoadPlugin("c:\winnt\system32\vobsub.dll")

Video = AVISource("d:\DVD's to be encoded\Movie\MrBean.avi")
Audio = WAVSource("d:\DVD's to be encoded\Movie\MrBean.wav")
AudioDub(Video,Audio)

VobSub("d:\DVD's to be encoded\Subtitles\MrBean")

When using above script AVS script it gives me no errors, but also doesn't show the subtitles.

When opening above script without the VobSub line in Vdub-MPEG2 and again using the VobSub VDub filter all works well too.

Programs I use are w2k pro, AVISynth 2.07, VobSub 2.23 and VDub-MPEG2 1.5.1.

As a last, when I try to open the by VobSub created SUB file in SubResync I don't see any entries and when exiting or clicking "Save As" it crashes.

Does anybody have any idea where to look for the problem, or even better have a solution for this problem which would enable me to use this AVS script solution?

Thanks in advance for any tips, Leon

gabest
29th April 2003, 10:43
Try vsfilter.dll with the same syntax (VobSub(..)), and/or send me the idx in email to have a look.

LigH
29th April 2003, 12:47
It often happens that you extract subtitles which are not contained in the first subtitle stream of the DVD, and you forgot to select the correct subtitle stream number in the "Configure VobSub" dialog before using the IDX file in the filter; or the subtitles are not contained in PGC 1 of the VTS, but you didn't change the PGC when extracting the subtitles, so the SUB file with the images is empty, and so is the list in the IDX file (this sometimes happens when a trailer or a blind navigation cell precedes the main movie).

But you wrote that the VDub VobSub filter works fine... then, I have no idea. :(

droopy928gt
30th April 2003, 12:04
@Gabest

Am I right in thinking that you were the one who cooked up VobSub. If so, thanks very much as it prooved for me to be an easy start getting acquainted with subtitles. I had already read many a guides and forums where all seemed a bit complicated to me. VobSub has made it very easy for me though.

Now for your suggestion. Well, it took me about 45 minutes to figure out where to download this DLL but I managed to find its URL. No surprise it was on your site again. It did the trick though. It's working fine now. Subtitles first looked a bit odd with regard to letter quality though. I managed to solve that by playing a bit with the 4 colors in VobSub configure. This is basically for the moment also me next challenge in finding out what all is for and does. Some options are obvious and others I can't figure out yet. Especially the 4 colors and related options are a bit of a mystery to me, for which I also can't find anything in your text files. I therefore also would like to ask following. If you help me with some of the mysteries using VobSub configure options, I would like to write a usage guide for it which might maybe be usefull for you as part of your documentation??

Anyway, it works and thats already great for me.

About the IDX file. I'll email it to you if you're still interested. It crashes with SubResync, the version coming with VobSub 2.23. w2k says "SubResync has generated errors and will be closed by windows" Strange thing also is that it contains 3 languages for which only the first is in the language pulldown menu. The others, Dutch and English, don't show up there at all.

As a last, a suggestion for a future addition maybe? A "Save" button while using VobSub configure. This way you don't have to restart it all the time when playing around in getting the looks and position of subtitles as you want them to be.

Thanks again Gabest, its a great program you've cooked up here.

Best regards, Leon

LigH
30th April 2003, 15:05
About the 4 colors: DVD subtitles can contain pixels in 4 different colors. Each color may have its very own color and grade of opacity. Usually, the first color (palette index 0) is transparent, to enable the movie to look through around the subtitles. The second and third colors (palette entry 1 and 2) often are (mostly) opaque, white for the text body, and black for the text border. Sometimes, the fourth color is even used as well, to apply a kind of anti-aliasing (grey pixels to smooth stairy pixels) or for special effects (a different color - imagine karaoke subtitles, displaying the current lyrics position).

IFO subtitle colors can change during a VTS (probably from subtitle to subtitle, because Spruce DVD Maestro is able to simulate fade-in/out effects - but at least from PGC to PGC!).
_

P.S. - @ Gabest: Indeed, it could help to display some kind of preview!

gabest
30th April 2003, 15:13
Each pgc has its own palette of 16 colors, and each subpicture can select 4 of them.

ukendt
30th April 2003, 15:37
could be using VobSub 2.18 and don't use vfapi to convert to avi .
Avisynth 2.07 will read your d2v file and TMPGENc your avs file (or CCE ) and encoding time will be 2/3 of what U are used too today:D

ppera2
30th April 2003, 21:02
LoadPlugin("F:\AVISynth\MPEG2DEC.DLL")
mpeg2source("E:\Movie.d2v")
LoadPlugin("C:\Program Files\Gabest\VobSub\textsub.vdf")
Crop...
Resize....
TextSub("G:\MovieTitle.ssa")

Try with script like this (set YUV in DVD2AVI when make project).

This AVISynth script you can load as source in VDub, Tmpgenc and even CCE. No need for Vfapi and AVI file.

droopy928gt
1st May 2003, 07:49
@ LigH

Thanks for the explanation of the 4 colors. When you write it like that it all sounds very logical. It also explain to me why the subtitles got better when I changed what I changed previously. As this was indeed the 4th color which got my subtitles to look smooth as I wanted them to be. I'm gonna do some experimenting with it to see if I can get myself to understand it all.

@ ukendt

Thanks for the suggestion. I assummed you meant by using MPEG2DEC.DLL. I did this and it looks a bit faster. I've got to try some more to make sure of this though. Would be nice as it saves me the VFAPI step. Saillant details is that with this combination VobSub.dll works without problems.

@ ppera2

Thank you as well for your suggestion. I think the script you mentioned is probably the same as what ukendt was referring to, except for the SSA step. I gonna stick with SUB and IDX though as making SSA would add another step again. Since I'm lazy by nature I always try to find the simplest way possible. Within reason offcourse. The script I use now is following.

LoadPlugin("mpeg2dec.dll")
LoadPlugin("c:\winnt\system32\vobsub.dll")

Video = AVISource("d:\DVD's to be encoded\Movie\MrBean.d2v")
Audio = WAVSource("d:\DVD's to be encoded\Movie\MrBean.wav")
AudioDub(Video,Audio)

VobSub("d:\DVD's to be encoded\Subtitles\MrBean")

This works very well with 2 of my DVD's I've tried so far.

Searching the internet for more information I've also discovered a AC3SOURCE.DLL which should allow direct use of AC3 with AVISynth. Gonna try that as well as that would save even more time since converting from AC3 to WAV takes a lot of time.

Thanks to all for your suggestions. It helped me out a lot.

Best regards, Leon

ppera2
1st May 2003, 14:40
Script was for text (ASCII) based subtitles. I prefer it, because I can put font and settings how I like it.
Other reason is that I often don't have title on my language on DVD, so I need to download it from some site, and they don't hold large VobSub files, just textual ranslations.

About AC3: I usually work first with video only, and later mux audio to finished AVI or Mpeg video. There is couple way to make MP2 audio from AC3...