PDA

View Full Version : Speeding up en-code HDTV to DVD using avisynth and VDub


thymej
24th October 2007, 03:14
Let me first start off by saying sorry for being long winded and I’m no expert by a long shot. I have been taking all the good advice from users on this forum and others and applying them to my en-code processes. So here we go:

I thought I would share what I discovered on how I sped up en-coding of HDTV 1080i to DVD 480. It’s a two step processes. There is a big gotcha though; you will need 7 times the disk space of your HDTV source. To compare speed, using the same quality settings for each method, the old way would have taken 12 hours to a 4 hour job with the new way.

Here is how it all started:
I was saddened when I realized I would only average anywhere from 5-8 frames per-second (CCE speed of 0.21) during the en-code. My en-code process was to en-code loading an AVISYNTH script in CCE. So a 1 pass 43min episode would take close to 3hrs to go from HDTV (1980x1080i) to DVD (720x480). With such a slow process I had to settle on a 1 pass or 2 pass en-coding. With a two pass I would have to wait close to 6hrs for just one 43min episode of 1080i. For me, that was to long. What I really wanted was a 4 pass en-code using CCE; but at 5-8 frames per second (CCE speed of 0.21), that’s just too long.

NOTE: My system is a P4 3GHz with 1GB ram Windows XP.

After reading lots of forums threads here and else ware, someone wrote something not related to speeding things up; they wrote telling someone to use VirtualDub and save the video as AVI for testing purposes. So I thought, would CCE take an AVI file from VirtualDub that was saved in a raw video format; raw, meaning no compression whatsoever (VDub’s Direct Stream Copy mode). What I discovered is, not only did CCE load the raw AVI but is also processed it at 15 time the speed. It went from a speed of 0.21 to 3.3. Wow, now I can do a 4 pass and get the quality I wanted.

Pass/Step 1 (3hrs (I need a dual core to make this step faster))
Pre-process the AVISYNTH script through VDub and Save as AVI using the Direct Stream Copy mode. NOTE: this will create an extremely large file. My 5GB 1080i episode of Heroes saves as a 31GB 480p file (Film frame rate IVTCed).

Pass/Step 2 (1hr for a 4 pass CCE, 15mins for a 1 pass)
Process the AVI file from step 1 above directly in CCE. Then muxman your audio.

Here is the script I use in pass/step 1:

MyVideoD2V="C:\DVDTest\Heroes-Test5.d2v"
SetMemoryMax(384)
MPEG2Source(MyVideoD2V, idct=3)
TFM(d2v=MyVideoD2V,slow=2)
TDecimate()
clip1=Spline64Resize(720,480)
masker=greyscale(invert(clip1)).tweak(bright=-90,cont=1.2)
clip1
clip2=HDRAGC(max_sat=1,avg_lum=100,coef_gain=2.5,max_gain=14,min_gain=0.5,protect=1,reducer=1)
clip3=overlay(clip1,clip2,opacity=0.3,mask=masker)
clip3
Convolution3D(preset="movieHQ")

It would be interesting to see how much faster it would be for those who en-code SD material.

Then again, the Con to this is it takes lots and lots of disk space; but it works for me. I can live with a 4hr en-code process when I know I’m getting the 4 pass en-code I wanted.

ThymeJ

NOTE: the 4 pass I’m talking about is really a CCE VBR multipass 3 pass. The added 4th pass is CCE in pass1 creating the Video Info File.

hanfrunz
24th October 2007, 12:58
Hello thymej,
try a lossless codec like Huffyuv or Lagarith for your avi export. That could speed up the whole process even more, because your harddrive must not deliver the big datarate of uncompressed video. if your drive is very fast it may not work. But it's worth a try.

hanfrunz

thymej
25th October 2007, 00:51
I tried the Huffy lossless and the last step slows down from 3.3 to 2 or less; it may of been just above 1.x, I don't remember. The raw video is the fastest in my testing. I assume it is fastest because there is no need to decompress the video before its processed by the en-coder. My recording and working drive is a SATA formated with 64K clusteres size; so the size of the file does not seem to affect its speed.

ThymeJ