Page 1 of 1

encode a DVD-file into mpeg4/avi

Posted: Sep 28th, '07, 15:45
by gixo
Not sure if such a topic already exists. but since it has sth to do with the subbing process there must have been a subject which I simply overread. If that's the case please merge the topics.

My group is realeasing "In love with a girl" at the moment. We had some problems with the quality of the last episodes as we only had the rmvbs. But now I got my hands on the DVDs (the quality is so much nicer :-) ). But this is where the problem starts. I am not really good in stuff like encoding. Actually my experiments I did (using virtualdub and MeGUI) turned out to be pretty bad. So I need a guide about how to encode a DVD file into avi or mpeg 4 or whatever format written in an understandable language.
I tried doom and videohelp but there are so many options. I am not really sure which format is better. Xvid, Dvix, avi, mp4...I got really confused. Which one shall I use and where is the difference? Also which size shall I aim for? Is there such a big quality difference between 700MB and 400MB files? as for the audio, lame mp3 is good, right?

Posted: Sep 29th, '07, 05:06
by Bankai
Well the main things you need to worry about during encoding fansubs is the video codec, audio codec, size etc. As for the codec, you basically have three main choices when fansubbing: XviD, DivX, or h.264 (x264)

I would personally go for XviD as it easier to use, is more stable, is free, and is more standard/supported. DivX is basically the same as XviD, but it isn't free and isn't as configurable. You would go for x264 if you want to keep very good quality at lower filesizes, but then this means it can take a LOT longer than when encoding with XviD or DivX, and can also take longer to process on slower computers, which means lag. Another bonus about XviD is that it works almost perfectly on all DivX Players, if you don't use the QPel and such. Also, make sure you always go for 2 or Multi Pass, as they always produce better quality for your filesize. Also, watch out for interlacing, as that can be a pain to watch, and even more of a pain to undo if it wasn't done right (as is the case with a few asian dvd's, but mostly the bootlegged Chinese ones).

As for size and quality, it's pretty much up to you to experiment. You can try different filesizes, and which ever is satisfactory should be the one you go with. Sometimes there can be little difference between a 700mb file and a 400mb, but sometimes there can be alot. It mostly depends on the source and codec.

As for audio, Lame MP3 is good, I usually encode it at 160kbps. Perhaps I'll write a guide during these holidays on encoding DVD's and hardsubbing them. I'm sure a guide suited to the more to the fansubbing environment (ie just adding subs) would help new fansubbers a lot. :D I have to also mention that the doom9 and videohelp guides ARE very helpful with this sorta thing as well, but as you said can be confusing.

Posted: Sep 29th, '07, 15:38
by gixo

thanks for your input. Really hope that you can write a good guide when you have some free time. you are right videohelp and doom are good resources, but if you don't know where to start it doesn't help. but since I now know that I should go for XviD, I at least know which guides are relevant for me.
If I succeed in encoding I might share some of my other dramas. I have a nice collection of TW dramas.

fansubber environment? Do you mean the fansubbing thread? I've been there a lot and know how to add subs (but my results are not good enough to be shared). So do you want to say that adding subs and encoding DVD files are about the same procedure. I understand that they are, but you see I keep the original file format when I add subs to sth, so I wasn't really sure which kind of file I should chose since all the subbers use different programs and ul different kind of files. hehe, I am not really a new fansubber, but I am only repsonsible for timing, translating, QC and not for the technical aspects. I rather leave the tech. aspects to the people who know what they do. but since I am the one with the DVDs... :-(

Posted: Sep 29th, '07, 21:43
by Bankai
Oh yeah, I forgot to mention that avi works with it the best.

Posted: Oct 9th, '07, 12:39
by gixo
stupid question I know, but can you tell me how long the first pass of a 2 pass takes? Somehow my first pass only needs about 1 min and then it's done whereas the 2nd pass takes some hours. Shouldn't the first pass take more time?

Posted: Oct 9th, '07, 12:50
by InTr4nceWeTrust
As far as I remember, the 2 passes for an XviD encoding should be equal. So that seems really odd to me that the first pass takes you a minute.

The exact time it takes to encode is dependent on your computer. My comp is a bit old and I think takes 2-3 hours per pass on a 700MB file. A newer computer (one of the new dual cores) takes an hour at most.

Posted: Oct 9th, '07, 12:50
by Bankai
Hmm, that is strange. What exactly are you doing to encode the dvd's?

Posted: Oct 9th, '07, 19:08
by gixo
I was playing around with virtual dub. Under "Video" I set the compression to Xvid first pass and the audio to lame MP3. Full processing mode. Then I saved it as avi-file. I used a small mpeg file for tests. The file is only 35MB big and it took about 30 seconds until the file was saved. I use that file to do my second pass then. And that takes a lot more time. btw realized that Virtual Dub doesn't accept vob files. That's why I was also experimenting with Gordian Knot but it somehow messed up my PC. I am having difficulties to open some of my folders now so I got rid of GK again. Not sure if that happened because if GK but I need to fix my PC first before using it again.

Posted: Oct 9th, '07, 20:57
by Bankai
I'm not sure where you're going wrong*, but maybe try this:

- If you don't have it, get Avisynth 2.5 and DGIndex. With DGIndex there should be a DGDecode.dll file in the zip/whatever it comes in, which you put into the Program Files/Avisynth 2.5/Plugins folder.

- Get this program called DGIndex, load your vob into there, go to Audio and choose Output Method>Demux AC3 tracks to WAV. Then go to File>Save project.

- When that's done open notepad (or your preferred text editor and then type in something like, making sure you are pointing to the .d2v file and not the vob:

- Try loading that into VirtualDub (or I recommend VirtualDub MOD). You can change "Full processing mode" to "Fast recompress" if you aren't using any filters to save a bit of time.

- Just walking through what I normally do, go to the compression window and choose xvid. Probably leave the profile at unrestricted, and change the encoding type to "Two pass: first pass" if it isn't already like that.

- Go and save the avi file, but make sure you check "Dont run this job now... etc.".

- Then go to the compression tab again and into the xvid window, and change the encoding type to 2nd pass, and bitrate to what you have calculated in the bitrate calculator. Best not to change any other settings.

- Then go to the "Streams" tab and click on stream list and click add, and add the .wav file that DGIndex made earlier. Then right click on that and change the encoding settings (you know how to do that.)

- Again you go and save the avi file, but make sure you check "Dont run this job now... etc.".

- Then in job control under the file menu press start and see if the 1 minute 1 pass still occurs.

* Though, seeing as the VOB is only 35mb big, it may not be too unusual for that to happen. Maybe you should try with something longer than 1 minute and see if it still occurs. I would say that a 35mb file is only a few seconds, right?

Note: Also, try and learn how to use Avisynth, because it's a really helpful tool because it allows you to encode practically any file playable on your computer in VirtualDub.

Posted: Oct 10th, '07, 00:13
by gixo
DGIndex is a part of DGMPGDec right? Btw. is there a difference btw virtual dub and virtual dub mod at all? to me it looks rather similar.
As for the 1st pass, if I chose "don't run this job now", the first pass will run together with the 2nd pass then or when does it run? I did this before but then it seemed like a single pass to me.

I'll try to follow your advices. Thanks for them. I let you know if it works for me. bet I am back whinning and asking for help soon :lol But I definetely figure it out (hopefully :unsure: )

Posted: Oct 10th, '07, 01:40
by Bankai
Yeah, I think DGIndex is a slightly updated version or something. As for the "Don't run your job now" option, its mainly used because its easier than waiting specifically when your 1stpass finishes to do all the settings again for your second job. It runs each job in the order you save them, so immediately after it finishes the 1st pass it should start the 2nd. I'm not sure, but I'm quite sure most people here use VDubMod. I don't know the specifics, but for me it just does things faster than regular VDub does.

Posted: Oct 11th, '07, 03:50
by nalika
been wanting to know why people who rip their drama from dvd can get such great quality. I tried doom and videohelp, try so many programs but still can't improve the quality if someone can write a guide that would be great

Posted: Oct 31st, '07, 20:28
by gixo
Hi Bankai,

finally had the time to try out some encoding. but I have to confess that I wasn't using DGIndex since I found a Virtual Dub version which is able to handle DVD files. However I still am NOT successful.

So here is what I tried:
a) I loaded the vob file and set the video compression to XVID 1st pass
b) set the audio to lame MP3
c) save as avi (don't run this job now)
d) set the video compression to 2nd pass and saved the avi (don't run job now)
e) went to job control and started it.

However the quality came out so super-dooper bad. Dunno why.

I also tried:
a) I loaded the vob file and set the video compression to XVID 1st pass
b) set the audio to lame MP3
c) save as avi (don't run this job now)
d) set the video compression to 2nd pass and saved the avi

However whenever I do this a message appears saying that sth went wrong. here is the crashinfo (I don't understand a single thing)

VirtualDub-MPEG2 crash report -- build 24586 (release)

100a3720: 43 inc ebx
100a3721: 088b308bd489 or [ebx-762b74d0], cl
100a3727: 328b7804897a xor cl, [ebx+7a890478]
100a372d: 048b add al, 8bh
100a372f: 7008 jo 100a3739
100a3731: 897208 mov [edx+08h], esi
100a3734: 8b400c mov eax, [eax+0ch]
100a3737: 89420c mov [edx+0ch], eax
100a373a: e875000000 call 100a37b4
100a373f: 8b45ec mov eax, [ebp-14h]
100a3742: 8b1b mov ebx, [ebx]
100a3744: 8b5004 mov edx, [eax+04h]
100a3747: 8955e8 mov [ebp-18h], edx
100a374a: 3bda cmp ebx, edx
100a374c: 75cb jnz 100a3719
100a374e: c745fcffffffff mov dword ptr [ebp-04h], ffffffff
100a3755: 8b45ec mov eax, [ebp-14h]
100a3758: 8b7004 mov esi, [eax+04h]
100a375b: 8b1e mov ebx, [esi]
100a375d: 3bde cmp ebx, esi
100a375f: 7425 jz 100a3786
100a3761: 8bc3 mov eax, ebx
100a3763: 50 push eax
100a3764: 8b1b mov ebx, [ebx]
100a3766: 8b10 mov edx, [eax]
100a3768: 8b4804 mov ecx, [eax+04h]
100a376b: 8911 mov [ecx], edx
100a376d: 8b7804 mov edi, [eax+04h]
100a3770: 8b10 mov edx, [eax]
100a3772: 897a04 mov [edx+04h], edi
100a3775: e8ae860500 call 100fbe28
100a377a: 59 pop ecx
100a377b: 8b45ec mov eax, [ebp-14h]
100a377e: 834008ff add dword ptr [eax+08h], 0ffh
100a3782: 3bde cmp ebx, esi
100a3784: 75db jnz 100a3761
100a3786: 8b45ec mov eax, [ebp-14h]
100a3789: ff7004 push dword ptr [eax+04h]
100a378c: e897860500 call 100fbe28
100a3791: 59 pop ecx
100a3792: 8b55ec mov edx, [ebp-14h]
100a3795: 8b7ddc mov edi, [ebp-24h]
100a3798: 8b75e0 mov esi, [ebp-20h]
100a379b: 8b5de4 mov ebx, [ebp-1ch]
100a379e: 33c0 xor eax, eax
100a37a0: 894204 mov [edx+04h], eax
100a37a3: 894208 mov [edx+08h], eax
100a37a6: 8b4df4 mov ecx, [ebp-0ch]
100a37a9: 64890d00000000 mov fs:[00000000], ecx
100a37b0: 8be5 mov esp, ebp
100a37b2: 5d pop ebp
100a37b3: c3 ret
100a37b4: 8b410c mov eax, [ecx+0ch]
100a37b7: 85c0 test eax, eax
100a37b9: 7419 jz 100a37d4
100a37bb: 8b542404 mov edx, [esp+04h]
100a37bf: 3b10 cmp edx, [eax] <-- FAULT
100a37c1: 7507 jnz 100a37ca
100a37c3: c6411001 mov byte ptr [ecx+10h], 01h
100a37c7: c21000 ret 0010
100a37ca: 52 push edx
100a37cb: e858860500 call 100fbe28
100a37d0: 59 pop ecx
100a37d1: c21000 ret 0010
100a37d4: 8b542404 mov edx, [esp+04h]
100a37d8: ebf0 jmp 100a37ca
100a37da: 90 nop
100a37db: 90 nop
100a37dc: 8b442404 mov eax, [esp+04h]
100a37e0: 89410c mov [ecx+0ch], eax
100a37e3: ba01000000 mov edx, 00000001
100a37e8: 885110 mov [ecx+10h], dl
100a37eb: 885118 mov [ecx+18h], dl
100a37ee: c20400 ret 0004
100a37f1: 90 nop
100a37f2: 90 nop
100a37f3: 90 nop
100a37f4: 57 push edi
100a37f5: 56 push esi
100a37f6: 55 push ebp
100a37f7: 53 push ebx
100a37f8: 8bf1 mov esi, ecx
100a37fa: 8b4608 mov eax, [esi+08h]
100a37fd: 85c0 test eax, eax
100a37ff: c6461800 mov byte ptr [esi+18h], 00h
100a3803: 7515 jnz 100a381a
100a3805: 8b560c mov edx, [esi+0ch]
100a3808: 33c0 xor eax, eax
100a380a: 894208 mov [edx+08h], eax
100a380d: 8b4e0c mov ecx, [esi+0ch]
100a3810: 88410c mov [ecx+0ch], al
100a3813: 5b pop ebx
100a3814: 5d pop ebp
100a3815: 5e pop esi
100a3816: 5f pop edi
100a3817: c20400 ret 0004
100a381a: 8b4604 mov eax, [esi+04h]
100a381d: 8b5004 mov edx, [eax+04h]

Built on Shilpa on Thu Sep 27 00:49:58 2007 using compiler version 1200

Windows 5.1 (Windows XP build 2600) [Service Pack 2]

EAX = 0263fb64
EBX = 023e68e0
ECX = 023ed244
EDX = 05c70020
EBP = 0012f9ac
ESI = 00000008
EDI = 001fa400
ESP = 0012f974
EIP = 100a37bf
EFLAGS = 00210202
FPUCW = ffff027f
FPUTW = ffffffff

Crash reason: Access Violation

Crash context:
An out-of-bounds memory access (access violation) occurred in module 'divx'...

...reading address 0263FB64.

Pointer dumps:

EBX 023e68e0: 0032fbc0 0032fbc0 05c70020 001fa400 00000008 7c913700 00040005 010c0158
ECX 023ed240: 00000001 0200d360 0032fbc0 00000001 0263fb64 00000001 001fa400 00000001
EDX 05c70020: b6010000 7f338854 00000000 00000000 00000000 00000000 00000000 00000000
EDI 001fa400: c4411666 c413f666 c3e30ccd c3cea000 c3d63999 c3ef6666 c4124ccd c4307666
ESP 0012f970: 00000000 100a373f 05c70020 001fa400 00000008 7c913700 023eccd8 024118f0
0012f990: 101a2998 0032fbc0 023ed244 0012f988 0012f9e0 1014348c 00000000 0012f9ec
0012f9b0: 1009098e 1019ffa8 1019ffa8 023eccd8 1019ffa8 023eccd8 024118f0 023eccd8
0012f9d0: 0012f9b0 00000051 0012fa08 0012f9b4 0012fa08 10143262 00000006 0012fa14
EBP 0012f9a8: 00000000 0012f9ec 1009098e 1019ffa8 1019ffa8 023eccd8 1019ffa8 023eccd8
0012f9c8: 024118f0 023eccd8 0012f9b0 00000051 0012fa08 0012f9b4 0012fa08 10143262
0012f9e8: 00000006 0012fa14 10064935 023eccd8 024118f0 023eccd8 023eccd8 0012f9f4
0012fa08: 0012fa54 10142ab8 ffffffff 0012fa60 1006489e 024115f8 1003396f 00000001

Thread call stack:
100a37bf: divx!DriverProc [10000000+4034+9f78b]
100a373f: divx!DriverProc [10000000+4034+9f70b]
1009098e: divx!DriverProc [10000000+4034+8c95a]
10064935: divx!DriverProc [10000000+4034+60901]
1006489e: divx!DriverProc [10000000+4034+6086a]
1003396f: divx!DriverProc [10000000+4034+2f93b]
10002886: divx!00002886
10004557: divx!DriverProc [10000000+4034+523]
75ec18a8: MSVFW32!ICSendMessage [75ec0000+187d+2b]
004b277b: VideoSequenceCompressor::finish()
004b20c3: VideoSequenceCompressor::~VideoSequenceCompressor()
0047bd3e: Dubber::Stop()
004a0991: VDProjectUI::UIRunDubMessageLoop()
0049c0ac: VDProject::RunOperation()
00474afa: SaveAVI()
0048e508: SaveAVI()
0049df11: VDProjectUI::MenuHit()
7e369488: USER32!GetWindowLongA [7e360000+945d+2b]
7e36b3a7: USER32!DefWindowProcW [7e360000+b33c+6b]
004a7311: VDUIFrame::DefProc()
0049fb9b: VDProjectUI::MainWndProc()
7e38e175: USER32!User32InitializeImmEntryTable [7e360000+2d35d+e18]
7e38e152: USER32!User32InitializeImmEntryTable [7e360000+2d35d+df5]
73d34ef0: MFC42!00004ef0
7e3684fc: USER32!000084fc
7e3685a4: USER32!000085a4
7e369488: USER32!GetWindowLongA [7e360000+945d+2b]
0049f74e: VDProjectUI::WndProc()
004a75d4: VDUIFrame::StaticWndProc()
7e368734: USER32!GetDC [7e360000+86c7+6d]
7e368816: USER32!GetDC [7e360000+86c7+14f]
7e3689cd: USER32!GetWindowLongW [7e360000+88a6+127]
7e36ca67: USER32!PeekMessageA [7e360000+c96c+fb]
7e3696c7: USER32!DispatchMessageA [7e360000+96b8+f]
0048e136: WinMain@16()
00528e8f: WinMainCRTStartup()
7c816fd7: kernel32!RegisterWaitForInputIdle [7c800000+16f8e+49]

-- End of report

The 9 seconds which I received before the crash has a really nice quality. Strange thing it always crashes at 9 seconds. Same thing happened when I used Virtual Dub Mod.
Do you think it has sth to do with the audio? Shall I create a wav first like you suggested and add it later? or shall I use another MP3 format?
btw I am using the XVID version which comes along with the k-lite mega codec pack.

ok, I am going to try the wav method or another MP3 format now.


apparently it had to do with LAME MP3. I used a wav file now and it works pretty nice. However I have another stupid question. I am not really sure how to handle the bitrate calculator. The bitrate calcualtor doesn't really tell me anything. I put in the length of the time and didn't change the rest. And my file turned out to be 110 MB coming from an 90MBbig file. And then put in 50MB manually without the calculator and it came out as a 58MB big file. I am adding a pic of the calculator and hope anyone can tell me how to set it.

EDIT2: Ok, I think I know why thw calculator messed up. It's because my testfile is so small. So if I put it on 1 700 MB CD it gives me a really high rate. hmmm... but when I used 1/2 CD it also gave me the same rate. :scratch:

Posted: Oct 31st, '07, 22:48
by gixo
Ok, I succeded in creating some files (though the size didn't really turn out the size I like to have them)

This is the intro for "In love with a rich girl". The actual DVD file size is 90MB big.

I was able to reduce it to 61%
and to 28%

Please give me a feedback wether the video and audio quality are ok. If you need the original file for reference please tell me and I gonna ul it. Thanks for all your help.

Posted: Nov 1st, '07, 07:16
by Bankai
Video and audio quality are great, but obviously the bigger file has the better quality. I don't have experience with the DivX bitrate calculator, so all I can say is that when I've used the XviD one everything I've encoded has seemed to have come out fairly accurately, in terms of file-size. So basically I just think you should do a few test encodes of an entire episode at different bitrates, and just go with whatever you feel comfortable with.

One other thing I noticed with your file is that it was interlace, which basically means each frame is made up of two "fields" , so when there are objects moving across the screen they sometimes create annoying lines across it. One way to deal with it is by using VirtualDub's simple Deinterlace filter, which you should probably use the option Blend with.

After you deinterlace it, a good idea would probably be to resize it, as right now it is still on a dvd resolution, which makes the people look a bit too fat. I suggest something like 704 x 528 for a DVD Rip, but when using VirtualDub's resize filter make sure you NEVER use Nearest Neighbour. Go for something like Bicubic Resize or Lanzcos3. NEVER resize before deinterlacing, otherwise it just screws everything up.

Off-Topic: I just love how non-english speakers write lyrics for songs in english, which neither make sense or are even spelt right :lol "Hay baby..." "Yeah we can fun!"

Posted: Nov 1st, '07, 12:30
by gixo
Thank you. I realized that there were some stripes in the video but didn't really figure out where they came from and how to get rid of them. So here is the resized and interlaced file ... d.avi.html

hmmm.... Xvid and Dvix. Doesn't really make a difference for me but I realized that a lot of DVD players only support Dvix. That's why I am using that codec. Bah... test encodings to find the right size? Oh man, if i won't succed at once it'll take me hours.

Off Topic: haha, you are right about the English words. And sometimes the pronounciation is so weird that I don't even realize that it's English (not for that song but for a couple of other songs)

Btw. I would really appreciate if you guys (not only bankai) could give me some feedback wether you would watch a file with that kind of quality or not. I don't wanna get scolded by everyone for my poor encoding skills and go through the procees of reencoding and reuploding it again.

Posted: Nov 2nd, '07, 06:04
by Bankai
As long as you don't use too many special settings, XviD should do fine on a DivX player, since they both compress to the same standard. Standard video sizes are basically 700mb, 550mb, 450mb, or 350mb, etc. So whichever you think is suitable should be alright. To try and see what the quality would be like for an entire episode at a certain size, you can probably take a shortcut by just using a small clip from an entire episode, but when calculating the bitrate input the entire episode's filesize and length.

The quality of the video is excellent, the only thing I have to say is that sometimes Deinterlacing by blend makes the video blurrier than it should be, so if you want an almost perfect deinterlacing job, you can do this with Avisynth and a few filters, though sometimes it may take longer to encode. Though, you can also resize in Avisynth as well, and then choose fast recompress in VDub, so it might actually be faster. It's all pretty dependent on the source.

To make the avisynth script, open notepad, and type in something like this, and save it with an .avs extension: (assuming you use DGIndex to process the vob and have the DGIndex plugin installed in Avisynth)

Code: Select all

I think you should try this out just to see how it looks, but you'll also need this plugin: ... nterlacer/ installed in your Program Files\Avisynth\plugins directory for it to deinterlace.

EDIT: One more thing is, in some cases (it's happened to me) the Avisynth method can stuff up some of the words that fly by during the credits, but usually it should be fine. Oh and I just noticed in your screenshot that the calculator has the audio set to 128kbps. I can't remember if I told you, but if you are encoding at 160kbps in LAME then make sure you input 160kbps for the audio in the calculator too, that may be why your files are coming out at the wrong size.

Posted: Nov 10th, '07, 23:39
by gixo
Finally had the time to try out avisynth. However I did sth wrong. when I tried to open the file I got a message that sth in my code were wrong.

Posted: Nov 10th, '07, 23:54
by Bankai
Do you have the DGDecode.dll? If you do, make sure it's in the Avisynth 2.5/plugins folder, and the .dll is the same version as the DGIndex program you used to make the d2v. (In any case, the right dll should come in the same package as the DGIndex program.)

Posted: Nov 11th, '07, 00:29
by pariah
Hey i use a program called AutoGK very simple to use and the results are really good In my opinion and as the title says its automatic for the most part.
Choose the file size and under advanced setting choose whether xvid of divx (i use xvid mainly) and what format and bitrate to make audio and click start! thats it!.
Runs a 2 pass encode you can go deeper (CTRL-F9) if you want but for the usually its not necessary and if you want to add hardcoded subtitles you can (CTRL-F8 ) add srt subtitles then uncheck external subtitles thats it

Posted: Nov 11th, '07, 19:00
by gixo

I copied the DGEncode.dll which came with the PGIndex into my avisynth folder. So it's definetely the same version as the PGIndex. However I am receiving the above mentioned message over and over again. I don't get it. I had no problems when I used a d2v for a rmvb file to encode it into avi. So I know that the virtual dub on my PC can handle d2v. However for the vob-files... If I can't figure out the problem, I'll stick with the stuff I already am able to do so the result isn't as good as it could be. btw. do you use lame MP3? Coz I am not using it since it crashes my virtual dub. I wonder why I am the only one who can't use it while everyone else is using it.

thanks for the tip with AutoGK. I tried it some month ago. however there were some problems with my old PC so I stopped using it. But since I got a new one now, maybe I should give it a try again.

Posted: Nov 12th, '07, 10:05
by Bankai
Did you make sure it's in your plugins folder as well? I'm not sure what you mean by you used a d2v for an rmvb, seeing as d2v only handles mpeg files. Did you mean avs files? To make sure that avisynth loads the .dll, you could always put in LoadPlugin("Filepath\DGDecode.dll") at the top of your script. If all else fails, then I have no idea, lol. I have no idea why you can't use Lame either. Maybe you can try encoding the audio separately, and then muxing it back with your final avi file.

Posted: Nov 12th, '07, 12:49
by gixo
yeah, I made sure that the dll is in my pluginfolder. as for what I meant with rmvb file is that I used avisynth before to create a code so virtual dub was able to handle it. So I know that avisynth normally is working for me. As for LameMP3. It seems that there are some issues between Lame and Xvid or sth. I get a message about licenced sth or what. I can tell you exactly when I am at my PC at home. But I think the audio I had for the files before is ok as well. so maybe I just leave it as it is.

Posted: Nov 13th, '07, 06:04
by Bankai
Maybe try processing the vob through the DGindex again to get your d2v file, perhaps the first one somehow got corrupted? I'm not sure it'll work, but I guess you should try. After reading the error again, it looks like it *could* be something to do with the d2v.

Posted: Nov 13th, '07, 19:43
by AkumaX
try opening your .d2v file that was generated with DGIndex with Notepad. if it's empty, something's wrong. the .d2v file is basically a pointer to your .vob file, but tells your processing program what to do with the vob (kinda like how your .avs files point to a video file (.rmvb, .d2v, .avi), when the .avs file isnt the video file itself)

your .d2v file should look something like this:

Code: Select all


Frame_Rate=29970 (30000/1001)

f00 6 0 2048 0 1 1 d0 f0 f0 e0 f0 f0 e0 f0 f0 e0 f0 f0 e0 f0 f0 e0
f00 6 0 34816 0 1 1 d0 f0 f0 e0 f0 f0 e0 f0 f0 e0 f0 f0 e0 f0 f0 e0
f00 6 0 69632 0 1 1 d0 f0 f0 e0 f0 f0 e0 f0 f0 e0 f0 f0 e0 f0 f0 e0
i just looked at my .avs file, try using the function below instead:


Posted: Nov 16th, '07, 20:16
by gixo
I don't know why it's not working. I created a new d2v file and the txt looks similar to the one AkumaX posted. And still I receive an error for whatever reasons.

I used another encoding programm to create this file

It looks ok, I guess. However with that programm you can't add subtitles or change the file size (it automatically creates it for you). So I don't know if I should use it. But it should be good enough for some raw uploads. Please tell me what you think about it.

Posted: Nov 16th, '07, 21:15
by AkumaX
Looks pretty good to me :) It uses 2800kbps for XviD, which is pretty high however. Too bad you can't change the bitrate :\. Also, have you tried DGdecode_mpeg2source() vs mpeg2source()?

Posted: Nov 16th, '07, 23:03
by gixo
Oh, wrong epression. I can change the bitrate. What I meant is that I don't really have an influence of the ending size result. I mean what you see is the highest quality I could get with that programm. So my original file was about 80Mb big and I encoded it to 33MB. So if I want an even higher quality it's not possible to do that with that certain programm. However I can create files with smaller size since it's actually differentiate betweent encdoding for TV, PC, mobile etc.

DGdecode_mpeg2source() vs mpeg2source???

I am not really good with avisynth commandos. Normally, I simply uses the codes which were given to me. I don't really try to different commando codes. So I don't really understand what you mean.

wah, encoding is soooo complicated.

Posted: Nov 16th, '07, 23:18
by Bankai
Basically AkumaX is saying to replace MPEG2Source with DGDecode_MPEG2Source in your Avisynth script.

Posted: Nov 16th, '07, 23:22
by AkumaX
gixo wrote:What I meant is that I don't really have an influence of the ending size result.
use a bitrate calculator! there's one included in the K-Lite Codec Pack (full)
or you can try this online version (select custom, divx)
gixo wrote:DGdecode_mpeg2source() vs mpeg2source()???
give me your .avs file (you could even cut and paste it here) and i'll edit it for you to save it
gixo wrote:wah, encoding is soooo complicated.
no its not :P

Posted: Nov 16th, '07, 23:43
by gixo
However what is the best size? 700MB or 350MB? I know it's up to me to decide but what is considered to be a nice quality?50 % size of the original source, 70%? haha, actually I don't really care about the size as long as it looks nice but there are some people who complains that when they burn the files there are too many space left on the DVD. :roll

Code: Select all

YES, encoding is complicated. Well, not for the simple stuff like adding some subtitel etc for your own use but to encode for the mass. btw. I haven't figured out how to encode with LAME MP3 yet (the audio from before where chose by the programm). But AC-3 ACM Code should be ok, too, right ? (please say yes, please say yes... :lol )

Posted: Nov 17th, '07, 00:27
by Bankai
From what AkumaX was saying, replace the line
MPEG2Source("C:\8-13\VIDEO_TS\VTS_02_1.vob.d2v") with
so the whole script would be

Code: Select all


Posted: Nov 17th, '07, 11:01
by gixo
I already tried what AkumaX said and I still got an error. However the line were only DGDecode_MPEG2Source("C:\8-13\VIDEO_TS\VTS_02_1.vob.d2v") without the rest. wondering if that makes any difference. I'll give it a try again.

After using a bigger file I figured out that the other programm I am using is creating too big files now. However I found out how to adjust the video bitrate with it. Can someone please tell me, what is an ok bitrate. 696?

Anyway, if avisynth isn't going to work for me I can still encode a slightly blurrier video which wouldn't be perfect but still better than any rmvb file.

Posted: Nov 17th, '07, 19:14
by AkumaX
alright alright, i'll tell you what is hard...

diagnosing someone's computer problem over the internet :wub:

i can't figure out why avisynth won't work for you. the only thing i could suggest is re-installing avisynth 2.5.7 and the dgdecode files. i just found this link ... erving.htm (following step 1 and the 1st half of step 2)

with the proper files, so maybe that'll work (i'd suggest putting the dgdecode.dll in c:\programs files\avisynth\plugins directory)

Posted: Nov 17th, '07, 22:06
by Bankai
It's a long shot, but it also might be something wrong with the source file (but again, the chances of that are pretty low...) Maybe if you could just upload the original .VOB file and I could test it on my computer, make sure I don't get any errors either.

Posted: Nov 19th, '07, 22:04
by gixo
thanks for the link. I'll try to follow the guide when I have some more free time.
btw. I saw that you are encoding Mr. Fighting. You are using ydy, right? hmmm... if avisynth ever works out for me I could help with some better files.

I'll ul the original file as soon as possible. thanks for your offer.

Posted: Nov 19th, '07, 22:23
by AkumaX
yes we're using ydy. what better files are you talking about? when i went to asia, i saw some vcds, but i wasn't sure if it was worth it or not.

Posted: Nov 20th, '07, 07:35
by gixo
my better files? What am I trying to do for the last weeks? Encoding my better files. :lol Got that drama coz it was sooo cheap. Got if for about 5 bucks.

Posted: Dec 6th, '07, 23:22
by gixo
pfff... finally had the time to ul the intro so you can check if sth is wrong with my file.

I think I'll work on some encodings, uploads and translating over x-mas time. Right now, I have no time to do it,

Posted: Dec 6th, '07, 23:48
by AkumaX
hi gixo, it works fine for me :) i even used the above code

Code: Select all

DGDecode_MPEG2Source("C:\8-13\VIDEO_TS\VTS_02_1.vob.d2v") //mine was just called VTS_02_1.d2v

Posted: Dec 7th, '07, 16:45
by gixo
hmm... I guess I really have to reinstall avisynth and try it again then. hmmm... maybe I have some time this weekened. maybe...

Posted: Dec 7th, '07, 16:48
by AkumaX
gixo wrote:hmm... I guess I really have to reinstall avisynth and try it again then. hmmm... maybe I have some time this weekened. maybe...
actually i did come up with that error; initially i made a typo. i used vts_2_1.vob.d2v instead of vts_2_1.d2v.

also, you didn't move either file, right? :mrgreen:

Posted: Dec 30th, '07, 20:16
by robx
i would like to give my simple input on how to do a real quick encode from dvd to mp4.

Things Needed:
1) Get and install megui
2) Get and install avisynth 2.5
3) Get and avs editor ( May help more than text pad to newbies )
4) Get a dvd ripper / demuxer such as dvd decrypter or any other of your choice.
5) Get and install subrip.

1) Rip the files such as this:
a) Leave video in vob
b) Leave Subtitle in vob
c) Demux Audio( s ) from vob

2) Use subrip to load the ifo file and start the subtitle ripping process (First use you will need to train the ocr to read what is detected ) Here is a little guide for this program.

3) Open the srt file which saved from subrip.
a) Copy all contents.
b) Open Office word of something with spell check and run through it to spell check.
c) Copy all contents that were corrected.
d) Paste into a new text file or overwrite old sub file with corrections. (Spell checked / edited or whatever)
e) Save as subtitle extension ( srt / ass ).

4) Open avs editor and put in something like this:
part1 = directshowsource("D:\dvd works\VTS_04_001.VOB",fps=29.976,seek=true,audio=false)
part2 = part1 + directshowsource("D:\dvd works\VTS_04_002.VOB",fps=29.976,seek=true,audio=false)
part3 = part2 + directshowsource("D:\dvd works\VTS_04_003.VOB",fps=29.976,seek=true,audio=false)
part4 = part3 + directshowsource("D:\dvd works\VTS_04_004.VOB",fps=29.976,seek=true,audio=false)
etc.. to how ever many vobs there are
vidcrop = part4.crop( 8,58,-8,-58 ) // parameters are (left, top, right, bottom) right and bottom must be negative values.
final = vidcrop.lanczos4resize( 720,480 )
return final

5 ) Save the avs file.

6 ) Open MeGUI

7 ) Load the avs as video source
a) Choose x264 (Others available)
b) Choose file format mp4 (Others available)
c) Choose a video profile. (Configure if needed to your own experiments)

8 ) Load the ac3 as audio source
a) Choose Audio Profile (Others available)
b) Choose Codec FAAC (Others Avaliable)
c) Extension MP4-AAc (Should be auto chosen, but in case its not)

9 ) Enqueue Audio

10 ) Enqueue Video

11 ) Click Queue Tab

12 ) Click Start to start the process.

Just let MeGUI do the auto sizing (Its always chosen a good file size for me)
No need to really worry about deinterlace.
Once all this is setup, the next few Rips and even other dvd's would become much easier as you can advance yourselves.
This isn't an advanced avs script, but something easy for newbies to make decent dvd rip quality mp4.
I would like to see more mp4 out since it is smaller in file size, better in quality, saves more HDD space, and a ton of others tiny things that can get to much into detail.
Correct me if i went wrong anywhere.

Posted: Dec 30th, '07, 20:22
by FoolyDooly
I have SUPER converter that lets me do this without too much hassle. Of course, lot of tweaking is required....... Nothing is good like manual conversion, but if you are doing massive conversion and decent quality (not backup DVD copy), I say try the SUPER converter.

I used this guide, and probably it is the most simple guides I seen on web. For DVD -> DivX/XviD .AVI
Some steps can be substituted for AVC/H.264/X.264 codecs, if you know what to do there. <3

Posted: Dec 30th, '07, 20:25
by robx
I didn't know super converter can do mp4. But i like to do my quality adjustments from series to series, so does super converter let you configure quality and settings like messing in the codec too ?

Posted: Dec 31st, '07, 01:38
by FoolyDooly
Yea, but it's only limited to FFDShow, as far as I know. I think anymore will require scripting, which I have no idea how to do. I never used the scripting feature.