Quantcast Time to Revise File Prediction! - Page 2 - digitalFAQ.com Forums [Archives]
  #21  
06-21-2003, 05:50 PM
audi2honda audi2honda is offline
Free Member
 
Join Date: Jun 2003
Location: Orange County, CA
Posts: 291
Thanks: 0
Thanked 0 Times in 0 Posts
@vhelp

I just did a search of the avisynth.org website and every filter in kwag's script supports the YV12 colorspace. Some support YU and YV, but I don't know if you can force it to one or the other. I confirmed Limiter() supports YV12 also.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #22  
06-21-2003, 06:01 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
@vhelp,

The problem is not related at all to colorspace. If it was a color space problem, then it would also show up in the samples when doing prediction, because prediction is done on the same color space as the final encode.
I think the solution, for the time being, is going to be to sample at least 36 or 48 frames per sample instead of 24, and then take ~100 samples per movie ( just like in the original file prediction, a long time ago ). This will increase the prediction time a little, but it will broaden the window of the sampler. If this doesn't work, hell , then we're back to square one

-kwag
Reply With Quote
  #23  
06-21-2003, 06:03 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by audi2honda
Is 15MB short on a 2CD encode considered accurate?
15MB is nothing
That's an excelent prediction, even for one CD

-kwag
Reply With Quote
  #24  
06-21-2003, 06:08 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vhelp
You have to have
consistant color space filters in a project ! Either you have
YV12 throughout your project, or YUY2.
You have the same color space in the sampler or in the full movie
There's no difference at all

-kwag
Reply With Quote
  #25  
06-21-2003, 06:11 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ ovg64..

Quote:
If your theory is true than all you would need to do is
make a script w say YV12 filters only run prediction and Encode
The final file size should now be on target like in 2.08, that would
pretty much prove your theory, i think.
Somehow I don't think so..

Hers's why:
In the "prediction" of things, somewhere in the process, VIDEO is being
encoded.. right ??
So, when it's encoding the video..
* Ain't it encoding it w/ all those MIXed filters ??
* And, are they the same today, as they were yesterday ??
* Did any ONE of them change ??

Ok, given the above, let say that a user encoded the Movie, K-PAX and
it had certain Filters in the script. If EVERY one of those filters were
of the SAME color space used in a prevous predict ie,
Code:
  asharp         - YUY2
  STMedianFilter - YUY2
  undot          - YUY2
  DustV5         - YUY2
  GripFit        - YUY2
  etc
.
. . and the predict encoded those samples using the above filters, w/
the YUY2 color space, and user got a 5.0 value, THEN later on, you
upgrated a few things, and now you proceed to do the same predict on
the same Movie, K-PAX..

Code:
  asharp         - YV12 *
  STMedianFilter - YV12 *
  undot          - YV12 *
  DustV5         - YUY2
  GripFit_YV12   - YV12 *
  etc
Should you get the same value, 5.0 or another value ??

However, you can't go blaing only the filters. There may be other
things at play here. Example, v2.52 now has YV12 support.
Some things may have changed, that may not be known until things like
this come up and they are discovered.

Somehow, the conversion of color space is takine place, and as such, something
has changed, resulint most likly, "filezie prediciton"

Don't forget, that COLOR (no matter how small) plays a part in the encoding.
And, that means:
* filesize
* CQ values
* quality
* you name it,
.
..will be effected down the chain.

Mind you all, I'm basing this on the assumption that the predict is
somewhere in the process, doing the actual encoding of video, if I
remember correctly, that's what it's doing, and that is how it's getting
the accurate "filesize predicton". If I'm wrong on this assumption,
then I may be off (or wrong) on my analigies.

@ Kwag..
* Are you sure that color space is not effected (touched) in those samples ??
* can you run an AVIsynth v2.08 YUY2 predict on the same source, w/ the
...same scenes and frames, and then do anther one w/ AVIsynth v2.52 YV12
and then compare the results ??
I ask, becaues something IS effecting predicts, and after all, video is
being encoded, and THAT encode is what is used in the final values you
get in your predicts !!

I would test this out for myself, but I don't know how to use predict
how ironic!! dahh!!

-vhelp
Reply With Quote
  #26  
06-21-2003, 06:12 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Here's what I'm currently trying, at the end of the script:

Code:
interval = round( ((FrameCount/24)/60) / 2 )
nFrames = 48
SelectRangeEvery( (round(framecount/interval)),nFrames)
-kwag
Reply With Quote
  #27  
06-21-2003, 06:14 PM
ovg64 ovg64 is offline
Free Member
 
Join Date: Jan 2003
Location: Puerto Rico
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ovg64
I still think the problem is that tok can't read how many times
or how much blur there is going to be on a hole movie, and if asharp(-2,0)
was padding file size than that didn't help. So now taking more samples like kwag said may help tok be more accurate but may still not solve the
deal here.
Reply With Quote
  #28  
06-21-2003, 06:18 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by ovg64
I still think the problem is that tok can't read how many times
or how much blur there is going to be on a hole movie, and if asharp(-2,0)
was padding file size than that didn't help. So now taking more samples like kwag said may help tok be more accurate but may still not solve the
deal here.
The problem is that prediction is actually failing even manually without using ToK. That's why I'm trying the above script.
There are more ways to skin a cat, and we will skin the cat

-kwag
Reply With Quote
  #29  
06-21-2003, 06:23 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ Kwag..

Let me ask ya a stupid question ..

Manual Prediction.. NOThing gets encoded.. and you are just jugling a few
numbers around ??

Or, is there SOMEthing getting encoded, and based off the filesize of those
encoded snips, you tally those numbers and predict the final CQ ??

-vhelp
Reply With Quote
  #30  
06-21-2003, 07:08 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vhelp
@ Kwag..

Let me ask ya a stupid question ..

Manual Prediction.. NOThing gets encoded.. and you are just jugling a few
numbers around ??
No. In manual prediction, a sample gets encoded with either the "Sampler()" dll or the formula I posted above.
Quote:

Or, is there SOMEthing getting encoded, and based off the filesize of those
encoded snips, you tally those numbers and predict the final CQ ??

-vhelp
Exactly

And to all
I think I (probably!) hit the nail this time It seems that with the MA script, what's throwing us off is the GOP
I'm currently testing prediction with the regular formula:
Code:
interval = round( (FrameCount/24)/60 ) 
nFrames = 24
SelectRangeEvery( (round(framecount/interval)),nFrames)
I closed the GOP to 12 because I'm encoding 23.976 ( 15 if I was encoding PAL 25fps, or 18 if it was NTSC 29.97fps ) and I had to lower the CQ in order to match the wanted prediction file size. It seems that we really don't need such a long GOP anyway, because the quality workhorse is being done now by AviSynth 2.52, the MA script and the "Notch" matrix.
Here's a sample done with the above formula, and now with a final CQ of 63.66, which is about 3 points below in CQ value from my original encode that was ~5% over in final file size:
http://www.kvcd.net/10-sec.mpg

We'll have to wait ~4 1/2 hours for the result I'll post here the final file size when the complete movie finishes.
If this does indeed correct the problem, then we have to talk to hedix to make the GOP changes in ToK.

-kwag
Reply With Quote
  #31  
06-21-2003, 07:23 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ Kwag..

Quote:
We'll have to wait ~4 1/2 hours for the result I'll post here the final file size when the complete movie finishes.
If this does indeed correct the problem, then we have to talk to hedix to make the GOP changes in ToK.
...And, I have to go the the nearest party store, and look for a hat

By the way, I'm currently trying out ToK (about time i'd say) I guess this
discussion motivated me enough to give it a go
But, having my own problems. It encodes first pass, next pass gives me
the error:

Code:
  Evaluate: division by zero
  (h:\work\video.avs, line 144)
If anyone knows how to fix, a big Tanx!!

-vhelp
Reply With Quote
  #32  
06-21-2003, 07:32 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vhelp

Code:
  Evaluate: division by zero
  (h:\work\video.avs, line 144)
What's on that line 144
If you have the "Sampler()", remove it

-kwag
Reply With Quote
  #33  
06-21-2003, 07:46 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ Kwag..

Quote:
139 - AssumeFPS(23.976)
140 - LoadPlugin("..\00 - MPEG - ToK v0.0.5.3 - (file prediction)\ToK_EXTRAS\Sampler\Sampler-2.5.dll")
141 - oldfps = framerate
142 - interval = round((FrameCount/24)/59.940)/10
143 - nFrames = round(24)
144 - SelectRangeEvery( (round(framecount/interval)),nFrames)
The above is what's inserted at the bottom of my .AVS script.
Does this help any ?

Thanks,
-vhelp
Reply With Quote
  #34  
06-21-2003, 07:51 PM
audi2honda audi2honda is offline
Free Member
 
Join Date: Jun 2003
Location: Orange County, CA
Posts: 291
Thanks: 0
Thanked 0 Times in 0 Posts
kwag does the solution you propose and are testing lower the quality since the CQ went down and the GOP is smaller? Sorry I'm just trying to understand all this. You guys come up with some great stuff here that is above my head, but I like to at least try and understand how things work.

Happy weekend
Reply With Quote
  #35  
06-21-2003, 07:54 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by audi2honda
kwag does the solution you propose and are testing lower the quality since the CQ went down and the GOP is smaller?
Check the last sample http://www.kvcd.net/10-sec.mpg

-kwag
Reply With Quote
  #36  
06-21-2003, 07:57 PM
audi2honda audi2honda is offline
Free Member
 
Join Date: Jun 2003
Location: Orange County, CA
Posts: 291
Thanks: 0
Thanked 0 Times in 0 Posts
looks pretty dam near perfect to me
Reply With Quote
  #37  
06-21-2003, 08:13 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah, the only thing is to wait and see if the final size is ~718,815KB, which is the size calculated by MovieStacker. Wanted file size for prediction is 11,980.25, and with the CQ of 63.66, my sampler was 11,958KB.
So we have to wait

-kwag
Reply With Quote
  #38  
06-21-2003, 08:38 PM
ovg64 ovg64 is offline
Free Member
 
Join Date: Jan 2003
Location: Puerto Rico
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ovg64
Quote:
Originally Posted by kwag
Yeah, the only thing is to wait and see if the final size is ~718,815KB, which is the size calculated by MovieStacker. Wanted file size for prediction is 11,980.25, and with the CQ of 63.66, my sampler was 11,958KB.
So we have to wait

-kwag
What do you mean predicted by MovieStacker

You mean tok n if so how do you put the line into it

Do you edit the ini file or something

Quote:
interval = round( ((FrameCount/24)/60) / 2 )
nFrames = 48
SelectRangeEvery( (round(framecount/interval)),nFrames)
Reply With Quote
  #39  
06-21-2003, 09:19 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Hi ovg64,

I'm predicting the old manual way. After I open the .d2v with MovieStacker, if you look on the "Audio Stream & Authoring" tab, you'll see the video size in KB and in MB.
So you take the KB size and divide it by 60, and that's the sampler wanted size
Then I add the lines:
Code:
interval = round( (FrameCount/24)/60 )
nFrames = 24
SelectRangeEvery( (round(framecount/interval)),nFrames)
at the end of the script, and run TMPEG. Then adjust CQ until I get the file size wanted above.


-kwag
Reply With Quote
  #40  
06-21-2003, 09:33 PM
ovg64 ovg64 is offline
Free Member
 
Join Date: Jan 2003
Location: Puerto Rico
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ovg64
Isn't it easy using the old kvcd predictor i still use it w manual prediction.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Bitrates: Prediction time for CQMATIC epuleda Video Encoding and Conversion 4 05-26-2006 02:11 PM
simple way to do time stretching of a mp2 file? zagor Audio Conversion 12 08-27-2004 05:51 AM
Tmpgenc cannot open source file for file prediction Kane Avisynth Scripting 3 02-03-2003 02:44 PM
KVCD: File Size Fluctuates Big Time! Jellygoose Video Encoding and Conversion 4 01-28-2003 01:55 PM
DVD player read time wrong if file size is different? COMMANDO Video Encoding and Conversion 1 07-22-2002 06:02 PM

Thread Tools



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