View Full Version : quick2pass
DaveEL
23rd March 2002, 10:56
http://www.ecs.soton.ac.uk/del100/quick2pass.zip
Here is a small app to do 2 pass encoding requires todays builds to run.
You currently need to set up an avisynth frame script this will eventually be built in but for the moment just use GordianKnot to do that bit. Just uses the default settings for now ill hack together a gui to allow you to set the options soon.
When you run it it will ask for the AVS then an output Avi and then an output size.
Features that will eventually be added
Xvid Options
Size Calc
Audio Processing
Frame Server Setup like Gordian Knot
DaveEL
DaveEL
23rd March 2002, 13:14
New Version now contains all the xvid options
DaveEL
DaveEL
24th March 2002, 02:23
hmm geocities seems to have disabled my site for using too much bandwidth:) can anyone suggest where else i could put this for download?
DaveEL
AsPiRiN
24th March 2002, 04:04
Originally posted by DaveEL
hmm geocities seems to have disabled my site for using too much bandwidth:) can anyone suggest where else i could put this for download?
DaveEL
try www.hotbox.ru
20mb free space and it is fast!
DaveEL
25th March 2002, 02:42
Ok new version again
New
basic Frame server setup (just crop and resize) still have to do things like deinterlace and smart crop like GordianKnot.
now asks for a D2V file as input instead of an avs.
Loads default settings from the registry so your normal xvid settings will be used.
Bugs Fixed
Should really work this time i missed one of the new variables in the CONFIG struct out yesterday so it probably never worked at all before. need to setup some shorter clips for testing to avoid this only thing i have on my hdd for testing now are all about 2 hours long which means test cycles are rather slow. :)
Still To Do:
Audio Processing.
Finish Frame Server setup
size calc (still trying to find correct values for vbr-mp3 mux overhead)
Suggestions?
Download down till i fix a bug
AsPiRiN
25th March 2002, 03:15
why dont you try to implement ogg??
it is rather better than mp3 and it is growing up!:D
DaveEL
25th March 2002, 04:35
well after an hour and a half of bug hunting turns out the bug is in the library i used to do base64 encoding so i switched to a new one hopefully it should really work this time.
http:\\daveel.hotbox.ru\quick2pass.zip
for vorbis to work properly you ned to use .ogm right? (i got nandub to mux vorbis streams but i lost the audio when i seeked). might have a look i still use mp3 in my encodes and so far not convinced oggenc can beat lame with the right settings but ill take a look (havnt tested vorbis for a while anyway). do any command line tools exist to do the ogm muxing?
DaveEL
AsPiRiN
25th March 2002, 12:10
Originally posted by DaveEL
well after an hour and a half of bug hunting turns out the bug is in the library i used to do base64 encoding so i switched to a new one hopefully it should really work this time.
http:\\daveel.hotbox.ru\quick2pass.zip
for vorbis to work properly you ned to use .ogm right? (i got nandub to mux vorbis streams but i lost the audio when i seeked). might have a look i still use mp3 in my encodes and so far not convinced oggenc can beat lame with the right settings but ill take a look (havnt tested vorbis for a while anyway). do any command line tools exist to do the ogm muxing?
DaveEL
Oggs seems to be very good quality at lower bitrates!
For oggs you need the ogg directshow filter.Mixing oggs with nundub is verry buggy.But a very good gui tool appeared: oggmux0.4
find both at doom9.org
DaveEL
25th March 2002, 14:08
New Release again just fixed the second pass code this time.
broken download down again
DaveEL
Dark-Cracker
25th March 2002, 17:42
Do u think you will add your source code in the next release ? i am interested in the construction of the virtualdub jobs file.
Very nice work.Good luck for your next release.
PS: it seems to me that the mp3 mux overhead is around 24kb/s and vbr-mp3 overhead 40 kb/s.
DaveEL
25th March 2002, 18:36
will release the source once the frame server setup is finished. whole thing writen in delphi so i dont know how much use it will be to you.
DaveEL
ps. Got a version now that seems to work just running a test encode will upload in a few hours if all goes well
Vanos_b
25th March 2002, 21:10
Please do that. There are Delphi coders here.
dado023
25th March 2002, 21:23
hmm geocities seems to have disabled my site for using too much bandwidth can anyone suggest where else i could put this for download?
i can offer hosting.....only 6MB
its free
DaveEL
26th March 2002, 02:42
Ok after much bug hunting and a fix which doesnt appear to make any sense at all but which makes my virtualdub job files the same as the ones that virtualdub generates itsself (Adding AAAA to the base64 encoded data (dont ask me why it works)) i finally have a version that can do encodes properly.
http://www.ecs.soton.ac.uk/~del100/quick2pass.zip
DaveEL
ps no time to update for the next couple of days most likely. please test this so i can work out any problems.
damm always helps if i upload the new build once ive compiled it:) please redownload sorry
Nuro
26th March 2002, 08:59
It'll be cool if you could publish the code
/me loves Delphi
Gerard
ivan_alias
26th March 2002, 09:05
When I run quick2pass.exe I get:
failed to get data for 'use_alt_curve'
The program then loads but I don't get prompted to load the d2v file.
Win 2K SP2
Yes I have xvid installed ;) What else can I tell you that would be useful?
DaveEL
26th March 2002, 13:48
Do you have a current build with the alt curve compression stuff in??
ill fix it so it works without current registry settings next build for the moment you have to have run the normal xvid config dialog at least once to make it fill the registry settings.
DaveEL
ivan_alias
26th March 2002, 14:29
Ahh that might be it. My xvid may have come from 2 days ago. way out of date now!
I'll try it with a later compile this evening.
NoLogo
26th March 2002, 20:54
Ok, maybe this will sound a little rough but:
1) No way to see the top of the video: some dificulties to crop it.
2) The resize do not affect the shown video, and it would be cool to have H and V linked.
3) I guess the size is in kB, but could you precise it ?
4) Maybe some options could be locked when you choose some other ones (e.g. 'Enable auto minimum relative quality' locks 'minimum relative in the codec configuration window, under VDub), so that you're sure about what you do.
5) How can I choose between 1st and 2ns pass ?
6) Where do I put the end credits size ?
7) How does the resize affect the image geometry ? % of deformation would be great.
Well, as you can guess, these are options you can find in GKnot, I don't want to compare your work with this, but I think it would be good to have them too :)
Nevertheless, you're tool is on the way to be a 'usefull' tool :)
EDIT:
An 'Open' button could be usefull too.
DaveEL
26th March 2002, 21:48
[QUOTE]Originally posted by NoLogo
[B]Ok, maybe this will sound a little rough but:
1) No way to see the top of the video: some dificulties to crop it.
Hmm ill take a look at that perhaps when i was moving round stuff in the form i put it in the wrong place.
2) The resize do not affect the shown video, and it would be cool to have H and V linked.
still trying to work out a good way to do that as the AR depends on source type PAL/NTSC and AR and the crop. if anyone has any idea please send me them. in order to do it properly i need to do something like the gordian knot Smart-crop too if someone has algorithms for these please send them.
3) I guess the size is in kB, but could you precise it ?
yeah its in kB will add a little label next to the box next version. gonna redesign that when i put the size calc and audio processing in.
4) Maybe some options could be locked when you choose some other ones (e.g. 'Enable auto minimum relative quality' locks 'minimum relative in the codec configuration window, under VDub), so that you're sure about what you do.
will do doesnt matter what values you put in the parts which are already locked so i left them for now as i had bugs in the job control to fix first.
5) How can I choose between 1st and 2ns pass ?
currently just does both putting in options to only do one is easy so expect it in the next version.
6) Where do I put the end credits size ?
on the last page under the credit start/end is a size box then set credit mode to size.
7) How does the resize affect the image geometry ? % of deformation would be great.
need to code all the stuff for selecting of input AR first
Well, as you can guess, these are options you can find in GKnot, I don't want to compare your work with this, but I think it would be good to have them too :)
all planned to be done GK is the reason im working on this i used Gordian knot until i decided to switch to xvid (now i still use Gordian knot i just feed the output into my program)
Nevertheless, you're tool is on the way to be a 'usefull' tool :)
EDIT:
An 'Open' button could be usefull too.
Once all the options are finish ill start on that kind of stuff
NoLogo
26th March 2002, 21:58
Well, i see that you're working about those points :)
Sorry for the n°6, i didn't see that. Thought it was like in the codec window ;)
Whatever, great job.
Regards
NoLogo
DaveEL
27th March 2002, 16:07
another release
http://www.ecs.soton.ac.uk/~del100/quick2pass.zip
i think you should be able to see all the video this time
if you don't have reg entrys for xvid then i hope it will now work.
resize/crop show AR so you can try to match them.
can select credit start/end can be selected from the currently displayed frame.
forgot to put in the choice of first/second pass which i said i would next version really ill remember this time (i moved in between posting and coding this version and it somehow got lost in the back of my brain same for locking controls which are not useful).
DaveEL
NoLogo
27th March 2002, 16:46
Well, the video's perfect now, i can see the top of it.
The possibility to choose credits frame is a great idea, much easier than using VDub when in codec configuration panel.
The AR is ok too, but i definitely think that a % of deformation would be better (maybe this is harder to code, don't know, not a coder at all...).
There's a 'kB' that appears in the 'Global' window, maybe a little (tiny ?) bug. :)
Else, a 'resize' button could be pretty usefull (e.g. when changing 'Input AR', or resolution).
Everything else is fine :)
Regards
NoLogo
DaveEL
27th March 2002, 17:14
last release was broken had 2 function calls commented out for faster debug cycle but i forgot to put them back in should be fixed now.
deformation next release.
ah i knew id put that "kb" label in but as a moved things round the form i lost it so i just made a new one.:)
DaveEL
NoLogo
27th March 2002, 17:17
Ok, lets wait for next release :)
Keep going that way
Regards
NoLogo
DaveEL
27th March 2002, 17:43
another release http://www.ecs.soton.ac.uk/~del100/quick2pass.zip
added deformation and auto select of best Height based on selected Width
DaveEL
DaveEL
28th March 2002, 19:46
just thought id drop a quick note to say the next version is coming on well. Ive got .ogm muxing working and have better values for pixel aspect ratio.
will probably release tommorow (possibly in the next couple of hours depends if i finish it before i go to the pub).
after that
audio encode (besweet) which should be simple.
and smart crop like gordian knot i tried implementing this as an interative improvement by cropping one extra pixel width or height at a time depending on which corrects the aspect ratio more but unfortunatly this doesnt seem to work. does anyone have a ideas on a good algorithm for this???
after that ill have a code cleanup and then release the source so other people can add features they want to use like deinterlace etc.
DaveEL
DSPguru
28th March 2002, 20:48
Originally posted by DaveEL
audio encode (besweet) which should be simple. let me know if you need any support...
Dg.
DaveEL
29th March 2002, 19:39
new Release again
OggMux support is finished audio should be processed before starting if you have no audio then cancel on the audio select dialog at the end no muxing will be done so you chosen output name will be ignored but the avi with the video in will be written to the directory the program is in called encode.avi.
DaveEL
Nic
29th March 2002, 19:47
Ive been meaning to ask DG for some help for a while....I wonder if a callback routine could be added to BeSweet....
@DaveEl: My sisters at Southampton Uni too :)
Koepi
29th March 2002, 20:21
Nice to see that you did it dave :)
Keep up the good work!
Best regards,
Koepi
DaveEL
30th March 2002, 20:21
One quick question
Once i have the main encoding app finished im gonna work on porting my work on being able to pause (shutdown computer) and resume encodes which i almost finished on divx 3.11 via nandub (it produced working output but i never finished the work on making it rejoint the files at the correct points as you have to overlap the encodes as you cant trust the last frame out of the encoder as its possible it never finished writing to disk) it was however all based on having gordian knot "normalise" the stats file so the stats file was based on the exact output size of the frames. however xvid does much better using the internal curve compression would it be possible to have the codec do the full curve compression and then encode the output based on only a selection of the frames ie feed the encodering a full stats file for the whole thing but only send it the second half of the input video?
DaveEL
DaveEL
1st April 2002, 18:24
Another new version. Teworked some existing code and added a smart crop like option.
Select your minimum crop and then the output width after that press the search button next to the crop options and it will search for crop values which reduce the AR error.
DaveEL
DaveEL
1st April 2002, 20:22
ok i finished a compressability test so thats now included.
Now i believe the video side is almost feature complete can people test this and report any problems or suggestions.
DaveEL
http://www.ecs.soton.ac.uk/~del100/quick2pass.zip
Erbse
8th April 2002, 20:54
thx for this nice tool :)
2 small problems i have:
the buttons to switch between "Main" and "Xvid" are to small (actually a thin line) if quick2pass is not full screen
after pressing "ok" , your prog like two save an ogm file, if i do it not, the prog close at all -> really sucks if you forget an option
what i like to have for next release: a calculater and a "shutdown-option", also profile-option would be nice
btw: What is "AR" ? (about Deformation )
DaveEL
9th April 2002, 19:00
Sounds like the gui is too big to run well in your resolution ill try to cut the size down a bit so it works better. most of the size is the video part but ill see what i can do.
Ill get the cancel option to put you back in the options window.
Calc should be possible in the next version but not as accurate as i would like as i havnt got values for audio muxing overhead. If i put it in aim for a smaller file then you normally would like if your looking for 700mb try 690mb as that should cover the overhead.
AR = aspect ratio.
Deformation = aspect ratio error.
Ill add a shutdown option as soon as i can remeber how to ask WinNT to give me permission to do the shutdown call.
Profiles may be added later but ill rather do things like audio processing and a job queue.
Im off work tommorow so i should have time to make an update with at least some of this stuff but the most important thing im gonna add is support for the latest xvid builds as since interlacing and Motion vector hint files went in it probably doesnt work. That is unless someone knows of some changes to the xvid CONFIG struct which is gonna be soon as if it is im wasting my time updating till thats done.
Ive ordered a new NTSC dvd recently so when that turns up IVTC (and probably interlacing) might turn up soon
BTW i got permission for aquaplaning and thewef to release the code they wrote which i used under the GPL so source will be available soon so you can add any features you want :)
lar1r
9th April 2002, 20:03
I was wondering if you are considering allowing the program to work with avi files?
I capture a lot and use Xvid 2 pass.
Thx
Oh yes, I support lar1r's request!
bb
Ill add a shutdown option as soon as i can remeber how to ask WinNT to give me permission to do the shutdown call.
Here's some crappy code I wrote a long time ago on this:
BOOL GetSecurity(char* lpMachine)
{
TOKEN_PRIVILEGES tkPriv;
HANDLE hToken;
char* lpPrivilege;
BOOL bSuccess = FALSE;
OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken);
if(hToken == INVALID_HANDLE_VALUE)
return bSuccess;
lpPrivilege = (lpMachine) ? SE_REMOTE_SHUTDOWN_NAME : SE_SHUTDOWN_NAME;
if( !LookupPrivilegeValue(lpMachine, lpPrivilege, &tkPriv.Privileges->Luid) ) {
CloseHandle(hToken);
return bSuccess;
}
tkPriv.PrivilegeCount = 1;
tkPriv.Privileges->Attributes = SE_PRIVILEGE_ENABLED;
AdjustTokenPrivileges(hToken, FALSE, &tkPriv, 0, NULL, NULL);
if(GetLastError() == ERROR_SUCCESS)
bSuccess = TRUE;
CloseHandle(hToken);
return bSuccess;
}
Im off work tommorow so i should have time to make an update with at least some of this stuff but the most important thing im gonna add is support for the latest xvid builds as since interlacing and Motion vector hint files went in it probably doesnt work. That is unless someone knows of some changes to the xvid CONFIG struct which is gonna be soon as if it is im wasting my time updating till thats done.
I hadn't planned anything, though Foxer might be adding 2 new CBR parameters soon.
-h
Erbse
10th April 2002, 09:13
sounds very good to me :)
Sounds like the gui is too big to run well in your resolution ill try to cut the size down a bit so it works better. most of the size is the video part but ill see what i can do.
i work in a Resolution 1024x768 @ 16 bit
rui
10th April 2002, 10:30
Just wanted to say that it has problems with the latest xvid codec that can be downloaded in uManiacs site.
The config tab has some stuff moved around, so that could be the reason.
By the way, this latest codec version has, in the alt curve tab, 3 new options: Max bitrate, Max overflow improvement% and Max overflow degradation %.
The first one is obvious, but the other two i am not certain.
Edit: Stupid me:rolleyes: I forgot that one just has to hover the mouse above the options to get a small explanation
DaveEL
11th April 2002, 21:59
Just realised how much coursework i have on at the moment before i go back to uni so probably no updates for the next weekish unless i get really bored and cant concentrate on the work. Ill try to find the time to put together the source for the last version so anyone who is interested can add things in my absence and ill collect any changes together when i get back. As ive had no time to clean up or comment the code id prefer not to upload the code for everone this time so please private message/email/post here if you want a copy.
DaveEL
DaveEL
13th April 2002, 21:50
Originally posted by DaveEL
Just realised how much coursework i have on at the moment before i go back to uni so probably no updates for the next weekish unless i get really bored and cant concentrate on the work. Ill try to find the time to put together the source for the last version so anyone who is interested can add things in my absence and ill collect any changes together when i get back. As ive had no time to clean up or comment the code id prefer not to upload the code for everone this time so please private message/email/post here if you want a copy.
DaveEL
Ok so i got bored and am currently testing my latest build which assuming no problems ill release tommorow
new in the next release
1) Basic audio processing (besweet based, Select an ac3 and you can transcode it to 2chan ogg (ABR only) more options/formats will be added later) only options currently are delay, bitrate, resample to 44.1 and normalize more to be added later.
2) Size calc (inaccurate as previously noted).
3) Support for new builds, its being based on the current instant build as of about an hour ago hopefully no changes to the config struct will happen soon but ill probably include a binary for xvid with the package which is the build its been tested with.
4) (possibly not done yet) squeeze the form down a bit so i works when running in lower res.
Ill take a look at doing avi and mpeg1 files soon, its gonna mean a bit of reorganisation internally so it wont happen quickly. Private message/email me if it doesnt happen in the next 3-4 weeks cos i will probably have forgotten or possibly have too much uni work but if you bug me enough ill get it done eventually. Not sure how ill do audio processing from avi but im sure ill work something out.
Avi output with less audio format options (AC3/MP3 only) is also a feature that ill do eventually gonna have to do that to get mp3 working in ogm files anyway as the directshow mpeg1 splitter doesnt work properly anyway.
@-h thanx for the example code ill integrate it when i get back to uni and my development machine is connected to the 'net again.
DaveEL
15th April 2002, 09:13
ok new release bit later then i expected but i had a couple of bugs to fix before i could release.
I had problems with vorbis abr mode so ive switched to using quality mode.
i didnt include a build with the zip as it was too big to fit on a floppy to transfer between my development machine and this one but it has been tested with instant build 13.04.2002.1640.
@rui can you test that the new layout works properly on your screen if not can you take a screen shot and e-mail it to me.
DaveEL
(http:\\www.ecs.soton.ac.uk\~del100\quick2pass.zip)
DaveEL
15th April 2002, 09:28
hmm just looked at the cvs change log and it looks like the config struct has changed again ill try to get another build out asap.
DaveEL
rui
15th April 2002, 09:35
Humm, it seems that you will have to create almost dailly builds :D
By the way, i am having some trouble downloading your file.
Only when using Getright (?), i could have a non corrupt file.
But i am in my work, and behind a firewall, so that maybe the cause.
But thanks for your efforts. :)
Erbse
15th April 2002, 09:38
no problems downloading at all - opera 6.02 behind Kerio Firewall
(edit) but quick2pass.exe crash with message "no win32 program"
but the others tools (oggmux,virtualdub) works , i uses winrar 2.90
rui
15th April 2002, 09:45
Well, it crashed with me too. It gives me a message saying that an error with kernel32 ocurred. Win95B here :(
DaveEL
15th April 2002, 09:51
updated supporting build 15/4/02 0800
http://www.ecs.soton.ac.uk/~del100/quick2pass.zip
daily builds is just something i have to put up with working with xvid but its also the reason i work with xvid the quality is good and getting better fast due to the speed of development. anyway as you can tell by the speed of this update supporting new builds doesnt take long it when i add other features like the audio processing that takes a while as i have to spend time testing all the other features incase i introduce bugs.
problems with d/l could be when i originally posted i had not finished uploading the file (stupid 56k modem) try again now to get the new build. by the time you tried getright i probably finished the upload and so it downloaded fine.
DaveEL
DaveEL
15th April 2002, 09:53
Originally posted by rui
Well, it crashed with me too. It gives me a message saying that an error with kernel32 ocurred. Win95B here :(
at what point does it crash?? on startup or when trying to run jobs?
and does it still happen with the new build i just put up
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.