Log in

View Full Version : enc Produces VirtualDub Error (unknown switch log)


mozzle
18th June 2008, 21:00
[SOLVED]


Hello.

I'm having a problem trying to do a compressibility check using enc.

Here's the procedure that produces the error:

1) Open enc and enter path to VirtualDub
2) Enter path to test.avs
3) Select "Compressibility Test"; 5%; Normal Method
4) Configure XviD using single pass method explained in the XviD presets thread under ("How do I choose the correct preset?") http://forum.doom9.org/showthread.php?t=119399
5) Enter target bitrate of 1250 kbps
6) Click "New Job" to enter job into the jobs list
7) Click "Start all Jobs"

After a pause, VirtualDub launches but immediately stops and displays the following error: "Command line error: unknown switch log"

I have searched both this forum and found one post referencing the same problem but the user apparently solved it on his/her own and didn't bother to explain how(?!?)

Version Info:
enc v1.03
VirtualDub 1.7.8.0 (build 28346)
Xvid-1.1.3-27042008 _Final Release_

Here's my AVS script:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools2\mt_masktools-26.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avs")
Import("C:\Program Files\AviSynth 2.5\plugins\Soothe.avs")
DGDecode_mpeg2source("C:\Documents and Settings\tb\Desktop\TESTS\dvdtest.d2v",info=3)
ColorMatrix(hints=true)
crop( 2, 60, -2, -64)
Lanczos4Resize(704,288,0,0.5)
dull = last
sharp = dull.LimitedSharpenFaster( ss_x=1.25, ss_y=1.25, strength=60, overshoot=1 )
Soothe( sharp, dull, 20 )


I hope that's enough info and that somebody out there has some insight into this.

Thanks for taking the time.

System Info:
OS: WinXP Pro SP2
CPU: Intel Core Duo T7300 2GHz
Memory: 2GB RAM
Graphics: NVIDIA Quadro NVS 135M

dat720
19th June 2008, 01:00
It sounds like enc is send a commandline switch to virtualdub that it doesn't like.....

Does enc have a reccomended virtualdub version?

Does your avs playback in something like WMP???

mozzle
19th June 2008, 01:15
Duh.

I was pointing enc to VirtualDub. The enc post states:

"Needs VirtualDub for working (the latest VirtualDubMod version is strictly required if you are going to use size prediction or compressibility test)."

So, I pointed it to VirtualDubMod and it works just like it should.

Onward and upward...

:stupid:

dat720
19th June 2008, 13:00
It's amazing how many problems are solved by reading the manual (no offence) :)

mozzle
19th June 2008, 20:19
None taken.

What's sad is I actually did read the instructions. However, I failed to finish the sentence about VDub. (Gotta remember to finish my sentences!)

Anyway, thanks for your initial post. It prompted me to go back to the enc post where I discovered I needed VDubMod.

Ranguvar
19th June 2008, 20:38
Side note, I strongly advise not using the presets - they limit the quantizers excessively, really hindering the overall quality of the video.

mozzle
20th June 2008, 02:17
@Ranguvar:

I take it your referring to the XviD Presets in MeGUI. I'm interested to know more about why I should avoid them. I am doing some test encodes in MeGUI using the XviD '>90% comp. check' (HQ) preset (the only change I made is turning off Qpel for compatibility reasons.)

I noticed you mentioned the same thing in another thread but you didn't offer any specific alternatives. If you have the time, would you mind suggesting a method for improving upon the MeGUI XviD presets? I'm new to this and am still very much in the beginnings of experimenting/learning but I've done a lot of reading and I have to admit being a bit confused as to why the Quantizer Restrictions for the 90% Xvid preset are 2,3,2,4,2,4 when most of what I've read recommends 2,31,2,31,2,31.

I would love to hear some alternative suggestions.

Cheers!

Ranguvar
20th June 2008, 03:31
The presets are basically a way to hit a specific filesize. They do this by limiting the ratecontrol so that it can only choose certain quantizers. Now, this is obviously inefficient. For example, if you have a very simple (to encode) frame, you want it to be given a high quantizer. However, with the quantizers limited as in the profiles, Xvid can only choose a quant of 3 for an I-frame, or 4 for a P or B-frame. This wastes bits that could be used later, on more complex frames. The ratecontrol's job is to decide when to use which quants. It's generally better to let it do its job and make intelligent decisions, rather than tightly restrict it.

First read this thread if you haven't done so yet: http://forum.doom9.org/showthread.php?t=92046

If you're getting undersizing, that means Xvid is doing something very close to a CQ 2 encode (assuming quants are restricted to 2 minimum); it's giving very low quantizers to everything, but the video is just too simple/short to hit your requested filesize. There's a few options. You could let Xvid use quant 1 frames, but this would really just bulk up the video, you won't gain any subjective quality most likely. Better ideas are to increase the resolution, use a custom quantizer matrix that retains more detail, use a higher bitrate for your audio if there is any, lower the B-frame offset and/or ratio values, or if worst comes to worst, slightly increase the 2nd pass Overflow treatment values. But this last option is inefficient, like using quant 1 frames.

If you're getting oversizing, try basically the opposite of everything listed above. Except for the Overflow treatment; increase that just like you would for undersizing.

And remember, as annoying as it is (I seem to be following the same path as you), the best solution is always to experiment :)
Find a good source, make a few encodes, and compare. AvsP is a very sweet tool for this purpose. Make a few AviSynth scripts with a simple AviSource on each test, open them up in AvsP tabs, choose a frame, and flick between them with the mouse wheel or keyboard numbers.

Good luck!

mozzle
20th June 2008, 19:25
@Ranguvar:

Thank you so much for that info. It actually makes sense to me! I am now experimenting with my own Xvid settings in MeGUI and giving the quantizers more freedom to do whatever they need to do. I've had some decent results with some simple tests with 2,31,2,31,2,31 Quantizer Restrictions and the 6of9-HVS matrix. Interestingly enough, the file size is very close to the 90% HQQ preset. Most of what I've read seems to recommend using MSP=6 and VHQ=4 so I'm using that instead of MSP=4/VHQ=3 outlined in the preset; not sure how much of a difference that makes.

I am having a problem with the general noise that seems to be inherent in the MPEG encoding process; I'm currently fiddling with denoisers but I suppose that's a whole different topic...not to mention a whole different story in terms of encoding time!

I have just recently discovered AvsP :) and already consider it an absolutely indispensable tool. Comparing scripts has really helped me learn about filters.

Thanks again for the post! Appreciate you taking the time.