Log in

View Full Version : 1 pass VBR


Gannjunior
9th May 2008, 09:31
Hi,

i'm doing a test between different types of HD camcorder compression. (intra compression and long gop mpeg2 and avc..)

HCenc is perfect since i have a big parameters tuning and its encoding gives me the best PSNR and SSIM compared to others encoders like TMPGenc etc...

My problem is that HCenc has only 2pass encoding and Qbased encoding. Off course are both the best (to hit quality and most of all the exact size in 2pass and to hit best quality by Q-based mode...).
But I need, for my test, a 1 pass VBR mode too; to best simulate camcorder working (since 2pass or Q mode are too much favourable). CCE would have it, but it doesn't work with HD resolution...(i know there is CCE HD but i can't find any demo version)...

any advice?

thanks!

ciao!

Irakli
9th May 2008, 12:58
Hi!

QuEnc has an option you're interested in.

Best wishes,
Irakli

MrC
9th May 2008, 13:02
The big problem is to determine the constant Q factor for HCenc.

If you are able to do some programming with Visual Studio, I can send you the library (dll) I use to determine Q factor for HCenc in AVStoDVD.

This is the function the dll exposes:

Public Function CQ_Factor_HCenc(AVS_PathName As String, HCenc_PathName As String, Target_FileSize_MB As String, Optional Start_CQ As String, Optional Perc_Analysis As String, Optional TempPath As String, Optional MaxBitRate As String, Optional WideScreen_Flag As Boolean, Optional Interlaced_Flag As Boolean, Optional DC_Prec As String, Optional Close_GOP As Boolean, Optional Matrix As String, Optional MaxTrials As Integer, Optional DeleteTemp As Boolean) As String

You have simply to pass:
- AviSynth script
- HCenc pathname
- Target output filesize
everything else is optional.

The dll launches HCenc and make some cycles to calculate Q factor. The dll outputs that Q factor as string.

Let me know

Ciao

:)

Bye

Gannjunior
9th May 2008, 19:25
Hi guys !!

Irakli, yes i saw it but it gave me some problems about to hit the exact size i wanted (infact its maximum bitrate is able to manage is only 25mbit...)...i did some attempts but i got tired...

Mrc, i'm a bad expert of VS...
however...since i'm testing short clip, i can decuce the average Q to use in Qbased doing first a 2pass encoding to hit the exact size i want...
But in this way i would not hit my goal. The Qbased encoding would be a too much favourable path to maximize the average quality...and it is exactly what camcorders don't do. They use a 1 pass VBR, that is not the same thing as Q-based...

ciao!!

45tripp
12th May 2008, 01:20
well a few posts down is the GetCQ thread,
outdated tool,
but workable still.
if you want something to do q estimations for a single pass,
that is.

for single pass,
try one of the libavcodec cli encoders

video_magic
12th May 2008, 11:13
I am an amateur - I do this digitasl-video encoding as a hobby and I read and try to learn.

I'm confused by this MPEG-2 VBR question - doesn't it need 2-pass for VBR analysis by design? :stupid: I mean I know You can capture to MPEG-2 by throwing high-bitrate at it with good results, but for VBR (surely for efficiency) I am educated that it is designed for 2-pass end-of-story???

Thanks for any enlightenment :thanks:

MrC
13th May 2008, 08:05
@video_magic

A VBR 1-pass encoded MPEG2 stream can be obtained using a constant quantization (CQ) factor.

When you encode VBR n-pass, all passes but "n" are used to calculate the Q factor for each frame. Then the real encoding is done during the "n" pass.

Surely other Doom9 guys could be more accurate than me ;P

;)

Bye