digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Experimental Revised prediction! (http://www.digitalfaq.com/archives/avisynth/4139-experimental-revised-prediction.html)

kwag 06-23-2003 12:13 AM

Experimental Revised prediction!
 
Here are the results and analisys on my K-Pax encode:

Wanted video file size: 714,303KB
Encoded video file size: 741,735KB

A difference of ~+3.69%

And this is GOOD :!:
Here's the pattern I see. On action movies, file size will be ~3% smaller MAX.
On low action movies (like K-Pax), file size will be ~3% larger MAX.
So normal "average" films should target ~100% accuracy :!:
There's something I did notice, and that is that just before the end credits, the file size was just at about 714MB, which was the wanted size. So the end credits is REALLY what's throwing off the calculations :)
I was watching TMPEG as it was encoding the end credits, and the file size was soaring high on the vertical scroll of the credits. "THAT'S OUR MAIN PROBLEM" The function "YDifferenceToNext()" reports a VERY LOW value on the end credits (verified with Vdub adding "nf" variable from script as subtitle), even though the scroll is a very high difference to next frame :!: But because it's mainly a black screen with text scrolling vertically, the returned value is very small, and we are loosing A LOT of compression there :!:
So my suggestions are as follow:

(1) Cut off end credits with AviSynth's function "Trim", and encode with a factor of 1.0. OR take into consideration the type of movie you're about to encode. If it's a low action film, subtract 3% (multiply by 0.97) the wanted sampler size.
If it's an action film, add 3% (multiply by 1.03) the wanted sampler size.
If it's an average film, don't add or subtract anything :)
(2) If using ToK, the same applies, BUT:
(a) Use a factor of 0.97 for low action movies.
(b) Use a factor of 1.03 for action movies.
(c) Use a factor of 1.0 for regular (average movies)

*** PAL people, could you please test this please ***
Please use the "Video.en1" file I uploaded earlier ( www.kvcd.net/video.en1 ) and copy it to your ToK OPT directory.
*** PLEASE, let us know your results :!: ***

Please keep replies related to file prediction :!:

-kwag

vico1 06-23-2003 12:43 AM

Maybe I`m talkin` outta` my hat here...but here goes.
Is there a script line we could use, to call extra compression at a given
start/end point of frames, (beginning/end of credits) within the "Adaptive" script?

Maybe this would compensate for some of the error?


*******************************
The Devil`s always.....in the Details!

kwag 06-23-2003 01:28 AM

Quote:

Originally Posted by vico1
Is there a script line we could use, to call extra compression at a given
start/end point of frames

Well, you can just use the "trim" function, and just cut off the end credits :idea:
You can use Vdub to find your last movie frame (where credits start ), and trim from there to the end.
And that's exactly what I plan to do from now on :!:
I've seen some credits go beyond 10 minutes, and that's ridiculous :D
It's just that much compression we're loosing from the main movie :!:

-kwag

audi2honda 06-23-2003 01:55 AM

just a suggestion to make it even easier. Instead of using trim() and Vdub why not just hack off the credits in DVD2AVI when you initially create your project file. That's what I do.

kwag 06-23-2003 02:25 AM

Yep, you're right :)

-kwag

audioslave 06-23-2003 10:45 AM

@kwag

Are you using the shorter GOP's for this prediction or are you using the "old" ones - NTSCFilm 24, PAL 25 & NTSC 30? If you're using the shorter ones, could you please post the right values for the different sources? Come to think of it, please post the shorter GOP's even if you're not using them :wink: ! If I use the shorter GOP's the file size will be bigger, right? And how does it affect the quality of the movie?

jorel 06-23-2003 10:57 AM

Kwag,
the new video.en1 that you post is only for PAL?
:?

kwag 06-23-2003 11:15 AM

This was done with the regular GOP, or actually "Auto GOP" as used in ToK. I uploaded the "video.en1" file that I used, so you can use it in ToK.
Also I'm correcting the post above, because it was too late and I posted the factors in reverse and offset of 6% instead of 3% :oops:
The factor should be 0.97 (-3%) for low action and 1.03 (+3%) for high action films.

-kwag

kwag 06-23-2003 11:24 AM

Quote:

Originally Posted by jorel
Kwag,
the new video.en1 that you post is only for PAL?
:?

ToK selects PAL or NTSC automatically depending on the source :)
The changes I did are basically to enable scene change detection, and I also enabled 3:2 pulldown when encoding MPEG-2. So now ToK can make correct MPEG-2 files for DVDs ;)

-kwag

jorel 06-23-2003 11:30 AM

great news... thanks!
:wink:

Dialhot 06-23-2003 12:25 PM

Quote:

Originally Posted by kwag
and I also enabled 3:2 pulldown when encoding MPEG-2. So now ToK can make correct MPEG-2 files for DVDs ;)

-kwag

Because of this , we can use this configuration file for PAL videos. Indeed I've did this modification myself some weeks ago because I need to do a NTSC video. But when I switch back to a PAL video, TMPGEnc complained with "3:2 pulldown is a feature allowed only for NTSC video encoding" (or something like this).

Now I have 2 video.en1 that I have to switch manually following what is the type of the video :-(

kwag 06-23-2003 12:33 PM

Quote:

Originally Posted by Dialhot

Now I have 2 video.en1 that I have to switch manually following what is the type of the video :-(

Yes, I know what you mean :!:
This is something that would be great if hedix integrates it into ToK, so that it will automatically switch his configuration files, depending on what the target is :)

-kwag

jorel 06-23-2003 12:43 PM

i got this advice in TMPGEN with the new video.en1 in ToK:

"for encode mode,3:2 pulldown when playback can not be used if
the flame rate is not 23.976 or24fps"
:?

my source is 29,97!

ovg64 06-23-2003 12:56 PM

Quote:

Originally Posted by kwag
This was done with the regular GOP, or actually "Auto GOP" as used in ToK. I uploaded the "video.en1" file that I used, so you can use it in ToK.
Also I'm correcting the post above, because it was too late and I posted the factors in reverse and offset of 6% instead of 3% :oops:
The factor should be 0.97 (-3%) for low action and 1.03 (+3%) for high action films.

-kwag

I pretty much lnow the differece between an action film n a non action film, but how can you classified a high action from a low action film from toks point of view. :?: i mean we didn't have to worried about prediction
been off before, so its better to be sure now :!:

kwag 06-23-2003 01:37 PM

Quote:

Originally Posted by ovg64

I pretty much lnow the differece between an action film n a non action film, but how can you classified a high action from a low action film from toks point of view. :?: i mean we didn't have to worried about prediction
been of before, so its better to be sure now :!:

Yes I agree, and I'm looking for a solution so we can determine the factor to apply to a movie, depending on the action/activity etc. :)
This is where the fun part begins :mrgreen:

-kwag

PyRoMaNiA 06-23-2003 02:04 PM

Quote:

Originally Posted by kwag
Also I'm correcting the post above, because it was too late and I posted the factors in reverse and offset of 6% instead of 3%
:oops:
The factor should be 0.97 (-3%) for low action and 1.03 (+3%) for high action films.

The post above still says...
Quote:

(a) Use a factor of 1.03 for low action movies.
(b) Use a factor of 0.97 for action movies.
:?

jorel 06-23-2003 02:07 PM

and my error remains in tmpgenc with the new video.en1!

help please.

i see this differences between the "old and the new video.en1 :

old:
Job.MPEG.Video.DC_prec=0
Job.MPEG.Video.VideoEncodeMode=MPEGVideoEncoder_Vi deoEncodeMode_Interlace
Video.AutoForceIPict=False

new:
Job.MPEG.Video.DC_prec=1
Job.MPEG.Video.VideoEncodeMode=MPEGVideoEncoder_Vi deoEncodeMode_Progressive_32Pulldown
Video.AutoForceIPict=True

kwag 06-23-2003 03:02 PM

Quote:

Originally Posted by PyRoMaNiA
Quote:

Originally Posted by kwag
Also I'm correcting the post above, because it was too late and I posted the factors in reverse and offset of 6% instead of 3%
:oops:
The factor should be 0.97 (-3%) for low action and 1.03 (+3%) for high action films.

The post above still says...
Quote:

(a) Use a factor of 1.03 for low action movies.
(b) Use a factor of 0.97 for action movies.
:?

:? Fixed :!:

Should read:
(a) Use a factor of 0.97 for low action movies.
(b) Use a factor of 1.03 for action movies.

-kwag

audi2honda 06-23-2003 03:37 PM

I'm confused are these new video.en1 settings for NTSC and PAL or just PAL?

On what type of material do I need to add 3:2 pulldown?

kwag 06-23-2003 04:21 PM

Quote:

Originally Posted by audi2honda
I'm confused are these new video.en1 settings for NTSC and PAL or just PAL?

On what type of material do I need to add 3:2 pulldown?

Hi audi2honda,

The changes I did on the file apply to NTSC and PAL only on MPEG-1. On MPEG-2, the 3:2 pulldown applies to NTSC. So for PAL people, they must change that. The best and easiest way is to load TMPEG and set all the parameters you want, and then save as an ascii project. Then copy the respective parameters from the saved file, and edit the file "video.en1". I would keep separate copies, depending on what you want to encode. One file for MPEG-1, and another one for MPEG-2, another for DVD, etc.

-kwag


All times are GMT -5. The time now is 11:09 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.