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 > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th April 2003, 19:03   #1  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Feature Request: ValueHex()

It's supposed to do the opposite of HexValue()

[EDIT] The whole point is to be able to use CALL to export registry keys like this one

Code:
[HKEY_CURRENT_USER\Software\GNU\XviD]
"mode"=dword:00000005
"desired_size"=dword:0000094a
after making calculations for the desired size. Of course I would need to know the 1st pass size, I can get it with Import() and make calculations with a XVID NULL encode and keep the value in a file.

My idea is to use AVS2AVI with this option

-c <4cc> : Use codec having <4cc> with default settings

and change the settings in the registry. This way I could use 65% compressibility on the fly

[/EDIT]

Bilu

Last edited by bilu; 11th April 2003 at 20:38.
bilu is offline   Reply With Quote
Old 11th April 2003, 21:48   #2  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Did you miss something from your post?

An explanation of what you are talking about maybe?

regards
Simon
Si is offline   Reply With Quote
Old 11th April 2003, 22:07   #3  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
Here you go:


function Hex(int n) {
v="0123456789ABCDEF"
tmp=midstr(v, 1+n%16,1)
n=n/16
tmp=midstr(v, 1+n%16,1) + tmp
n=n/16
tmp=midstr(v, 1+n%16,1) + tmp
n=n/16
tmp=midstr(v, 1+n%16,1) + tmp
n=n/16
tmp=midstr(v, 1+n%16,1) + tmp
n=n/16
tmp=midstr(v, 1+n%16,1) + tmp
n=n/16
tmp=midstr(v, 1+n%16,1) + tmp
n=n/16
tmp=midstr(v, 1+n%16,1) + tmp
return tmp
}

[edit]: it's really a script function, not C
WarpEnterprises is offline   Reply With Quote
Old 12th April 2003, 11:23   #4  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
@WarpEnterprises

Thanks, it works
It's very simple and yet it so beautiful


@siwalters

The whole spirit of the thing is to:

1)make first pass

2)using batch file to create a new AVS with 1st pass size as variable, for compressibility calculations ( 1st pass size * 0.65 = 65% compressibility) and convert new size to Hex.
Use CALL to export the value to a batch file and import to registry a key like "desired_size"=dword:0000094a where 0000094a is replaced by the calculated size.

3) Make 2nd pass



Will use AVS2AVI -c xvid file.avs file.avi (encodes with whatever settings the codec has) after changing keys in [HKEY_CURRENT_USER\Software\GNU\XviD] like this:
Code:
1) "mode"=dword:00000003          -> 2-pass, 1st pass

2) "mode"=dword:00000006          -> NULL encode
   "desired_size"=dword:0000094a  -> Calculated size

3) "mode"=dword:00000005          -> 2-pass, 2nd pass
Pass 2) will be used just for calculations, therefore BlankClip and NULL encode will do just fine.

I think it is possible to integrate a 2-pass encode with a given compressibility value within robot4rip


Best regards,
Bilu
bilu is offline   Reply With Quote
Old 12th April 2003, 11:38   #5  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Thanks for explanation.
regards
Simon
Si 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:09.


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