digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Bitrates: Question about prediction (http://www.digitalfaq.com/archives/encode/4884-bitrates-question-prediction.html)

audi2honda 08-04-2003 11:38 PM

Question about prediction
 
I don't know how CQMatic works, but I noticed ToK will sample the same frames on every pass. So if you set it to sample 24 frame per minute it does those same 24 frames for each CQ is chooses.

Wouldn't it make more sense to change those 24 frames per minute on each pass to create a better sampling of the movie?

I realize this could make prediction jump around a bit and possibly take longer, but in the end I think it would be more accurate and hopefully much faster then using one huge sample size.

Just a thought.....

kwag 08-05-2003 12:06 AM

Hi audi2honda,

CQMatic takes a 2 second snapshot in 2 minute steps. I could have done 1 second sample per minute, but I noticed better accuracy with a longer sample. The sampling also varies, depending on the frame rate. It's different if the source is 23.976 or 25fps, than when it is 29.97fps.
If we were to take random snapshots on every pass, prediction would vary on every pass, and it would require many more passes to normalize the result. In reality, the more samples per time slot, the higher the accuracy, but at a cost of more prediction time per pass.
I'm still testing the 2 second per snapshot's accuracy. So far, I'm reasonably in the ~2% final file size bracket ( on a 800MB, one CD target )

-kwag

CaLaFaT 08-05-2003 01:54 AM

kwag, only one question, is surely the CQmatic's prediction with the MA script to PAL? I say this because Dialhot said me that is NO way or NO tools for a good prediction with this kind of script...

kwag 08-05-2003 02:04 AM

Quote:

Originally Posted by CaLaFaT
kwag, only one question, is surely the CQmatic's prediction with the MA script to PAL? I say this because Dialhot said me that is NO way or NO tools for a good prediction with this kind of script...

CQMatic should be as precise as manual prediction. I'm making sure of that ;)
Also, I haven't mentioned this, but CQMatic targets a 0.5% accuracy of your wanted sample target. So it's the same as if you select 0.5 precision in ToK. The big difference is that I don't use any avisynth function for prediction (SelectRangeEvery() or Sampler() ). It's all done directly in TMPGEnc, by slicing the material in pieces, and also takes the frame rate into consideration. So precision should be higher ;)
Check version 1.1.01, just about to be posted :D

-kwag

CaLaFaT 08-05-2003 02:26 AM

Quote:

Originally Posted by kwag
Check version 1.1.01, just about to be posted :D

-kwag

ohhhh, wonderful, yesterday i wanted download it, I the link didnt work... :D thanks a lot kwag...

kwag 08-05-2003 02:29 AM

Hi CaLaFaT,

Try it out, and let me know ;)


-kwag

CaLaFaT 08-05-2003 02:43 AM

Well kwag, I will prove CQMatic this afternoon, but If I understand you well, you said me that is better the full encode with CQMatic (predicition+encode).Work it better the full encode? or prediction only works as well as full encode? thanks....

kwag 08-05-2003 02:48 AM

Quote:

Originally Posted by CaLaFaT
Well kwag, I will prove CQMatic this afternoon, but If I understand you well, you said me that is better the full encode with CQMatic (predicition+encode).Work it better the full encode? or prediction only works as well as full encode? thanks....

Any way you want it :D
Prediction + full encode :cool:
Let me know your results :!:

-kwag

CaLaFaT 08-05-2003 07:10 AM

hi kwag, :? the first problem or confusion, when I click in open project, it say me that I have to insert a tmpgenc project files, can not I insert a *.avs? or first must I create a *.tpr of this *.avs? I dont understand it, because If I dont know the CQ, How can I create the *.tpr? thanks...

Krassi 08-05-2003 07:20 AM

Hi CaLaFat,

just enter * or *.avs in the top line where you want to open your file.

EDIT: Just reread your post. You shouldn't open an avs as TMPGEnc project :!:
Open the avs as video and the change your options and save this as TMPGEnc text project file. Then you open it with CQMatic. Your start-CQ doesn't matter with latest CQMatic :wink:

nicksteel 08-05-2003 08:01 AM


CaLaFaT 08-05-2003 08:59 AM

well, i have two predictions, one with CQMAtic and another with Tok...

here's my script:

## DLL Section ##
#
LoadPlugin("C:\Archivos de programa\MovieStacker\Filters\MPEG2Dec3.dll")
LoadPlugin("C:\Archivos de programa\MovieStacker\Filters\GripFit_YV12.dll")
LoadPlugin("C:\Archivos de programa\MovieStacker\Filters\STMedianFilter.dll")
LoadPlugin("C:\Archivos de programa\MovieStacker\Filters\asharp.dll")
LoadPlugin("C:\Archivos de programa\MovieStacker\Filters\unfilter.dll")
LoadPlugin("C:\Archivos de programa\MovieStacker\Filters\undot.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf = 0 # Current frame.
#
####

## Main section and static filters ###
#
Mpeg2Source("F:\movie.d2v")
#
undot()
Limiter()
asharp(1, 4)
GripCrop(528, 576, overscan=1, source_anamorphic=false)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")

#
#
#

GripBorders()
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()

#
#
## Functions ###

function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}

#
####


CQMatic have given CQ=90
Tok CQ=45

here the cqmatic log:


http://www.kvcd.net
CQMatic Version 1.1.01
Copyright Softronex Corporation, 2003.
All rights reserved.
Time: 14:21:31 Date: 08/05/2003
Ready!
Project: F:\optimal d2v a 528x576.tpr

Creating: CQMatic.tpr


Execute.
Movie Time: 97
Average Bitrate: 969
Prediction Only mode
Executing Prediction Phase...
Process started at 14:22:24
On 08/05/2003
CQ set for prediction
Setting up initial sampling.
Using CQ of 60.00
Prediction cycle #1
Encoder started...
Process time: 11.40 minutes.
Encoder end.
File size difference = -12031104.000000
Low fence: 60.000000
High fence: 90.000000
Last CQ = 60.00
Current CQ = 90.00
CQ difference = 30.000000
Using CQ of 90.00
Prediction cycle #2
Encoder started...
Process time: 11.43 minutes.
Encoder end.
File size difference = -12031104.000000
Low fence: 90.000000
High fence: 90.000000
CQ ABOVE watermark. CQ set to 90.0
Using CQ of 90.00
CQMatic complete!
Total minutes of process: 22.83
Process ended at 14:45:14
On 08/05/2003

But, i dont think that's correct, CQ=90 into 1 cd at 528x576 8O !?
can someone that's happen with this? thanks...

I deduce if for 2400 frames cqmatic have created a sample of 23.3 MB, for all the movie (145646 frames) will create an final *.m1v at 1414 MB + or -!

I'm really confused...help me :?

Krassi 08-05-2003 09:28 AM

Quote:

Originally Posted by CaLaFaT
File size difference = -12031104.000000

There seems to be something wrong with your project file. Have you read Avalons guides and Kwags recommondations how to use CQMatic :?:

CaLaFaT 08-05-2003 09:57 AM

no krassi, i dont read this guides, where can i read it? thanks a lot...

Krassi 08-05-2003 10:00 AM

Here is the guide: http://www.kvcd.net/forum/viewtopic.php?t=5188
Kwags "recommondations"/instructions:
http://www.kvcd.net/forum/viewtopic.php?t=5145

CaLaFaT 08-06-2003 01:29 AM

Quote:

Originally Posted by Krassi
Quote:

Originally Posted by CaLaFaT
File size difference = -12031104.000000

There seems to be something wrong with your project file. Have you read Avalons guides and Kwags recommondations how to use CQMatic :?:

kwag, how can I change this parameter? thanks a lot...I dont find it...

kwag 08-06-2003 01:52 AM

Hi CaLaFaT,

Make sure the path to your .d2v and .tpr is not very long. That's the problem, and CQMatic can't find the file pointed to in TMPEG's .tpr file.

-kwag

vhelp 08-06-2003 02:00 AM

.
.

:idea: yeah, forget about those long names guys..

They are causing more trouble then worth. If anything, just keep your
long names w/out spaces ie, "today is a tireing day" to "todayisatirengday"
or "TodayIsATireingDay.tpr"

One cause of why apps bomb out w/ errors (theory) is that they Parse
the directory and filenames. In some, they parse till they hit upon a space
char or something, then the new dir\\filename is incorrect and you have
errors, which can be untracable at times.

-vhelp

CaLaFaT 08-07-2003 01:05 AM

hi kwag and vhelp, i put an example:

before:

f:/copias de seguridad/pelicula/ una cualquiera.d2v

after:

f:/unacualquiera.d2v


And the problem is the same.... :cry:

File size difference = -12031104.000000

Can you help me? thanks...

kwag 08-07-2003 01:18 AM

Hi CaLaFaT,

When you load your project (.tpr) in TMPEG, and you hit "Start", does it start to encode without errors :?:

-kwag


All times are GMT -5. The time now is 05:30 PM  —  vBulletin © Jelsoft Enterprises Ltd

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