Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 ASP

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th March 2003, 16:55   #1  |  Link
mezzanine
Registered User
 
mezzanine's Avatar
 
Join Date: Jun 2002
Posts: 186
2-pass and convolution3D

I've created a simple GUI for personal use that uses DVD Decrypter, DVD2AVI, BeSweet, VobSub, AVISynth2.5, avs2avi and AviMux to create XViD/DivX backups with a single click (kinda like autoDUB but more simple).
I mostly do my backups using low resolutions (560, 512) to fit in 1 CD, using convolution3D set to MovieHQ and bicubic resize functions. If i don't apply convolution3d filter on the first pass but only on the second what do you reckon will be the result ?? I'm trying to gain some speed without any quality loss.

mezzanine is offline   Reply With Quote
Old 8th March 2003, 17:15   #2  |  Link
Sigmatador
Guest
 
Posts: n/a
with different filter between the both pass, the stats file is "invalid". A undersized video file is the risk...

Last edited by Sigmatador; 9th March 2003 at 15:33.
  Reply With Quote
Old 8th March 2003, 19:56   #3  |  Link
FreQi
Registered User
 
FreQi's Avatar
 
Join Date: Dec 2001
Posts: 234
I've been able to save a decent chunk of encode time on my p3 600 by using a "transitional" encode. It requires more drive space, temporarily, but in the end, it's usually worth it. What I am basically doing is a 3 pass encode, but since the first pass does all the work, and the second and third passes only encode the XviD, it's a lot faster than you'd think.

First, make your avs like normal, with the Trim()s, *Resize()s, IVTC'ing, filters and whatnot. I'll call this "trans.avs". Open the avs in VirtualDub, set audio to "No Audio", but then instead of setting up your video compression to XviD, use Huffyuv (it's a lossless codec usually used for tv captures). Then "Save Segmented AVI" as something like "transitional.avi". These segmented avi's are what I call the transitional encode, because it's only purpose is to make the transition from your capture/rip sources to your XviD.

Note: If you're not familiar with huffuyv, you might be surprised at the size of the files it makes. A video that's 512x384, 23,976fps with no audio will fit somewhere between 5 and 10minuets into 2 gig.

Now, you'll want to do your bitrate calculating while you have this avs open (you should have your audio all ready to go). Once you know your target file size, you'll want to create another .avs (I'll call it compress.avs). For now it doesn't matter what video it loads, it just has to see something so we can set up the job. (I actually make the avs with just Version() in it). Then you set up the XviD compression settings for the first and second passes like you normally do, and save them to the joblist.

Important: Once you have the xvid jobs in queue, you must change this compress.avs script to load your anticipated segmented avi's from the transitional encode. It's just a single line like SegmentedAVISource("transitional.avi").

When you go to your VirtualDub joblist, you should have three jobs. The first is the trans.avs which is where all your filtering and such happens, and it'll create your transitional.00.avi, transitional.01.avi, etc. The second job will be your xvid first pass on compress.avs, which actually just loads your transitional.##.avi's. And the third job is your second pass.

You should be able to hit start and be all set. The first pass (transitional encode) will take about as long normal, but the second and third will be significantly faster. For example, my p3 600 does the first pass at about 3 or 4fps. But the 2nd and 3rd hits as high as 15fps. A 22min show that used to take 5 hours (2.5h/pass) is done in about 3.5 hours using this method. The only step that remains is to mux the audio.

It's a little extra setup, but an hour and a half saved is an hour and a half put into the next show... Let me know if you have questions or if I didn't explain clearly.
FreQi is offline   Reply With Quote
Old 8th March 2003, 21:02   #4  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Quote:
Originally posted by FreQi
Let me know if you have questions
Yeah...
I'm going to encode a 3 1/2 hours movie @ 704*400 - could you lend me your HD, please? I'm a little short with free space ...



[couldn't resist]
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 8th March 2003, 21:05   #5  |  Link
Mel Maconoo
Registered User
 
Join Date: Jun 2002
Location: dallas..
Posts: 27
you beat me to it.. i was gonna ask to borrow his HD.. Half Past Dead seems like it wants 13 gigs so i abort'd let me start burning to see how this comes out..

But i do have one question.. Why would you want to make it bigger when your really tryin' to compress it.? What i mean is the dvd is maybe 4 gigs and your makin' it at least 3x's bigger.. how is this suppose to help.? just curious..

Last edited by Mel Maconoo; 8th March 2003 at 21:09.
Mel Maconoo is offline   Reply With Quote
Old 8th March 2003, 23:33   #6  |  Link
SirElvis
Registered User
 
Join Date: Sep 2002
Location: Germany, Augsburg
Posts: 58
Quote:
Originally posted by Mel Maconoo
But i do have one question.. Why would you want to make it bigger when your really tryin' to compress it.? What i mean is the dvd is maybe 4 gigs and your makin' it at least 3x's bigger.. how is this suppose to help.? just curious..
If I understood FreQi correctly... he is not making the file bigger...

He's just using an intermediate file. If you are using filters in your avs (like Telecide/Decimate or Convolution3d) these filters need time to work on every frame of the video... and since you're compressing every frame twice (once for pass 1, once for pass 2)... the filters do the same work twice... for every frame.

If you use a intermediate file and apply the filters only for the step mpeg -> intermediate you are doing the filter work only once, because, for the 2 XviD passes you are using the already filtered file as source.

If you are using AviSynth 2.5 and are working in YV12 it would probably be better to use Marc FD's VBLE, which works in YV12.
SirElvis is offline   Reply With Quote
Old 9th March 2003, 01:42   #7  |  Link
Mel Maconoo
Registered User
 
Join Date: Jun 2002
Location: dallas..
Posts: 27
thx now i understand..
Mel Maconoo is offline   Reply With Quote
Old 9th March 2003, 10:47   #8  |  Link
FreQi
Registered User
 
FreQi's Avatar
 
Join Date: Dec 2001
Posts: 234
Yeah, what SirElvis said ;] The whole point is to eliminate the need for running the video through filters more than once. I use Huffyuv because it is lossless, so in theory, there is no degradation of image quality. For example, if you were to use MJPEG to make the transitional (or intermediate) encode, the very nature of mjpeg would alter the image. Huffyuv doesn't, but as a trade off it requires bunches of drive space, until you do the xvid and you can delete it all.

And for those wanting my drive, I've got 2 80gigers in there, and I am constantly fighting the good fight to free the "space" from the evil tyranny of the Bits. I'll need to trade up to some of those 250gig maxtors one day.
FreQi is offline   Reply With Quote
Old 9th March 2003, 16:02   #9  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Since Huffyuv doesn't use Yv12 it might be a good idea to test Marc FDs vble video codec (lossless and Yv12), see:
http://forum.doom9.org/showthread.ph...0&pagenumber=5

Combined with avisynth 2.5 this should also be a bit faster.

Cu Selur
Selur is offline   Reply With Quote
Old 10th March 2003, 13:56   #10  |  Link
geoffwa
Level 3 Pirate
 
Join Date: Mar 2002
Posts: 45
Exactly how much space do the HuffYUV encodes typically take up?
geoffwa is offline   Reply With Quote
Old 10th March 2003, 14:08   #11  |  Link
SirElvis
Registered User
 
Join Date: Sep 2002
Location: Germany, Augsburg
Posts: 58
PAL Version of 'Austin Powers - Goldmember' with 135974 frames takes up 13,7 GB with Marc FD's VBLE codec.
SirElvis is offline   Reply With Quote
Old 10th March 2003, 16:34   #12  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Trying to understand - what is the point ?

Try previewing an AVS script in a player like Zoom Player.
Then check Video Renderer on DShow filters.

On fast machines / scripts that can render at full-speed, I don't think there would be a performance gain by adding an intermediate pass.

But on slow machines / scripts that render at 8fps and less, it may be a must.

But maybe slow machines don't have that much disk space at all.


Best regards,
Bilu
bilu is offline   Reply With Quote
Old 11th March 2003, 02:28   #13  |  Link
unmei
frying subs
 
unmei's Avatar
 
Join Date: Jan 2003
Location: ch-2500
Posts: 891
how big huffYUV is ?
well only do anime/cg encoding, mostly 512xHHH, sometimes 640xHHH and i typically get 3000kbyte/s (being around 24mbit/s) with 2Dcleaner/convolution3D vdub filters, thus larrgely around 10GB per hour.
edit : its 25fps, 90000 frames/hour
__________________
-nyo

Last edited by unmei; 11th March 2003 at 02:30.
unmei is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:54.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.