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 > Video Encoding > MPEG-2 Encoding

Reply
 
Thread Tools Display Modes
Old 10th January 2004, 20:10   #1  |  Link
jonny
Registered User
 
jonny's Avatar
 
Join Date: Feb 2002
Location: Italy
Posts: 876
"qcce", utility to automate One Pass VBR starting from an AviSynth file

Current version: 1.02 (27th January 2004)

Download:
http://jonny.leffe.dnsalias.com/qcce/rar/qcce_1_02.rar

Screenshot:
http://jonny.leffe.dnsalias.com/qcce/images/qcce.png

Source code (can be interesting if you are a Perl programmer ^^'):
http://jonny.leffe.dnsalias.com/qcce...ource_pack.rar


The app is tested with:

CCE 2.66.01.07
CCE 2.67.xx.xx (last version checked: CCE 2.67.00.23)

EclCCE 1.7b




You can run:
- Normal encodes (opv only)
- Size prediction
- Q finder (to find the Q needed to hit your target size).


For the Q finder, i use a simple binary search (so there are a lot of rooms for improvement in this direction).

+ you get full save/load settings function, joblist, full save/load joblist functions, you can use custom matrices and (optionally) shutdown at the end.

I've done all this stuff mainly to learn CCE a bit.
It's useful for me, maybe can be useful for someone other...


Cheers
jonny
__________________
home sweet home

Last edited by jonny; 27th January 2004 at 11:42.
jonny is offline   Reply With Quote
Old 12th January 2004, 16:50   #2  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
jonny, this certainly looks like a lot more than a learning exercise! For a first version it is packed with features. Do you plan to continue it and are you open to suggestions?

BTW, people may have been confused when you said "The app works only with CCE SP Trial 2.66.01.07". I think you mean this is what you have tested with? It seems to work fine with higher versions of CCE and ECLCCE in the very limited testing I have done.

Great job!

DD
DDogg is offline   Reply With Quote
Old 12th January 2004, 18:12   #3  |  Link
jonny
Registered User
 
jonny's Avatar
 
Join Date: Feb 2002
Location: Italy
Posts: 876
Quote:
jonny, this certainly looks like a lot more than a learning exercise! For a first version it is packed with features.
hihi, the trick is that i've used a lot of code from my previous apps
Quote:
Do you plan to continue it and are you open to suggestions?
sure!

on my side, things i'd like to add are:

-Conditional encoding (encoding after q finding only if the Q is <= *something*)

-Conditional stopping the joblist:
you fill the joblist with "Q Find" jobs, the 1st with unfiltered source and good matrices, the others using progressively more aggressive filtering and/or matrices, after running all, the process will stop after finding the first combination that give a Q <= *something* (and maybe a jobs-grouping, so the feature can be used with more movies in the same joblist)

-Maybe a resizing pass (i'm still not sure is needed, on my tests with full movies, i've got always undersized by 40-80MB, i'd like to hear experiences from others)

-Optimization of the Q Finding process

-Calculator for the target size

++Other ideas/suggestions i find interesting (so i can learn more ^^)


Quote:
BTW, people may have been confused when you said "The app works only with CCE SP Trial 2.66.01.07". I think you mean this is what you have tested with? It seems to work fine with higher versions of CCE and ECLCCE in the very limited testing I have done.
I've tested it only on 2.66.01.07 (i've preferred to start with the latest nonbeta version)
I use a fixed "ecl template", if the ecl format is the same between 2.66/2.67, it will work (i'll verify this in this week and let you know - anyway i think it will be not a big pain to eventually add 2.67 support)
Atm you can use the menu function: "EclCCE->Save Ecl+Run EclCCE" to verify if all the parameters are set correctly with 2.67.xx.xx


Thanks for the feedback
__________________
home sweet home
jonny is offline   Reply With Quote
Old 13th January 2004, 00:49   #4  |  Link
Amnon82
Paldo-GNU/LinuxMaintainer
 
Amnon82's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 1,580
Jonny great program! I'll upload it now to my page so You have a mirror. If You want, I can translate Your program into german. PM if You want this.

I've the latest Version of CCE 2.67.00.23 and I'll test Your program with it in the next days with full PAL Movies.

I think maybe You can beat Kwag's CQMatic (only for TMGEnc) of KVCD.NET.

Go on with Your proggy.

Amnon82 is offline   Reply With Quote
Old 13th January 2004, 00:57   #5  |  Link
Amnon82
Paldo-GNU/LinuxMaintainer
 
Amnon82's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 1,580
QCCE Mirror in Germany

Here is the mirror: DVDRPAGE.DL.AM

Have Fun

Amnon82 is offline   Reply With Quote
Old 13th January 2004, 01:25   #6  |  Link
jonny
Registered User
 
jonny's Avatar
 
Join Date: Feb 2002
Location: Italy
Posts: 876
many thanks Amnon82

I've done testing on 2.67 and added support for it:

http://jonny.leffe.dnsalias.com/qcce/rar/qcce_1_01.rar
http://jonny.leffe.dnsalias.com/qcce...ource_pack.rar

(only a little change was required, selecting "UFF" in my interface will now result in "Offset Line"=1 when you use CCE 2.67)

To make a summary, i've tested v1.01 with:

2.66.01.07
2.67.00.13
2.67.00.23

(i'll check for compatibility every time a new beta will be out)

EDIT: you was too fast for the mirror
__________________
home sweet home
jonny is offline   Reply With Quote
Old 13th January 2004, 01:56   #7  |  Link
ADLANCAS
Registered User
 
ADLANCAS's Avatar
 
Join Date: Apr 2003
Location: Brazil
Posts: 247
Hi Jonny!
Great job! I was waiting for such tool!

I noted that you use same different settings in CCE:
GOP Sequence= 3;4 (not "3;5")
Luminance level=16 to 255 (not "0 to 255")
Restrict auto I frame insertion selected (not "unselected")
-> ("my settings")

My settings comes from a template of RB. Maybe he can comment about it.

Another thing. Maybe you could make a little change for searching faster a Q (and better?).
In your app., IŽve made a test and it was necessary to encode 4 times to find a Q.
Using the same source, manually, I needed encode only 2 times.

IŽve just encoded something today.
My sample test (including line "SelectRangeEvery(750,15)":
File desired=29.555KB
Q53 -> results 31.172KB -> error=+5,47%
Q57 -> results 29.572KB -> error=+0,06%
Qfinal=56

Encode settings:
Q56 (500-9000kbps)
QC (17)
DC precision (9)
Aspect Ratio 4:3
Progressive frame flag (NO)
Upper field first (NO)
Scanning (alternate)
Frame rate 29.970
Quantization matrices (Standard)

Final:
File size results=1.458.481KB
File size desired=1.477.744KB
Error=-1,3%
-------------------------------
Calculations:
->NextQ=Q+(1,5*Q*(FileSize-DesiredSize)/DesiredSize)
->if Abs(ActualError%)<=2% then, Qfinal=Q-1+LastError%/(LastError%-ActualError%)/2
This is nearly the same what Tylo uses in his plugin. It works very good to me.

Regards,

Alexandre
ADLANCAS is offline   Reply With Quote
Old 13th January 2004, 02:34   #8  |  Link
jonny
Registered User
 
jonny's Avatar
 
Join Date: Feb 2002
Location: Italy
Posts: 876
Hi Alexandre

Quote:
GOP Sequence= 3;4 (not "3;5")
I've got it from the doom9 guides, do you think i should add an option for "3;5" (or maybe are you referring only on size prediction)?

Quote:
Luminance level=16 to 255 (not "0 to 255")
If i'm not wrong it doesn't make difference if the source is YUY2. (i dunno if many people uses AviSynth RGB output, what is your opinion about this)?

Quote:
Restrict auto I frame insertion selected (not "unselected")
I guess you are always referring to size prediction (with a normal encode you should find this option off)
This option seems to reduce the error on the single size prediction, you can find some tests here:
http://forum.doom9.org/showthread.ph...0&pagenumber=3


Quote:
Calculations:
->NextQ=Q+(1,5*Q*(FileSize-DesiredSize)/DesiredSize)
->if Abs(ActualError%)<=2% then, Qfinal=Q-1+LastError%/(LastError%-ActualError%)/2
This is nearly the same what Tylo uses in his plugin. It works very good to me.
yep i've already seen something like this, before starting to write the app (DDogg pointed me to some really interesting resources)
i've preferred to start with something simple (reducing the number of passes for the Q finder it's probably the next thing i'll go to do)


Quote:
Great job! I was waiting for such tool!
I'm happy you like it
__________________
home sweet home
jonny is offline   Reply With Quote
Old 13th January 2004, 03:59   #9  |  Link
ADLANCAS
Registered User
 
ADLANCAS's Avatar
 
Join Date: Apr 2003
Location: Brazil
Posts: 247
Hi,
Quote:
...do you think i should add an option for "3;5"
yes, should be better.

Quote:
i dunno if many people uses AviSynth RGB output, what is your opinion about this)?
I donŽt use. Maybe if someone make a request...

Quote:
Restrict auto I frame insertion selected (not "unselected")
I saw you page. It seems good.
IŽll make some tests with this.

Regards,

Alexandre
ADLANCAS is offline   Reply With Quote
Old 13th January 2004, 07:29   #10  |  Link
Amnon82
Paldo-GNU/LinuxMaintainer
 
Amnon82's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 1,580
Mirror updated

Here is the mirror (new Version 1.01): DVDRPAGE.DL.AM

Have Fun

Amnon82 is offline   Reply With Quote
Old 13th January 2004, 13:01   #11  |  Link
jonny
Registered User
 
jonny's Avatar
 
Join Date: Feb 2002
Location: Italy
Posts: 876
Quote:
I saw you page. It seems good.
IŽll make some tests with this.
I'm really interested on compares with full movies (my tests are done with small clips)
Actually the test was fully generated with my app (the html generator and other options are disabled in the binary release)
If you have ideas on improving the single size prediction let me know, i can compare methods using a lot of automation.

Cheers
jonny
__________________
home sweet home
jonny is offline   Reply With Quote
Old 13th January 2004, 15:34   #12  |  Link
RB
Retired
 
Join Date: Nov 2002
Posts: 1,349
Quote:
Originally posted by jonny
Atm you can use the menu function: "EclCCE->Save Ecl+Run EclCCE" to verify if all the parameters are set correctly with 2.67.xx.xx
Looking through my code, the only difference between the 2.66 and 2.67 ECLs that EclCCE expects is that "top_first" (2.66) is replaced by "offset_line" in 2.67. Additionally, the "Make room for USCC" option (whatever that is, don't know) is recored as "uscc=1/0" in the 2.67 ECL.
RB is offline   Reply With Quote
Old 13th January 2004, 16:43   #13  |  Link
jonny
Registered User
 
jonny's Avatar
 
Join Date: Feb 2002
Location: Italy
Posts: 876
Thanks RB, this confirms that 1.01 works with all the 2.67.xx.xx versions.

I've a little question for you, actually i'm passing to EclCCE an ecl file that contains all the 3 options:

...
top_first=...
offset_line=...
uscc=...
...

so i don't need to make differences between 2.66/2.67
Seems to work nicely (i see no strange effect on both 2.66/2.67), am i doing something wrong?
(i don't know how you handle internally this situation, so i have this little doubt)
__________________
home sweet home
jonny is offline   Reply With Quote
Old 13th January 2004, 17:07   #14  |  Link
RB
Retired
 
Join Date: Nov 2002
Posts: 1,349
You are fine.
RB is offline   Reply With Quote
Old 13th January 2004, 23:17   #15  |  Link
Amnon82
Paldo-GNU/LinuxMaintainer
 
Amnon82's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 1,580
Hi Jonny,

I want only tell you that I test the version 1.01 now with my DRP 2.2 Settings on full movies ... THX for adding all the answers I need in Your app!

I'll tell You if I reached 3.300 GB as I wanted ...

P.S.

Your PM-Mailbox is full...

BTW: How to read Your Log-Files (*.enj)? Do You have a ENJ-Viewer?

Last edited by Amnon82; 14th January 2004 at 00:33.
Amnon82 is offline   Reply With Quote
Old 14th January 2004, 11:24   #16  |  Link
jonny
Registered User
 
jonny's Avatar
 
Join Date: Feb 2002
Location: Italy
Posts: 876
Quote:
THX for adding all the answers I need in Your app!
So i guess you no more need answers about different modes
(i've tryed to document the main stuffs directly in the interface, usually you'll get a popup for every parameter that need to be explained)


Quote:
BTW: How to read Your Log-Files (*.enj)? Do You have a ENJ-Viewer?

"Load job list" or "Append job list" from the joblist menu

Generally you can save 2 kind of files:
"ens" contains settings (basically it's one job)
"enj" contains jobs

Quote:
Your PM-Mailbox is full...
hihi, give me some time to reorganize it
__________________
home sweet home
jonny is offline   Reply With Quote
Old 14th January 2004, 13:13   #17  |  Link
Amnon82
Paldo-GNU/LinuxMaintainer
 
Amnon82's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 1,580
Done with the test and it was fantastic!!!!

here is the result screenshot:



It was amazing! Realy I started Your app with Blue Crush (its a Surfermovie with a lot of water...). I wanted the size 3.450 GB and I got 3.415 GB, it is only 34 MB less as I wanted!!!

How I tested it:

I select the movie, entered my DRP 2.2 Settings with AVAMAT4 and entered 3.450 GB as wanted size. 10% of the movie for calculating and run Q Find without encoding.

After that I entered the final Q 21 and run the encode mode to see the difference of the wanted and getting file.

This app is fantastic and I'll start writting now the guides for it.

Read the PM form me about DRP2.2 ... THX


Guide for the QCCE Program:

Avalon's DRP 2.2 Guide

Last edited by Amnon82; 14th January 2004 at 17:42.
Amnon82 is offline   Reply With Quote
Old 15th January 2004, 10:45   #18  |  Link
jonny
Registered User
 
jonny's Avatar
 
Join Date: Feb 2002
Location: Italy
Posts: 876
Quote:
10% of the movie for calculating and run Q Find without encoding
I think you can go safe with a 2% (on my tests with full movies i've never surpassed this value)
Soon i'll do some tests with full movies to show what kind of error one should expect using different % (something really similar to what i've done for XviD/DivX)
__________________
home sweet home
jonny is offline   Reply With Quote
Old 16th January 2004, 00:01   #19  |  Link
Amnon82
Paldo-GNU/LinuxMaintainer
 
Amnon82's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 1,580
You realy mean 2% of the movie...

...K, let see it.

I run a test with 2% of a movie I've already encoded with Q22.
Let see if QCCE will get this value also with 2%...



As You can see it works also with ONLY 2% of the movie! FANTASTIC!!!
Precition ONLY in 9 min!!!! CQMatic for TMPGEnc take over 30 min to get this!!! GREAT done jonny!

... and thanks for advice ...I change this in my guide

Quote:
Guide
http://rj-elektronik.de/avideo/main.php?set=drp22guide
(many thanks to Avalon for this!!!)
I thank You for the app.

And it is the only reason that I start now learning pear, cos I want this app german

I looked into the PL and I felt home! I translate it and create a DRP-Version with my settings as default

I hope I can compile it...

I've troubles with compiling it. I send you a PM about the 2 errors...

Last edited by Amnon82; 16th January 2004 at 14:58.
Amnon82 is offline   Reply With Quote
Old 17th January 2004, 00:00   #20  |  Link
Amnon82
Paldo-GNU/LinuxMaintainer
 
Amnon82's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 1,580
Bugga!!!

I compiled my edited qcce.de.pl-file somehow and got a exe.
I tried runing it and shot so my system!!!

Jonny I'll send you a PM with the PL-file. Maybe I did something wrong.
If You have time for it take a look into it and try to compile it.
I think I did MANY mistakes editing it...

I got a 2 MB NOT runing file...
... and it shots my system...

Make a GHOST-Backup of C:\ before runing the compiled qcce.de.pl.

THX anyway!
Amnon82 is offline   Reply With Quote
Reply

Thread Tools
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 02:24.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.