View Full Version : avs2qxvid.bat [AVS to Quality XviD]
henryho_hk
12th February 2007, 15:43
what's wrong in such usage?
Sorry for the typo in the online help. Try:
avs2qxvid_25e.bat COMPTEST-CT 700MB 1:1 PRO zxxxz91.avs
"1:1" is ignored and does not really matter. "PRO" means progressive footage; you can also specify "TFF" or "BFF".
squid_80
13th February 2007, 13:31
FYI I found a bug today in AVSUtil that causes it to incorrectly report the number of frames in AVI files larger than 2GB. I'll try and get another new version uploaded soon.
EDIT: New version is available now, same url as above.
Dams
14th February 2007, 16:32
@squid_80 : for what is used your software named AVSUtil ?
do you have a post on it ?
henryho_hk
14th February 2007, 16:44
AVSUtil is an essential tool for my script. ^_^
Dams
14th February 2007, 17:09
sorry daddy, I didn't see it :helpful:
:o
vanger
15th February 2007, 09:13
Sorry for the typo in the online help. Try:
avs2qxvid_25e.bat COMPTEST-CT 700MB 1:1 PRO zxxxz91.avs
"1:1" is ignored and does not really matter. "PRO" means progressive footage; you can also specify "TFF" or "BFF".
It works, :thanks:
pdanpdan
15th February 2007, 21:32
New AVSUtil (http://members.optusnet.com.au/squid_80/avsutil.zip), as promised. (I can make a build that isn't dependent on the VS2005 runtime library if you like, but it will blow up in size to be 80k instead of 7.5k.)
Hi, with this version of avsutil I get an error stating that there is a configuration problem and cannot be started
vanger
16th February 2007, 06:45
how to make comptest for 2pass encoding and get quality near q=2 ?
a want to get bitrate for max quality (in reasonable limits)
kastiauto
16th February 2007, 12:03
Why preset: MTK-CT xxMB won't do second pass? TGHQ-CT xxMB was OK.
__
Installing that XViD included in this package solved the problem and now 2 pass in MKT is working.
avs2qxvid_25e_full_\xvid_celticdruid\xvid.inf
henryho_hk
17th February 2007, 04:14
how to make comptest for 2pass encoding and get quality near q=2 ?
"Quality near q=2" is vague since you did not mention the matrix. For me, 6of9 or V3UHR at q=3 looks better than H.263 at q=2. (Very) generally speaking, I think TGHQ-90 or TGFAST-90 would be your choice. The trick is to pick the right target size. Since the comp-test result value (not the quantizers!) is in linear with the target bitrate/size, I think you can try this:
1) Pick a target reasonable bitrate, say 1600kbps for 640x480x29.97fps, and do a COMPTEST-CT pass.
2) Assuming that you obtain a comp test result of 42, you can project for the desired target: 1600*95/42 = 3620kbps
3) Do a TGFAST-90 at a target bitrate 3620kbps. It would be quite likely that the average quantizer is around 2 with the 6of9 matrix.
vanger
17th February 2007, 05:34
I'm right, that that comp test result (approximately) is quality in percents?
henryho_hk
17th February 2007, 14:47
Comp test results is approximately the target size divided by the compressed file size (using some specific compression settings). It shows how compressible your source is (i.e., how well your source can be compressed). More compressible means lower quantizers, sharper matrix, etc. can be used. Hence, a high comp test result means higher encode quality _at the right settings_.
cmw
22nd February 2007, 10:45
Hey man, I know that it's intended that your bat favors quality over given filesize, but couldn't you please add an option which will strictly restrain the encoder to output EXACTLY the size that I want? :) That would be really great (like adding something to the enc.txt 700MB FIX or sth). I can't get p0rn done properly for 700MB because all the movement and brightness leads to low compressibility levels ;)
vanger
23rd February 2007, 10:43
MTK-90 priduces oversized files, but with TGHQ-90 there is no problem.
Any ideas for solve this?
henryho_hk
23rd February 2007, 16:10
vanger, try "MTK-CT" and let it pick the level. "COMPTEST-CT" is meant actually for TGHQ and TGFAST only.
henryho_hk
23rd February 2007, 16:32
cmw, try TGFAST-CT or TGHQ-CT.
SealTooGreat
27th February 2007, 03:41
I've switched to AviSynth 2.5.7 - January 7, 2007.
Now,It works great with TGHQ-58 0.2bppx 64:45 PRO!
MediaInfo reports bppx=0.193....It have missed for 0.007:D
henryho_hk
27th February 2007, 11:43
SealTooGreat, try TGFAST-CT or TGHQ-CT and it should be closer to 0.2bppx.
SealTooGreat
28th February 2007, 23:21
I've used TGHQ-CT 0.23bppx 64:45 PRO!
MediaInfo reports bppx=0.230....It have missed for 0.000 :eek: :D :D :D
Quality is GREAT!!!
henryho_hk
1st March 2007, 15:45
What preset was finally chosen by the program? Was it TGHQ-45?
SealTooGreat
1st March 2007, 22:03
It've chosen TGHQ-58.
What should I type in sample.enc.txt for 1pass Q2?
Have you thought of creating small GUI for xvid_encraw?
henryho_hk
2nd March 2007, 06:40
What should I type in sample.enc.txt for 1pass Q2?
To have 1pass Q2, you need to create your own presets by modifying bin\xvid_presets_25e.csv. The exact method is not (and probably won't be) documented properly.
vanger
14th March 2007, 12:07
MTK-CT still produces oversized files :(
The TGFAST-CT is at exact bitrate...
SealTooGreat
14th March 2007, 16:46
AviSynth script:
DGDecode_mpeg2source("E:\Videos\DVDRip TEMP\Superman Returns\VTS_01_1.d2v",cpu=4,info=3)
ColorMatrix(hints=true)
crop( 0, 72, 0, -72)
Tweak(sat=1.38,bright=9,cont=1.1)
fft3dfilter(plane=3, sigma=2)
fft3dfilter(plane=0, sigma=.5, sharpen=.2)
trim(68400,71000)
Used preset MTK-CT 0.21bppx 64:45 PRO. Your batch encoder have chosen MTK-58.
MediaInfo says: 0.155 bppx
Without fft3dfilter in the script. MediaInfo reports: 0.200 bpxx
Kamui-
15th March 2007, 05:57
Good stuff,
I was wondering if it was too much to ask if you could add a few stuff listed below:
Options in xvid_presets:
yes/no packed bitstream
yes/no trellis
% i-frameboost
% I-frame closer than 1 are reduced by
Target bitrate in kb
Target filesize in kb
X many threads
xvid_presets_25e.csv to be in another format, excel for an example or a gui to make it easier to import ur own settings.
henryho_hk
15th March 2007, 06:55
Well, this is really meant to be a non-gui batch mode program. The parsing of xvid_presets_25e.csv is rather simplistic and it is limited to 26 columns (A-Z). Also, only xvid_encraws parameters are available. #threads is determined from %NUMBER_OF_PROCESSORS% and target size/rate can be specified from <name>.enc.txt. As for other options, I need to find a way to accommodate more than 26 parameters.
Yet, I think my immediate task is to decompose the batch file into more manageable pieces.
Jerry_Sm@rt
27th March 2007, 06:43
Hi,henryho_hk
Could u provide any mirrors?or anyone would like to help
I can not access to your link to download the pack.
And the file i download from buzzqw's mirror was broken(using download tools).
henryho_hk
27th March 2007, 12:45
Used preset MTK-CT 0.21bppx 64:45 PRO. Your batch encoder have chosen MTK-58. MediaInfo says: 0.155 bppx
If all the quantizers are at the minimum value already, I think the compressibility test has produced a wrong value and your movie deserves MTK-90. It could happen as that was merely a sampled check, which "happened" to pick up more difficult scenes than the average movie.
buzzqw
27th March 2007, 13:11
@Jerry_Sm@rt
my link is ok... i can download without problem
BHH
SealTooGreat
30th March 2007, 02:49
If all the quantizers are at the minimum value already, I think the compressibility test has produced a wrong value and your movie deserves MTK-90. It could happen as that was merely a sampled check, which "happened" to pick up more difficult scenes than the average movie.
...so it doesn't have nothing with fft3dfilter and its usage?!
boombastic
30th March 2007, 18:58
If i don't create any xxx.enc.txt where xxx.avs is the script to encode i know that the default profile for xvid is used but what determines if mkv or avi is going to be created?I want only and always avi not mkv.....
henryho_hk
31st March 2007, 05:00
MKV is created if there is ogg audio or chapters (.zones.txt).
henryho_hk
31st March 2007, 05:03
...so it doesn't have nothing with fft3dfilter and its usage?!
It does matter. Otherwise your encode will be way more over-sized. Probably you need to apply stronger parameters (sigma=0.5 for luma seems too low).
SealTooGreat
31st March 2007, 21:49
^ Strange.
Without fft3dfilter, I've got 0.20bppx, 0.01 less then it should be (0.21). I can't see any over-size.
With fft3dfilter, I've been getting way less(0.15bppx)...so I don't understand why should I apply stronger denoise parameter as you've suggested.
henryho_hk
3rd April 2007, 02:08
When you use MTK-CT, take a look at the file <filename>.ct.avi in the TMP directory. If the script chooses MTK-58 with and without fft3dfilter, it means the two .ct.avi is of similar size with and without fft3dfilter and it is really an exceptional case. If they are of vastly different size and the script always chooses MTK-58, I have made a calculation error in the script.
Try starting with no TMP directory. If possible, please also note the compressibility test result (a few lines above the chosen preset in the screen output).
boombastic
12th April 2007, 18:27
i always want to keep the original audio file,how can i avodi avs2xvid to encode it to mp3 or ogg?
celtic_druid
13th April 2007, 03:49
I modified it here so that it would take external AC3 audio and simply mux it. That would mean that without modification, it can't do it.
henryho_hk
13th April 2007, 06:53
External AC3/DTS/WAV/etc. file is (long) on my to-do list. I am still trying to figure out the right interleave setting for AVIMux.
celtic_druid
13th April 2007, 07:10
I used
AUDIO INTERLEAVE 4 FR
since that is what is in "Profile - Standalone AVI - AC3.amg"
henryho_hk
14th April 2007, 14:07
Version 2.5f is out:
back to 3% comp test
ac3 muxing
HQMTK presets coarsely hacked from Teegedeck's HQ presets
NEW: Some mistakes found:
1) Please change Line 498 from
if /I not "%SRCAUD:~-4%"==".ogg" (
to
if not "%SRCAUD%"=="" if /I not "%SRCAUD:~-4%"==".ogg" (
2) Please change Line 771 from
set PP1=!PP0! -pass1 "%SRCTMPP%.pass"
to
set PP1=!PP0! %SIZP% -pass1 "%SRCTMPP%.pass"
henryho_hk
15th April 2007, 16:12
Guys & gals, I am thinking of multi-part 2-pass parallel encoding. The idea is as follows:
Run a sampled compressibility test over the whole movie.
The total size of all (non-excluded) compressed frames is Z megabytes, while those for the first half and 2nd half are Z1 and Z2 respectively (Z1+Z2=Z but i believe that Z1<>Z2)
With the overall target size, T megabytes, we determined the preset level, say ">58% Preset".
Kick off 2 jobs, both at ">58% Preset", with the 1st half of the movie targeting T*Z1/Z megabytes and the 2nd half targeting T*Z2/Z megabytes. As the length and the parameters are the same, the 2 jobs should spend similar encoding time and our dual-core CPU can be fully occupied. We can also use CPU affinity tools to specify the cpu core for each job.
Finally, join the two halves together and mux the audio in.
Does it sound like a good idea?
halsboss
19th April 2007, 08:20
Dunno if this helps the OP, but here's draft .VBS scripts to do a few simple things. Sometimes easier to program things than in batch files...
http://forum.doom9.org/showthread.php?p=990992#post990992
Only trying to help.
henryho_hk
20th April 2007, 02:34
Thank you very much for your suggestion. Indeed, it can replace some helper utilities (esp. bc.exe for calculation). I know vbs programming too but I am currently too lazy to replace the old bat codes.
ronnylov
24th April 2007, 14:24
Is it possible to do only a compressibility test with this script (and not doing the final encoding)? I am having problems doing compressibility test with Enc.
henryho_hk
24th April 2007, 16:57
avs2qxvid.bat COMPTEST-CT 700MB 1:1 PRO input.avs
Icemaan
29th April 2007, 16:15
Hallo
Sorry for my English i Know it is not so good . I hope you understand me .
I have test this excellent Tool but i Have some Questions for better understand.
My Test File have a size from 87 Mb and for Test I want to reduce it to 40 Mb
First i have make a Compress Test with this Parameters
Avs2qxvid_25f.bat COMPTEST-CT 40MB 1:1 PRO Video-720.avs
The Result looks Like This
Tot: enctime(ms) =2141.00, length(bytes) = 82066
Avg: enctime(ms) = 71.37, fps = 14.01, length(bytes) = 2735, psnr y = 4
6.36, psnr u = 43.34, psnr v = 44.51
I frames: 2 frames, size = 14857/ 29714, quants = 3 / 3.00 / 3
P frames: 10 frames, size = 3657/ 36574, quants = 3 / 3.00 / 3
B frames: 16 frames, size = 986/ 15778, quants = 4 / 4.00 / 4
Source FPS = 2500000/104271
No. of frames for CT = 16
Size of selected frames = 31065
Target Size in KB = 40960KB
Compressibility Test = 2335
Selected Level = 90
Recommended Preset = TGHQ-90
Then I Encode the Test file with the Parameters
avs2qxvid_25f.bat Video_720.avs
Now my Questions
Did the Commandline avs2qxvid_25f.bat Video_720.avs take the Video_720.enc.txt to encode the File because my Finished Avi is only 8 Mb big.Isthis normaly or what i must make to have one 40mb Avi .
The Source file is a 1920x1080 Hd Evo File
Icemaan
henryho_hk
1st May 2007, 07:58
A 1920x1080 video never get so small unless it lasts for one or two seconds only. Try to watch the encoded clip and see if it shows any error. It you are testing a short clip, try Celtric Druid's 10.03.2007 xvid build (http://tirnanog.fate.jp/mirror/XviD/xvid.cvs.head.MTK.2007.03.10.7z).
henryho_hk
13th May 2007, 06:17
I am thinking of multi-part 2-pass parallel encoding
Preliminary testing is quite good. I am looking forward to version 3 with multi-part encoding. Yet, I have two questions. (1) Should I split the footage according to the number of logical processors (e.g. hyperthread) or the number of true physical core? (2) How to make it more memory friendly? It's about 300MB ram per job in my computer.
Revgen
16th May 2007, 02:12
Why is the "threads" option disabled?
I changed
rem set /a NUMTHRD=%NUMBER_OF_PROCESSORS%
to
set /a NUMTHRD=%NUMBER_OF_PROCESSORS%
and it worked fine for me. FPS was a little higher. Went from 2.49FPS to 3.17FPS for my encode. The video turned out fine.
I'm using 2.5F
Revgen
16th May 2007, 02:17
Guys & gals, I am thinking of multi-part 2-pass parallel encoding. The idea is as follows:
Run a sampled compressibility test over the whole movie.
The total size of all (non-excluded) compressed frames is Z megabytes, while those for the first half and 2nd half are Z1 and Z2 respectively (Z1+Z2=Z but i believe that Z1<>Z2)
With the overall target size, T megabytes, we determined the preset level, say ">58% Preset".
Kick off 2 jobs, both at ">58% Preset", with the 1st half of the movie targeting T*Z1/Z megabytes and the 2nd half targeting T*Z2/Z megabytes. As the length and the parameters are the same, the 2 jobs should spend similar encoding time and our dual-core CPU can be fully occupied. We can also use CPU affinity tools to specify the cpu core for each job.
Finally, join the two halves together and mux the audio in.
Does it sound like a good idea?
Doesn't ELDER do something similar? If you could include the freatures with your program and do what ELDER does, it could be a hit.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.