VirtualDub Saving Takes Ages

Bollocks
Deranged Baboon
Joined: Wed Nov 13, 2013 12:01 pm
Org Profile

VirtualDub Saving Takes Ages

Post by Bollocks » Fri Dec 27, 2013 7:52 am

I'd basically just like to know if it's normal for virtualdub to take so long to save a file as an avi. When I aborted my previous attempt, the estimated time it would have taken to finish was 12 hours and counting, and the file size was 2GB (For 5 minutes of video, that definitely doesn't seem right). Is this normal, or has something gone horribly wrong here?

Just to note, the laptop I'm using has a 2.3GHz (Turbo to 2.9) processor, so I'm aware that the laptop may just be not up to the task. Also, fast recompress is selected in virtualdub, if that makes a difference.
"Never fall for a tennis player. Love means nothing to them"

User avatar
l33tmeatwad
Joined: Wed Feb 16, 2005 3:22 pm
Location: Christiansburg, VA
Contact:
Org Profile

Re: VirtualDub Saving Takes Ages

Post by l33tmeatwad » Fri Dec 27, 2013 10:15 am

In terms of speed it really depends on what filters you are using to clean up your footage. As for the size, depending on the resolution that does sound about right for lossless video.
Software & Guides: AMVpack | AMV 101 | AviSynth 101 | VapourSynth 101
PixelBlended Studios: Website | Twitter | YouTube

Bollocks
Deranged Baboon
Joined: Wed Nov 13, 2013 12:01 pm
Org Profile

Re: VirtualDub Saving Takes Ages

Post by Bollocks » Fri Dec 27, 2013 10:27 am

I'm using a fair few filters (IVTC, Sharpening, deringing, deinterlacing, resizing and some more basic ones). Is that normal speed for a file using those filters?
"Never fall for a tennis player. Love means nothing to them"

User avatar
l33tmeatwad
Joined: Wed Feb 16, 2005 3:22 pm
Location: Christiansburg, VA
Contact:
Org Profile

Re: VirtualDub Saving Takes Ages

Post by l33tmeatwad » Fri Dec 27, 2013 10:28 am

Unless you post your script it's really hard to say.
Software & Guides: AMVpack | AMV 101 | AviSynth 101 | VapourSynth 101
PixelBlended Studios: Website | Twitter | YouTube

Bollocks
Deranged Baboon
Joined: Wed Nov 13, 2013 12:01 pm
Org Profile

Re: VirtualDub Saving Takes Ages

Post by Bollocks » Fri Dec 27, 2013 10:36 am

Script is here.

mpeg2source("C:\Users\Thomas Bullock\Videos\Anime Episodes\Gunslinger Girl\GG 1-4.d2v")
tfm()
tdecimate(mode=1)
daa().daa()
Lanczos4Resize(848, 480)
Crop(6, 10,-2,-8)
FastLineDarkenMod()
LSFMod(Strength=200)
TTempSmooth()
gradfun2dbmod(thr=4,str=0,mask=false)
TDeint(Mode=1)
UnDot()

Looking at it again, I may have gone overboard on the sharpening. However, I couldn't seem to make a difference at lower settings. I'm sure I've probably just made some horrible and embarrassing mistake somewhere. I seem to do that quite regularly ...
"Never fall for a tennis player. Love means nothing to them"

User avatar
l33tmeatwad
Joined: Wed Feb 16, 2005 3:22 pm
Location: Christiansburg, VA
Contact:
Org Profile

Re: VirtualDub Saving Takes Ages

Post by l33tmeatwad » Fri Dec 27, 2013 11:56 am

Considering the age of the gunslinger girl DVD, it should not look bad enough to require most of those filters (like undot)...but I could be wrong. Seeing that list I can tell why it's so slow, that is not a "basic" set of filters and it will run slow with all of those.
Software & Guides: AMVpack | AMV 101 | AviSynth 101 | VapourSynth 101
PixelBlended Studios: Website | Twitter | YouTube

Bollocks
Deranged Baboon
Joined: Wed Nov 13, 2013 12:01 pm
Org Profile

Re: VirtualDub Saving Takes Ages

Post by Bollocks » Fri Dec 27, 2013 12:35 pm

I made a few changes, does this look more sensible?

mpeg2source("C:\Users\Thomas Bullock\Videos\Anime Episodes\Gunslinger Girl\GG 1-4.d2v")
tfm()
tdecimate(mode=1)
daa().daa()
Lanczos4Resize(1920, 1080)
Crop(6, 10,-2,-8)
LSFMod(Strength=200)
gradfun2dbmod(thr=4,str=0,mask=false)
TDeint(Mode=1)

Thanks for the help so far
"Never fall for a tennis player. Love means nothing to them"

Bollocks
Deranged Baboon
Joined: Wed Nov 13, 2013 12:01 pm
Org Profile

Re: VirtualDub Saving Takes Ages

Post by Bollocks » Fri Dec 27, 2013 3:20 pm

Still about the same speed with that script. I think it may just be that it can't go any faster on the laptop :(
"Never fall for a tennis player. Love means nothing to them"

User avatar
Qyot27
Surreptitious fluffy bunny
Joined: Fri Aug 30, 2002 12:08 pm
Status: Creepin' between the bullfrogs
Location: St. Pete, FL
Contact:
Org Profile

Re: VirtualDub Saving Takes Ages

Post by Qyot27 » Sat Dec 28, 2013 9:40 am

A few things:

If you want to use TDeint to catch any remaining combed frames, it needs to be done immediately after using TFM, not at the end of the script:

Code: Select all

MPEG2Source("input.d2v")
TFM(order=-1, mode=5, PP=1, field=-1, slow=2)
TDeint(mode=2, mtnmode=3, blim=100, clip2=last) # 'last' being the value of the previous filter
TDecimate(mode=1)
You may also want to pass the d2v parameter to TFM:

Code: Select all

TFM(d2v="input.d2v",all_the_other_options)
Crop before resizing, or make sure to resize to a standard size after doing a resize->crop. Whether you want to compensate for the slight aspect ratio distortion is up to you, but a part of the problem may be that you're operating some of those filters with a frame size that's not a mod value that they're optimized for. You were trying to work with an 840x462 frame. Ick. For that matter, with the second script, if it's been resized to 1920x1080, the Crop values taken from the 848x480 script are going to be wrong when applied to that larger frame.

The gradfun filters have long been superseded by flash3kyuu_deband (aka f3kdb) and Dithertools. My personal preference is f3kdb, but either one of them should work fine. They also have the fringe bonus of being able to dither up to 16bits so you can do more 'native'* high bit depth encoding in x264 than just handing x264-10bit an 8-bit source (provided you're using a patched build of x264 that lets you set the --input-depth).

*even if artificially-produced


Finally, this is an aside, but I generally go for clip editing rather than converting an entire block of episodes (also because I'm rather strapped for hard drive space). This can be done in an efficient way if you plan things out ahead of time:
  • In addition to your regular HQ script with all of the filtering and slow options, prepare an 'LQ' script that's reduced down to only those filters that affect frame position - IVTC and Deint, basically. You don't want to do any cropping or other filtering, since this is going to be more or less throwaway. If you prefer, you can resize to a smaller resolution using BilinearResize() - use Bilinear, because it's the fast and produces a soft, acceptable image that's easy to compress.
  • Convert the LQ script's output to MJPEG using a bitrate where it still looks okay. For 432x240, 900-1500 kbps is acceptable. For 848x480, you'll probably want to raise it to 2500-3000 or so.
  • Track through the MJPEG copy in VirtualDub and write down frame ranges you want to use.
  • When you're finished, create a bunch of small scripts that consist of only two things: an Import() line which references your HQ script(s), and a line that uses Trim() to isolate the clip itself.
  • You can actually just edit with these trim scripts if you want (if your NLE accepts AviSynth scripts as input, anyway), but it may cause issues with running out of memory or general instability. So you may want to use VirtualDub to convert these small scripts to clips using your lossless codec of choice and edit with those instead.
Command line-savvy users can automate two big parts of the above process easily: generating the Import/Trim scripts can be very easily batched, and converting the trim scripts to lossless can be done with a one line for-loop that invokes ffmpeg to do the conversion.

You can of course use a variant of this if you still want to edit with full episodes instead of clips: all you have to do is edit with the MJPEG copies, and then swap them out for the HQ scripts at the end (this is the traditional interpretation of the 'Bait-and-Switch' method described in the AVTech guides).
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog

Bollocks
Deranged Baboon
Joined: Wed Nov 13, 2013 12:01 pm
Org Profile

Re: VirtualDub Saving Takes Ages

Post by Bollocks » Sat Dec 28, 2013 5:15 pm

Thanks very much for all that advice! I'll try it out as soon as I can, but it sounds a lot better then what I was previously doing!

Just out of interest, would it also work just to remove everything but the frame-affecting filters, use trim() to isolate the part I want, and then add the other filters before saving as an avi, without the MJPEG process? Your method seems more efficient, but I'm just interested to know, as it's the method I first considered when you suggested clipping in VirtualDub. Thanks once again for the advice.
"Never fall for a tennis player. Love means nothing to them"

Locked

Return to “Video & Audio Help”