PDA

View Full Version : Beginner on Avisynth Frameserving!


castellanos
1st July 2004, 18:57
Hi there!
I'm totally new in Avisynth frameserving, I used normally VFAPIConv, now I would like to try something different.
I would like to know: A guide (link) or if somebody is kind enough to explain me, how to convert a DVD to DivX (or XviD) with my own subtitles but frameserving with Avisynth. Which programs I need..etc.
I use AutoGK for some back ups, but I can not add my own subtitles.
Please, I would apreciate any help.
Greetings! :)

qwerpoi
1st July 2004, 21:51
Hmm, if that's all you need, you should just follow doom9's divx guide (http://www.doom9.org/index.html?/gknot-main3.htm) which goes through how to set up GordianKnot (not autoGK). Gordian Knot creates an avisynth script which it uses in encoding, you can edit it and add any filters to it you want. Of course, if you don't like the complexity of GordianKnot, all you really need besides avisynth is the new version of DVD2AVI called DGIndex (http://neuron2.net/fixd2v/decodefix.html) and VirtualDubMod (http://virtualdubmod.sourceforge.net/). You may also need some way to convert your ac3 audio into an mp3, the recommended tool is BeSweet (http://dspguru.doom9.net/) . Making an avi from a dvd this way means you'll have to be familiar with avisynth filters for deinterlacing, subtitling, etc. If you have no clue on how to use avisynth, www.avisynth.org (http://www.avisynth.org/) is a good place to start. There are plenty of guides at doom9 for all the other programs, so you should be able to get through it.

castellanos
1st July 2004, 23:22
Thanks for your reply!
Do yo think that, may be, could I use DVD2AVI (AC3 & D2V), make a Avisynth script for that, and put everything together with Dr. DivX?
I am not sure if VobSub is going to shoot the subs (I mean, if I put a srt file in the same folder) while encoding... it works with VFAPIConv, but with Avisynth...
What do you think?
Greetings!

qwerpoi
2nd July 2004, 00:26
I believe that you can do everything you need to do without Dr.Divx, basically avisynth can do every task needed except for the actual encoding. For subtitles, all you need is an avisynth plugin, I believe it is vsfilter.dll, you can get it here (http://sourceforge.net/projects/guliverkli/) . Once the correct dll is in your avisynth plugins directory, your script should look like this:

mpeg2source("C:\d2v_file_name.d2v")
ac3source("C:\ac3_file_name.ac3")
textsub("C:\subtitle_file_name.srt")

This is assuming you are using text-based subtitles like .srt. Keep in mind you can extract subtitles from dvds in a picture-based format using VSRip (http://sourceforge.net/projects/guliverkli/), which creates a .sub and a .idx file. In that case your script would look like this:

mpeg2source("C:\d2v_file_name.d2v")
ac3source("C:\ac3_file_name.ac3")
vobsub("C:\subtitle_idx_file_name.idx")

As I mentioned before, you need to have the vsfilter.dll file in your avisynth plugins directory to use the textsub or vobsub command (you also need the ac3source.dll to use the ac3source command). I can't guarantee the syntax here, since I'm at work without avisynth in front of me. Anyway, if everything is set up right, you can open this script in VirtualDubMod and you'll find your video with subtitles burned in, along with your audio. However, it is recommended that you do not use ac3source. Instead, make a compressed file with no audio, and use BeSweet to make the ac3 file into an mp3 (use the mp3-wav option for easy muxing), then mux the video and audio streams together using VirtualDubMod. Or if you prefer keeping the audio as ac3, use AVIMux (http://www-user.tu-chemnitz.de/~noe/Video-Zeug/AVIMux%20GUI/index-eng.html) . As always doom9 provides guides on how to use these programs so you wont get lost.

Anyway, you might need to play around a bit to get it all to work, but hopefully it will be worthwhile, since AviSynth gives a huge amount of flexibility with encoding. Feel free to post back if you have any problems.

castellanos
2nd July 2004, 02:21
Thank you very much for your reply! I really apreciate very much your help.
I wanted to make a test. It looks like this:

LoadPlugin("C:\Programme\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\Programme\AutoGK\filters\vsfilter.dll")

mpeg2source("C:\Test.d2v")
textsub("C:\Test.srt")

And I got an error message: "MPEG2Source: couldn't open source file, or obsolete D2V file"

Do you know why?

DarkNite
2nd July 2004, 03:24
Because you didn't make the d2v with DGIndex maybe? If you're using DGDecode you have to make the d2v with DGIndex. It's usage is the same as DVD2AVI as far as you're concerned.

Enjoy.

qwerpoi
2nd July 2004, 05:22
I agree with DarkNite, you need to make sure that your d2v file and your dgdecode plugin are compatible. The easiest way to do this is to download DGMPGDec (http://neuron2.net/fixd2v/decodefix.html) , which contains both DGIndex and dgdecode.dll. Follow the guides included in the zip file to make your d2v with DGIndex, and then make your avisynth script using the dgdecode.dll that came in the zip file, NOT the one from autogk (it may or may not be the same). Anyway, all this should be outlined in the DGMPGDec guide, so you shouldn't have any problems.

castellanos
2nd July 2004, 09:42
Good! I'll try that. I already found another soultion, instead of:


LoadPlugin("C:\Programme\AutoGK\DGMPGDec\DGDecode.dll")

I put:


LoadPlugin("C:\Programme\AutoGK\DVD2AVI\MPEG2Decdg.dll")

In this case, I think the original Aspect Ratio is not there, but it worked. I'll try with the DGIndex and see what happen.
Something else about the subtitles: Is it possible to change font and colors of it in the Avisynth script, or should I do it directly in VobSub?
Thanks!

castellanos
2nd July 2004, 15:23
So, I'm now tried you suggestion with DGIndex, it worked... pritty much the same as the solution I've mentioned before.
Anyway, the subtitle question is still unresolved and one last thing about the Aspect Ratios, in order to preserve the original: In the case I have a 16:9... wich setting should I use in the Avisynth script?
Greetings! :)

EDIT: Subtitle question: Solved!
Aspect Ratios?

qwerpoi
2nd July 2004, 21:36
You should be aware that it is recommended to use DGIndex and dgdecode.dll, instead of mpeg2dec.dll and your original d2v (which I assume was made using DVD2AVI). Not that it is the most critical issue, but it was found that DVD2AVI had some problems dropping frames in the beginning of the file, causing slight audio desync. DGIndex solves these problems.

As far as your question about aspect ratios, that's a bit harder. Typically you want to add a resize to your script to make the output as close to the original aspect ratio as possible, LanczosResize or BicubicResize are recommended. You should read this thread (http://forum.doom9.org/showthread.php?s=&threadid=42708) to get a better understanding of what needs to be done. You can also use Gordian Knot to compute appropriate resize resolutions that minimize aspect ratio error. Also, note that resizing is a good way to reduce filesize if your compressed files are too big, although you lose some quality. Most people around here frown upon resizing to anything lower than 512 by xxx, but play around a bit and see what you like.

castellanos
3rd July 2004, 01:05
Oh my God! that is really hard! I'm tring to understand a little bit of that Aspect Ratio subject, reading the link you sent me... It will take a moment, until (I hope) I get something of it.
Anyway, I got already some information... I can frameserving with Avisynth and then the rest with Dr. DivX, the result is not bad, and it is a little bit easier, and in every case, better than VFAPI.
At the moment: THANK YOU VERY MUCH!!!
I will let you know about my progress with Aspect Ratios.
Greetings! :D