digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Bitrates: CQMatic/CalcuMatic (http://www.digitalfaq.com/archives/encode/4595-bitrates-cqmatic-calcumatic.html)

tigger 07-27-2003 09:15 AM

trying now with the newest version of TMPG, but if i see that the cq is the same , i cancel.
with rc2 , i have the feeling that i had to set the cq value manually down .
f.ex, prediction is 74, i´d use then 72, or 71 sth like that, then it would be (perhaps) fitting all the way :)
lets see, going on testing ;)

J-Wo 07-27-2003 09:31 AM

I've been using the latest tmpgenc but come to think of it before I was using 2.513 when I was getting accurate cqmatic predictions. Just noticed that kwag put a note that cqmatic is not accurate for avi files... I'm taking the same approach as you for testing, if I get the same CQ I know it's not accurate. Right now I'm going back to beta 4 and from the start of things, it's going down in CQ! It'd be interesting to prove whether some of the earlier betas were actually more accurate for avis or not.

tigger 07-27-2003 09:32 AM

i´m not using avis, i have dvd as sources well....

now im testing rc3 again, with NEWEST tmpg version, and other settings , lets see later...

tigger 07-27-2003 09:39 AM

cancelled test, cq pretty the same...

another test now, taking a cq of 77,31 , with that the video stream was 727mb , so a little big, will take now 74,31, lets see results later
bye

kwag 07-27-2003 10:44 AM

Quote:

Originally Posted by nicksteel
Quote:

Originally Posted by kwag
Quote:

Originally Posted by tigger
hi!

i´d like to know, those who got fine results with cqmatic, what do you take for MIN and MAX bitrates ?

thx ;)

bye

MIN = (0.57 * Average Bitrate)
MAX = 2,000Kbs

-kwag

Same MIN/MAX for KDVD?

MIN yes. MAX no. For KDVDs, leave the MAX as they are set.

-kwag

tigger 07-27-2003 01:00 PM

i just don´t know further :(

i can use EVERY setting for max and min bitrate, butt the vs is always gettin 20mb-30mb too big :((

could any1 up the beta6? with that i had the most success

bigggt 07-27-2003 01:38 PM

JUst my opinion about the newest tmpge 2.520 ,can't say for sure (not enough tests) but so far even with tok the video seems to be too much.When using tmpge 2.58 if anything the video would be too small.I did a test with the newest cqmatic and got a cq of 81 and got a video size of about 798mb just video,and with tok the cq was almost identical but got a video size of about 776 just video.(the sources were avi's).I am going to run the same avs through tok with tmpge 2.58 and see what happens

kwag 07-27-2003 01:43 PM

Hi tigger,

These is my setup, just in case there are some differences to what you are using:

TMPGEnc Plus version 2.520.54.163
AviSynth 2.52 Build July 17, 2003 [12:46:12]
All my tests we using the MA script, as is, and also without any scripts at all. Just reading the .d2v directly with TMPEG.

Here is a project file, which you may copy and load in TMPEG. Then change the relevant settings for your project, and save the project again:

Code:

object TMPEGEncodeJobFile
 Job.MPEG.Text = 'CQMatic'
  Job.MPEG.WizardCategoryName = ''
  Job.MPEG.WizardSubFormatName = ''
  Job.MPEG.WizardCaption = ''
  Job.MPEG.WizardDescription = ''
  Job.MPEG.WizardTargetMedia = MPEGConfig_TargetMediaType_Unknown
  Job.MPEG.WizardAutoCalcVideoBitRate = False
  Job.MPEG.WizardAutoChooseList.EnableVideoSize = False
  Job.MPEG.WizardAutoChooseList.VideoSize = <>
  Job.MPEG.WizardAutoChooseList.EnableVideoGOP = False
  Job.MPEG.WizardAutoChooseList.VideoGOP = <>
  Job.MPEG.OutputStreamType = MPEG_OutputStreamType_VideoOnly
  Job.MPEG.OutputStreamType_ReadOnly = False
  Job.MPEG.Video.StreamType = MPEGVideoEncoder_StreamType_MPEG1
  Job.MPEG.Video.StreamType_ReadOnly = False
  Job.MPEG.Video.Width = 528
  Job.MPEG.Video.Width_ReadOnly = False
  Job.MPEG.Video.Height = 480
  Job.MPEG.Video.Height_ReadOnly = False
  Job.MPEG.Video.YUVFormat = 1
  Job.MPEG.Video.YUVFormat_ReadOnly = False
  Job.MPEG.Video.DC_prec = 0
  Job.MPEG.Video.DC_prec_ReadOnly = False
  Job.MPEG.Video.VideoEncodeMode = MPEGVideoEncoder_VideoEncodeMode_Progressive_32Pulldown
  Job.MPEG.Video.VideoEncodeMode_ReadOnly = False
  Job.MPEG.Video.FrameRate = 1
  Job.MPEG.Video.FrameRate_ReadOnly = False
  Job.MPEG.Video.AspectRatio = 1
  Job.MPEG.Video.AspectRatio_ReadOnly = False
  Job.MPEG.Video.RateControlMode = MPEGVideoEncoder_RateControlMode_CQ
  Job.MPEG.Video.RateControlMode_ReadOnly = False
  Job.MPEG.Video.MaxBitRate = 0
  Job.MPEG.Video.MaxBitRate_ReadOnly = False
  Job.MPEG.Video.MinBitRate = 0
  Job.MPEG.Video.MinBitRate_ReadOnly = False
  Job.MPEG.Video.MinAvgBitRate = 0
  Job.MPEG.Video.MinAvgBitRate_ReadOnly = False
  Job.MPEG.Video.CBR_BitRate = 1150000
  Job.MPEG.Video.VBR_MultipassVBRAlgorithm = MPEGVideoEncoder_MultipassVBRAlgorithm_MultipassCQ
  Job.MPEG.Video.VBR_AvgBitRate = 1150000
  Job.MPEG.Video.VBR_MaxBitRate = 3000000
  Job.MPEG.Video.VBR_MinBitRate = 300000
  Job.MPEG.Video.VBR_MaxPassCount = 2
  Job.MPEG.Video.VBR_Quality_P = 0
  Job.MPEG.Video.VBR_Quality_B = 20
  Job.MPEG.Video.VBR_EnablePadding = False
  Job.MPEG.Video.MVBR_MaxBitRate = 3000000
  Job.MPEG.Video.MVBR_MinBitRate = 0
  Job.MPEG.Video.MVBR_Quality_P = 0
  Job.MPEG.Video.MVBR_Quality_B = 20
  Job.MPEG.Video.MVBR_EnablePadding = False
  Job.MPEG.Video.AVBR_Quality = 60
  Job.MPEG.Video.AVBR_MaxBitRate = 2000000
  Job.MPEG.Video.AVBR_MinBitRate = 502170
  Job.MPEG.Video.AVBR_EnablePadding = True
  Job.MPEG.Video.CQ_Quality = 70
  Job.MPEG.Video.CQ_Quality_P = 0
  Job.MPEG.Video.CQ_Quality_B = 20
  Job.MPEG.Video.CQ_MaxBitRate = 2000000
  Job.MPEG.Video.CQ_MinBitRate = 706800
  Job.MPEG.Video.CQ_EnablePadding = True
  Job.MPEG.Video.VBVBufferSize = 40960
  Job.MPEG.Video.VBVBufferSize_ReadOnly = False
  Job.MPEG.Video.GOP_SeqHeaderInterval = 1
  Job.MPEG.Video.GOP_SeqHeaderInterval_ReadOnly = False
  Job.MPEG.Video.GOP_I_FrameCount = 1
  Job.MPEG.Video.GOP_I_FrameCount_ReadOnly = False
  Job.MPEG.Video.GOP_P_FrameCount = 5823
  Job.MPEG.Video.GOP_P_FrameCount_ReadOnly = False
  Job.MPEG.Video.GOP_B_FrameCount = 2
  Job.MPEG.Video.GOP_B_FrameCount_ReadOnly = False
  Job.MPEG.Video.GOP_BitStreamForEdit = False
  Job.MPEG.Video.GOP_BitStreamForEdit_ReadOnly = False
  Job.MPEG.Video.GOP_MaxFrameCount = 24
  Job.MPEG.Video.GOP_MaxFrameCount_ReadOnly = False
  Job.MPEG.Video.QuantizeMatrix_Intra_ReadOnly = False
  Job.MPEG.Video.QuantizeMatrix_NonIntra_ReadOnly = False
  Job.MPEG.Video.Profile = 4
  Job.MPEG.Video.Profile_ReadOnly = False
  Job.MPEG.Video.Level = 8
  Job.MPEG.Video.Level_ReadOnly = False
  Job.MPEG.Video.VideoFormat = 2
  Job.MPEG.Video.VideoFormat_ReadOnly = False
  Job.MPEG.Video.DisplayWidth = 0
  Job.MPEG.Video.DisplayWidth_ReadOnly = False
  Job.MPEG.Video.DisplayHeight = 0
  Job.MPEG.Video.DisplayHeight_ReadOnly = False
  Job.MPEG.Video.MotionSearchSpeed = MPEGVideoEncoder_MotionSearchSpeed_MotionEstimate
  Job.MPEG.Video.MotionSearch_AlwaysHalfPel = True
  Job.MPEG.Video.UseFloatDCT = True
  Job.MPEG.Video.QuantizeMode = False
  Job.MPEG.Video.QuantizeModeVal_Intra = 35
  Job.MPEG.Video.QuantizeModeVal_NonIntra = 35
  Job.MPEG.Video.YUVBasicYCbCr = False
  Job.MPEG.Video.QuantizeMatrix_Intra = {
    08090C161A1B1D22090A0E1A1B1D22250C0E121B1D222526161A1B1F24252628
    1A1B1D24272628301B1D22252628303A1D22252628303A4522252628303A454F}
  Job.MPEG.Video.QuantizeMatrix_NonIntra = {
    10121416181A1C1E121416181A1C1E201416181A1C1E202216181A1E20202224
    181A1C20222224261A1C1E20222426281C1E202224262A2A1E20222426282A2C}
  Job.MPEG.Audio.StreamType = MPEGAudioEncoder_StreamType_MPEG1_Layer2
  Job.MPEG.Audio.StreamType_ReadOnly = False
  Job.MPEG.Audio.SamplingFrequency = 44100
  Job.MPEG.Audio.SamplingFrequency_ReadOnly = False
  Job.MPEG.Audio.ChannelMode = 0
  Job.MPEG.Audio.ChannelMode_ReadOnly = False
  Job.MPEG.Audio.CantUseMono = False
  Job.MPEG.Audio.BitRate = 128000
  Job.MPEG.Audio.BitRate_ReadOnly = False
  Job.MPEG.Audio.CalcCRC = False
  Job.MPEG.Audio.CalcCRC_ReadOnly = False
  Job.MPEG.Audio.OriginalFlag = False
  Job.MPEG.Audio.OriginalFlag_ReadOnly = False
  Job.MPEG.Audio.CopyrightFlag = False
  Job.MPEG.Audio.CopyrightFlag_ReadOnly = False
  Job.MPEG.Audio.PrivateFlag = False
  Job.MPEG.Audio.PrivateFlag_ReadOnly = False
  Job.MPEG.Audio.EmphasisType = 0
  Job.MPEG.Audio.EmphasisType_ReadOnly = False
  Job.MPEG.System.StreamType = MPEGSystemEncoder_StreamType_MPEG1
  Job.MPEG.System.StreamType_ReadOnly = False
  Job.MPEG.System.EnableCommentText = False
  Job.MPEG.System.CommentText = ''
  Job.SourceList = <
    item
      Video.SourceFileName = 'K:\your_avs_script.avs'
      Video.SourceRange.Enabled = False
      Video.SourceRange.StartTime = 0
      Video.SourceRange.EndTime = -1
      Video.SourceRange.SubRangeList = <>
      Video.SourceRange.LastSourceFileName = 'K:\your_avs_script.avs'
      Video.InterlaceImage = False
      Video.TopFieldFirst = False
      Video.AspectRatio = 1
      Video.ImageArrange.ArrangeType = MPEGVideoConfig_ImageArrangeType_FullScreen
      Video.ImageArrange.Width = 320
      Video.ImageArrange.Height = 240
      Video.ImageArrange.FillColor = 0
      Video.EnableNoiseReduction = False
      Video.NoiseReduction = 20
      Video.NoiseReductionRange = 1
      Video.NoiseReduction3D = 20
      Video.NoiseReduction3DHiCQ = False
      Video.EnableEdgePower = False
      Video.EdgePowerX = 0
      Video.EdgePowerY = 0
      Video.EdgePowerField = False
      Video.EnableDeinterlace = False
      Video.Deinterlace = VideoFilter_Deinterlace_None
      Video.DeinterlaceEx.Enabled = False
      Video.DeinterlaceEx.FrameRate1 = 4
      Video.DeinterlaceEx.FrameRate2 = 5
      Video.DeinterlaceEx.AutoProcess = False
      Video.DeinterlaceEx.AutoType = MPEGEncodeJob_Source_Video_DeinterlaceEx_AutoType_24fps_NonInterlace
      Video.DeinterlaceEx.AutoDeinterlaceType = MPEGEncodeJob_Source_Video_DeinterlaceEx_Auto_Deinterlace_Force
      Video.DeinterlaceEx.AutoForceDeinterlaceType = VideoFilter_Deinterlace_None
      Video.DeinterlaceEx.AutoDeinterlaceThreshold = 600
      Video.DeinterlaceEx.List = {0600000000000000}
      Video.DeinterlaceEx.Cache = {}
      Video.Clipping.Enabled = False
      Video.Clipping.Left = 0
      Video.Clipping.Right = 0
      Video.Clipping.Top = 0
      Video.Clipping.Bottom = 0
      Video.Clipping.LeftMask = False
      Video.Clipping.RightMask = False
      Video.Clipping.TopMask = False
      Video.Clipping.BottomMask = False
      Video.EnableGhostReduction = False
      Video.GhostReduction = <>
      Video.ColorCorrection.Enabled = False
      Video.ColorCorrection.Brightness = 0
      Video.ColorCorrection.Contrast = 0
      Video.ColorCorrection.Gamma = 0
      Video.ColorCorrection.RedContrast = 0
      Video.ColorCorrection.BlueContrast = 0
      Video.ColorCorrection.EnableCustom = False
      Video.ColorCorrection.Customs = <>
      Video.EnableForceIPict = False
      Video.ForceIPict = <>
      Video.AutoForceIPict = True
      Video.AutoForceIPict_NewGroupMode = False
      Video.Enable32Pulldown = False
      Video.NoConvertFrameRate = False
      Audio.SourceFileName = ''
      Audio.SourceRange.Enabled = False
      Audio.SourceRange.StartTime = 0
      Audio.SourceRange.EndTime = -0.958333408060705
      Audio.SourceRange.SubRangeList = <>
      Audio.SourceRange.LastSourceFileName = ''
      Audio.Effect.Enabled = False
      Audio.Effect.EnableVolume = False
      Audio.Effect.Volume = 1
      Audio.Effect.EnableFadeIn = False
      Audio.Effect.FadeInTime = 500
      Audio.Effect.EnableFadeOut = False
      Audio.Effect.FadeOutTime = 500
    end>
  Job.OutputFileName = 'f:\temp\your_outputfile_goes_here.m1v'
  Job.OutputFileType = MPEGEncodeJob_OutputFileType_MPEG
  Job.OutputConfig_AVI.OutputFileName = ''
  Job.OutputConfig_AVI.EnableVideo = False
  Job.OutputConfig_AVI.VideoCodecHandler = 0
  Job.OutputConfig_AVI.VideoKeyFrameRate = 0
  Job.OutputConfig_AVI.VideoDataRate = 0
  Job.OutputConfig_AVI.VideoQuality = 0
  Job.OutputConfig_AVI.VideoEnableForceKeyFrame = False
  Job.OutputConfig_AVI.VideoEnableForceCopyFrame = False
  Job.OutputConfig_AVI.EnableAudio = False
  Job.OutputConfig_AVI.InterleaveFrames = 0
  Job.OutputConfig_AVI.VideoCodecConfig = {00000000}
  Job.OutputConfig_AVI.AudioFormat = {00000000}
  Job.OutputConfig_Wave.OutputFileName = ''
  Job.OutputConfig_Wave.Format = {00000000}
  Job.OutputConfig_Graphic.OutputType = MPEGEncodeJob_OutputGraphicConfig_OutputType_BMP
  Job.OutputConfig_Graphic.OutputFileName = ''
  Job.OutputConfig_Graphic.JPEGCompressionQuality = 80
end


So far, AVIs are predicted incorrectly. I posted a note at the top of this thread, related to that. All my tests have been with DVD sources.
Apparently, it has to do with the way prediction samples the source, so I believe it's a CODEC issue. Right now, I'm strictly working on .d2v (mpeg) sources, so I can tune precision to the max. Then I'll proceed to figure out why the strange behaviour with AVI sources.

-kwag

mistermickster 07-28-2003 03:13 AM

Does anybody have any answers to my previous post?

Quote:

Originally Posted by mistermickster
Do I need Avisynth to produce a 'script' to be able to use CQMatic? Or can I get by with just a bitrate calculator? (I do have MovieStacker).

I have read that TMPGEnc produces better results using CQ than with VBR, so am very interested in using some prediction method to determine the best CQ to use.

Thnx in advance. :)

@kwag
Will there be a user guide out soon?

kwag 07-28-2003 03:21 AM

Quote:

Originally Posted by mistermickster
Does anybody have any answers to my previous post?

Quote:

Originally Posted by mistermickster
Do I need Avisynth to produce a 'script' to be able to use CQMatic? Or can I get by with just a bitrate calculator? (I do have MovieStacker).


Hi mistermickster,

I didn't see your post 8O
You don't need avisynth. As a matter of fact, you can even use TMPEG directly on your source, but you won't gain the advantage of using avisynth's filters :)
You can use any bitrate calculator.
Quote:


I have read that TMPGEnc produces better results using CQ than with VBR, so am very interested in using some prediction method to determine the best CQ to use.

Thnx in advance. :)
You bet it does :D
Quote:


@kwag
Will there be a user guide out soon?
There is one already :!:
Look on "Avalon's" signature.

-kwag

kwag 07-28-2003 03:22 AM

Quote:

Originally Posted by mistermickster
Does anybody have any answers to my previous post?

Quote:

Originally Posted by mistermickster
Do I need Avisynth to produce a 'script' to be able to use CQMatic? Or can I get by with just a bitrate calculator? (I do have MovieStacker).


Hi mistermickster,

I didn't see your post 8O
You don't need avisynth. As a matter of fact, you can even use TMPEG directly on your source, but you won't gain the advantage of using avisynth's filters :)
You can use any bitrate calculator.
Quote:


I have read that TMPGEnc produces better results using CQ than with VBR, so am very interested in using some prediction method to determine the best CQ to use.

Thnx in advance. :)
You bet it does :D
Quote:


@kwag
Will there be a user guide out soon?
There is one already :!:
Look on "Avalon's" signature, or here: http://www.kvcd.net/forum/viewtopic.php?t=5188

-kwag

kwag 07-28-2003 04:51 AM

RC-4 is up :!:

As usual, link and change log here:
http://www.kvcd.net/forum/viewtopic.php?t=5145

-kwag

black prince 07-28-2003 07:17 AM

@Kwag,

As promised, here's my results of "Green Mile":

Movie .................... Green Mile
Length in Time ....... 191 min 55 sec ( 3 hours 11 min 55 sec)
Template ............... 352x240 ULBR KVCD
Average bitrate ...... 508 (MovieStacker)
Min ....................... (508 x 0.57) ~ 290 (Tmpgenc)
Max ...................... 1150 (Tmpgenc)
Audio size ............. 64 kbps (~90mb) (MovieStacker)
Video target size .... 709 mb (MovieStacker)
CD ....................... 1 80minute
CQMatic ................ version 1.0 RC-3
CQ ....................... 79 (CQMatic)

CQMatic log:

Quote:

http://www.kvcd.net
CQMatic Version 1.0 RC-3
Copyright Softronex Corporation, 2003.
All rights reserved.
Time: 16:49:58 Date: 07/27/2003
Ready!
Project: E:\DVD Backup\1 - DVD2KVCD\4 - Tmpgenc\NewScrip25.tpr

Creating: CQMatic.tpr

D:\Temp\NewScrip25.m1v
Execute.
Movie Time: 192
Average Bitrate: 508
Prediction Only mode
Executing Prediction Phase...
Using CQ of 60.00
Process started at 16:50:25
On 07/27/2003
Encoder started...
Process time: 17.93 minutes.
Encoder end.
File size difference = 1.334863
Last CQ = 60.000000
Current CQ = 70.045883
CQ difference = 10.045883
Using CQ of 70.05
Encoder started...
Process time: 18.02 minutes.
Encoder end.
File size difference = 1.200788
Last CQ = 70.045883
Current CQ = 75.068825
CQ difference = 5.022942
Using CQ of 75.07
Encoder started...
Process time: 18.02 minutes.
Encoder end.
File size difference = 1.037318
Last CQ = 75.068825
Current CQ = 77.870224
CQ difference = 2.801399
Using CQ of 77.87
Encoder started...
Process time: 17.98 minutes.
Encoder end.
File size difference = 1.023837
Last CQ = 77.870224
Current CQ = 79.726425
CQ difference = 1.856201
Using CQ of 79.73
Encoder started...
Process time: 18.03 minutes.
Encoder end.
File size difference = 0.930279
Last CQ = 79.726425
Current CQ = 78.798325
CQ difference = 0.928101
Using CQ of 78.80
Encoder started...
Process time: 18.02 minutes.
Encoder end.
File size difference = 1.005153
Last CQ = 78.798325
Current CQ = 79.204384
CQ difference = 0.406059
Using CQ of 79.20
Encoder started...
Process time: 17.98 minutes.
Encoder end.
File size difference = 0.969340
Last CQ = 79.204384
Current CQ = 79.001358
CQ difference = 0.203026
CQMatic complete!
Total minutes of process: 125.98
Process ended at 18:56:24
On 07/27/2003
Results:

Final Video filesize ........... 694mb
Final Audio filesize ........... 90mb
Total A/V ........................ 784mb

Comments:

This was really a test for filesize prediction accuracy which is only 16mb
under the prediction. That's very accurate :D The video took ~9 hours
to encode with credits included. It's looks great on a small screen and
only during action scenes is there light blocks and Gibbs effect is very
reduced. The only drawback was the lengthly time (2 hr 6 minutes)
it took for CQMatic to get the final CQ. I feel confident that CQMatic
will give me a good filesize prediction if the source is DVD. :wink:

-bp

mistermickster 07-28-2003 07:45 AM

Quote:

Originally Posted by kwag
You don't need avisynth. As a matter of fact, you can even use TMPEG directly on your source, but you won't gain the advantage of using avisynth's filters :)

But I'll need to install Avisynth to make use of the filters, right?

@kwag

Does CQMatic make it's prediction on the whole movie or just a short sample?

Would SVCD still give a better result over VCD when using CQ encoding?

Cheers

Nobody 07-28-2003 07:48 AM

Hi Kwag,

CQmatic seems so easy to use :D

I did have a question in why is the min/max values so important in determining final CQ and file size accuracy? It could of been posted previously - though fell behind in reading the posts the last couple of days (couldn't get on KVCD.net -- what up with that Comcast :? )

Anyway, using RC-1

Kanagaroo Jack
352x480 Cq=66
min=400
max=2500
file encode size was right on :P

Now I tried encoding the same movie at 480x480 (can't encode at full KVCD-3 resolution .... DVD player limited)

CQ=57.5
min=.57*average(=630)
max= 2000
file size +13M (too big)

CQ=57.5
min=300
max= 2500
file size -12M (too small)

CQ=57.5
min=400
max= 2500
file size -7M (too small - actually perfect once I burn it on 1 CDR)

It's almost like this min/max is the fine adjustment for a specific resolution. Why the variance in file size by changing the min/max setting?

Now to read more posts

Thanks

kwag 07-28-2003 01:45 PM

Quote:

Originally Posted by mistermickster
Quote:

Originally Posted by kwag
You don't need avisynth. As a matter of fact, you can even use TMPEG directly on your source, but you won't gain the advantage of using avisynth's filters :)

But I'll need to install Avisynth to make use of the filters, right?

If you want to use filters, yes you do.
Quote:


@kwag

Does CQMatic make it's prediction on the whole movie or just a short sample?
It samples 6 frames every second 15 seconds, for every minute of the complete movie.
Quote:


Would SVCD still give a better result over VCD when using CQ encoding?
With TMPEG, CQ is the best encoding mode for resolutions above 352x240(288).
For 352x resolutions, CQ_VBR provides better results.
In both cases, it applies to both MPEG-1 and MPEG-2

-kwag

kwag 07-28-2003 01:58 PM

Quote:

Originally Posted by black prince
ng action scenes is there light blocks and Gibbs effect is very
reduced. The only drawback was the lengthly time (2 hr 6 minutes)
it took for CQMatic to get the final CQ. I feel confident that CQMatic
will give me a good filesize prediction if the source is DVD. :wink:

-bp

Hey thanks bp :)
The problem is that CQ between ~75 to 90 is not linear. That's why it took so long. Same applies for CQ between 1 to ~50.
So the best range will always be wneg CQ is between ~50 to ~75
If TMPEG's CQ was linear, it would only take one prediction encode :D
I'll see what happens when I add support for CCE and MCE :cool:

-kwag

kwag 07-28-2003 02:10 PM

Quote:

Originally Posted by ChuckM
I did have a question in why is the min/max values so important in determining final CQ and file size accuracy? It could of been posted previously - though fell behind in reading the posts the last couple of days

Hi Chuck,

It has to do with the dynamic range in TMPEG. If average bitrate is exactly centered between MIN and MAX, that's excelent for the encoder. In our case, we usually are encoding with a very low average, closer to MIN than to MAX. This throws off the dynamic range of the encoder :)
Quote:


Anyway, using RC-1

Kanagaroo Jack
352x480 Cq=66
min=400
max=2500
file encode size was right on :P

Now I tried encoding the same movie at 480x480 (can't encode at full KVCD-3 resolution .... DVD player limited)

CQ=57.5
min=.57*average(=630)
max= 2000
file size +13M (too big)
That's within range :)
Quote:


CQ=57.5
min=300
max= 2500
file size -12M (too small)[/quote
Not at all :!: It's also within specs :)
Quote:


CQ=57.5
min=400
max= 2500
file size -7M (too small - actually perfect once I burn it on 1 CDR)
Perfect again :D
Quote:


It's almost like this min/max is the fine adjustment for a specific resolution. Why the variance in file size by changing the min/max setting?
If you target for 2 CDs, where your average will be far above than for a single, you'll probably get almost perfect accuracy ;)

-kwag

black prince 07-28-2003 04:00 PM

@Kwag,

Kwag wrote:
Quote:

Hey thanks bp
The problem is that CQ between ~75 to 90 is not linear. That's why it took so long. Same applies for CQ between 1 to ~50.
So the best range will always be wneg CQ is between ~50 to ~75
If TMPEG's CQ was linear, it would only take one prediction encode
I'll see what happens when I add support for CCE and MCE
-kwag
Should I start Tmpgenc with CQ=55 or 50 to take advantage of this???
Can't wait for the CCE option. Finding the Q value determines filesize.
The lower the Q, the higher the quality and filesize. For MPEG-2, CCE has
the speed and is quality wise the same or better than Tmpgenc :)

-bp

kwag 07-28-2003 05:22 PM

Quote:

Originally Posted by black prince

Should I start Tmpgenc with CQ=55 or 50 to take advantage of this???
Can't wait for the CCE option. Finding the Q value determines filesize.
The lower the Q, the higher the quality and filesize. For MPEG-2, CCE has
the speed and is quality wise the same or better than Tmpgenc :)

-bp

Yep. For long movies, set your CQ to a low value. For short movies, set it to high values.
You can even just do this: Set CQ=0 for long movies, and set it to 100 for short movies. CQMatic will adjust the starting CQ (or CQ_VBR) for you automatically ;)

-kwag

Nobody 07-28-2003 05:49 PM

Hi Kwag,

Another question, if you got a moment

Quote:

It has to do with the dynamic range in TMPEG. If average bitrate is exactly centered between MIN and MAX, that's excelent for the encoder. In our case, we usually are encoding with a very low average, closer to MIN than to MAX. This throws off the dynamic range of the encoder
If my average bit rate is 1100, for example wouldn't having Min=300 Max=2000, be "centered" better within the encoder's dynamic range than using Min=1100*.57=627, Max=2000?

It just seems (at least to my limited understanding) having the option of being able to encode at a lower bitrate can only help with regards to compression/quality.

Am I over simplifying this :?

Thanks again

kwag 07-28-2003 06:00 PM

Hi Chuck,

If your average is that high, then you don't need the (0.57 * average), because as you said, your average is already equidistant from MIN and MAX :D
The formula is best used when using average bitrates around ~900 and below, because it "pushes" the CQ curve up because of the higher calculated MIN bitrate.
I still prefer a MAX of 2,000Kbps when using the MA script because I get higher accuracy on prediction ( narrower Min, Max width )

-kwag

Nobody 07-28-2003 06:21 PM

I get it now :cluebat:

Thanks again

- now to out what I learned :D

kinggee 07-29-2003 12:53 AM

i can't seem to get CQMatic RC4 to work :?
tmpgenc just flashes a couple of times for a second and the log says cq is above watermark using cq of 90 8O

RC3 seems to be working fine for me, just wandering if there is a setting i have to change for RC4 :roll:

kwag 07-29-2003 12:57 AM

Quote:

Originally Posted by kinggee
i can't seem to get CQMatic RC4 to work :?
tmpgenc just flashes a couple of times for a second and the log says cq is above watermark using cq of 90 8O

RC3 seems to be working fine for me, just wandering if there is a setting i have to change for RC4 :roll:

Hi kinggee,

Please check your paths, that you dont have any spaces or strange characters in the paths or the file names.

BTW, RC-5 is up!

-kwag

kinggee 07-29-2003 01:08 AM

Quote:

Originally Posted by kwag
Please check your paths, that you dont have any spaces or strange characters in the paths or the file names.

hmm there are no strange characters in the paths :?

Quote:

Originally Posted by kwag
BTW, RC-5 is up!

:D will try now thankyou

kwag 07-29-2003 01:15 AM

What is the full path to your .tpr, and to your output file name in TMPEG :?:

-kwag

kinggee 07-29-2003 01:51 AM

Quote:

Originally Posted by kwag
What is the full path to your .tpr, and to your output file name in TMPEG :?:

C:\Documents and Settings\Ben King\Desktop\KVCD ENCODING TOOLS\DogSoldiers.tpr

Output = C:\Documents and Settings\Ben King\Desktop\KVCD ENCODING TOOLS\DogSoldiers.m1v

now everytime i try to predict it gives a negative file size difference after the initial cq of 60 and jumps and stays on cq 90

kwag 07-29-2003 01:58 AM

Quote:

Originally Posted by kinggee
Quote:

Originally Posted by kwag
What is the full path to your .tpr, and to your output file name in TMPEG :?:

C:\Documents and Settings\Ben King\Desktop\KVCD ENCODING TOOLS\DogSoldiers.tpr

Output = C:\Documents and Settings\Ben King\Desktop\KVCD ENCODING TOOLS\DogSoldiers.m1v

now everytime i try to predict it gives a negative file size difference after the initial cq of 60 and jumps and stays on cq 90

Look at your file names :!:

C:\DocumentsspaceandspaceSettings\BenspaceKing\Desktop\KVCDspaceENCODINGspaceTOOLS\DogSoldiers.tpr

and Output = C:\DocumentsspaceandspaceSettings\BenspaceKing\Desktop\KVCDspaceENCODINGspaceTOOLS\DogSoldiers.m1v

kinggee 07-29-2003 02:02 AM

ohhhhh so a space is not a normal character :oops:

i will fix this up and try again :lol:

thanks :)

kwag 07-29-2003 02:05 AM

kinggee,

The problem is the way TMPEG stores the file names in the project file. When you use very long filenames and paths, it stores them something like this:

'C:\--== DVD RIPPING ==--\Band Of Brothers 10 Teile\Teil 4\bob4.d' + '2v'

Which of course, is an error for any standard windows program trying to open the file :!:

-kwag

kinggee 07-29-2003 02:07 AM

i see :!: 8O

now i understand :)

thanks for the explanation

kwag 07-29-2003 02:08 AM

Quote:

Originally Posted by kinggee
ohhhhh so a space is not a normal character :oops:

Yes it is :!:
It's a space character :lol:

-kwag

kinggee 07-29-2003 02:51 AM

its still not working :bawl:

video source = c:\dogsoldiers\dogsoldiers.avs
output filename = c:\dogsoldiers\dogsoldiers.m1v
tpr path = c:\dogsoldiers\dogsoldiers.tpr

Code:

http://www.kvcd.net
CQMatic Version 1.0 RC-5
Copyright Softronex Corporation, 2003.
All rights reserved.
Time: 17:29:44 Date: 07/29/2003
Ready!
Project: C:\DogSoldiers\DogSoldiers.tpr

Creating: CQMatic.tpr


Execute.
Movie Time: 99
Average Bitrate: 1009
Prediction Only mode
Executing Prediction Phase...
Using CQ of 60.00
Process started at 17:30:03
On 07/29/2003
Encoder started...
Process time: 15.40 minutes.
Encoder end.
File size difference  = -16248719.000000
Last CQ = 60.000000
Current CQ = 90.000000
CQ difference = 30.000000
Using CQ of 90.00
Encoder started...
Process canceled


kwag 07-29-2003 02:54 AM

Hi kinggee,

Send me your .tpr by PM :!:

GetUp 07-29-2003 03:24 AM

Hmm...bad results
 
Ok, my PC just finished encoding movie...
Result: 781 129 659 bytes
Must be: 683.19 Mb....
Too bad. :(
The movie was: Half Past Dead, hi-action movie
Average bitrate: 972
MAX - 2000
MIN - 554
Total lenght - 97 min
Source - DVD
Now I cant fit it to cd, even with 112 kbps sound
CQmatic - version RC-3
Now i try to predict with newest (RC-5) version of CQmatic...

rhino 07-29-2003 03:51 AM

@GetUp:

Was your source DVD in PAL format or NTSC format?

Cheers,

GetUp 07-29-2003 04:16 AM

Quote:

Originally Posted by rhino
@GetUp:

Was your source DVD in PAL format or NTSC format?

Cheers,

NTSC, film

tigger 07-29-2003 05:04 AM

well curious here :

have an 84 min movie, set min=0.57*avg bitrate and max=2000,
predicted and got an cq of 71,89, took 71.

then i changed min to 270, max = 2000, and well the videostream got 659 mb + audio of 115 mb (192kbit) , after muxing the movie has 785 mb so perfect for 1 cd :)

mistermickster 07-29-2003 06:42 AM

@Kwag

So, if I want to encode a sample with my script settings and fave template to check the resulting quality, how do I do it?

Also, do the filters loaded in the optimal script come with Avisynth or are they external?

What sort of figures are passed to the Letterbox and GripCrop filters?

Thnx


All times are GMT -5. The time now is 10:15 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.