digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   To crop or not to crop! (http://www.digitalfaq.com/archives/encode/1841-crop-crop.html)

SansGrip 12-17-2002 09:52 AM

Quote:

Originally Posted by jamesp
These encoded changes look like they take more space than an actual main frame!

You know, that makes a lot of sense. For very noisy sources, it might be best to reduce the number of P- and B-frames, since as you say it's possible that describing the differences might require a higher bitrate than simply using more I-frames...

I think most of our questions regarding the GOP could be answered with a sophisticated MPEG analyzer. Anyone know of such a beast?

jp 12-17-2002 10:01 AM

Quote:

Originally Posted by bman
Quote:

Originally Posted by jp
I tried to use just tmpgenc crop at VCD resolution and got mixed results - nothing talk about for now.
But I found that, using standard avs without addborders and with center in tmpg I always get a smaller filesize (around 0,5%).

About the GOPs that you are testing. I had the idea that the max GOP size was the sum of all frames, for example: a GOP 1-8-3 would give a size of 1+8+8*3 =33 (+1 if close GOP selected). If so, why to use the same number for P frames and Max GOP ?

GOP = I + P + (P+1)xB
Check yourself with TMPGenc->GOP -> GOP structure

bman

You´re absolutely right! with I=1 we´ve got GOP= 1+p+(P+1)*B (-B if Closed GOP selected).
But my question remains: Why P=max GOP? and why 15 (just on example)? If I count correctly, the GOP is cutted between a 2nd and a 3th B frame (not the best place to stop)

jamesp 12-17-2002 10:12 AM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by jamesp
These encoded changes look like they take more space than an actual main frame!

You know, that makes a lot of sense. For very noisy sources, it might be best to reduce the number of P- and B-frames, since as you say it's possible that describing the differences might require a higher bitrate than simply using more I-frames...

I think most of our questions regarding the GOP could be answered with a sophisticated MPEG analyzer. Anyone know of such a beast?

Well this could also be true for DVD encodes using CQ_VBR at 11. The resulting Mpegs are going to be noisy so Tmpeg could be finding it harder to allocate a bitrate

Jim

bman 12-17-2002 10:17 AM

Quote:

Originally Posted by jp
Quote:

Originally Posted by bman
Quote:

Originally Posted by jp
I tried to use just tmpgenc crop at VCD resolution and got mixed results - nothing talk about for now.
But I found that, using standard avs without addborders and with center in tmpg I always get a smaller filesize (around 0,5%).

About the GOPs that you are testing. I had the idea that the max GOP size was the sum of all frames, for example: a GOP 1-8-3 would give a size of 1+8+8*3 =33 (+1 if close GOP selected). If so, why to use the same number for P frames and Max GOP ?

GOP = I + P + (P+1)xB
Check yourself with TMPGenc->GOP -> GOP structure

bman

You´re absolutely right! with I=1 we´ve got GOP= 1+p+(P+1)*B (-B if Closed GOP selected).
But my question remains: Why P=max GOP? and why 15 (just on example)? If I count correctly, the GOP is cutted between a 2nd and a 3th B frame (not the best place to stop)

It's just a NUMBER , OK?!!!!
U can use any number , ANY number ! (like 5823 - signature of KWAG) :D
It can be big any size but not less than optimal value - THE ONE our Bright minds are serching for 8) :?
Size of GOP depends on MAX frame numbers in gop . This number is responsible on GOP size .

bman

SansGrip 12-17-2002 10:28 AM

Quote:

Originally Posted by jamesp
Well this could also be true for DVD encodes using CQ_VBR at 11. The resulting Mpegs are going to be noisy so Tmpeg could be finding it harder to allocate a bitrate

Maybe we're using a different definition of "noise". I'm referring to random variations (i.e. additive white noise) in the source material that confuses the MPEG encoder and causes unnecessary allocation of bits that could be better spent describing actual details.

A low CQ_VBR doesn't make more of this kind of noise. It might make "mosquito noise", but it's not really noise at all. We should probably start calling it the Gibbs Effect instead :).

Jellygoose 12-17-2002 10:42 AM

8O wow, kwag and others... now this is getting really odd...
So as I understand ya'll correctly :) ...
There's an optimal GOP for each resolution + for each CQ_VBR value of this resolution ?
Let's just go ahead and test... I'll run a couple of tests on the PAL templates, of the KVCDx3...

later guys...

Boulder 12-17-2002 10:59 AM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by Boulder
The P frame number seems to be totally unpredictable..you have created a monster, Kwag :twisted:

P-frame?? Oh boy oh boy.

Well, I should also have told that the max number of frames in a GOP is the same as the number of P-frames..

so what I really meant was that this thing we are contemplating could really turn out to be a tough case. In my tests GOP size 36 frames produced a slightly smaller file than a 30-frame GOP. Then again, I got the smallest filesize with a max 8-frame GOP..confusing!

I just hope that this value would only depend mostly on the resolution.

kwag 12-17-2002 11:04 AM

I think I know what we have to do. If for a given CQ_VBR there is an optimal number of max frames, we need to calculate a formula that applies either a negative or positive offset to a pre-determined center point of max frames. This way, when we change the CQ_VBR value, the max frames is adjusted. Of course with a minimum value and maximum values. Like MIN_P=6, MAX_P=36.

-kwag

SansGrip 12-17-2002 11:05 AM

Quote:

Originally Posted by Boulder
Well, I should also have told that the max number of frames in a GOP is the same as the number of P-frames..

Not really -- the number of frames in a GOP is the sum of all I-frames, P-frames and B-frames. Thus the number of P-frames in the GOP should always be less than the total frames in the GOP.

Quote:

Originally Posted by Boulder
Then again, I got the smallest filesize with a max 8-frame GOP..confusing!

I think enough testing will make things clearer...

Boulder 12-17-2002 11:07 AM

I think it's time for SansGrip to start planning another util..THE P-REDICTOR!

Jesus, we'll need more time predicting the GOP size and the CQ_VBR value than encoding the movies :lol:

SansGrip 12-17-2002 11:07 AM

Quote:

Originally Posted by kwag
I think I know what we have to do. If for a given CQ_VBR there is an optimal number of max frames ( P's ), we need to calculate a formula that applies either a negative or positive offset to a pre-determined center point of P's. This way, when we change the CQ_VBR value, the P's are adjusted.

Can you give an example of how this would work?

(And by "P's" you mean "pictures", not "P-frames", right? :?)

kwag 12-17-2002 11:09 AM

Opps, sorry SansGrip, I had edited the post, but you beat me to it on the quote :D I meant max number of frames. Not P's.

-kwag

SansGrip 12-17-2002 11:11 AM

Quote:

Originally Posted by Boulder
I think it's time for SansGrip to start planning another util..THE P-REDICTOR!

heheheh actually I was just imagining how this could be incorporated into KVCDP... :D

Quote:

Jesus, we'll need more time predicting the GOP size and the CQ_VBR value than encoding the movies :lol:
If you think this is complicated check out the process used to transfer a studio release onto DVD... Those compressionists do all this and more -- usually on a scene-by-scene basis! 8O

Boulder 12-17-2002 11:11 AM

Quote:

Originally Posted by SansGrip
Not really -- the number of frames in a GOP is the sum of all I-frames, P-frames and B-frames. Thus the number of P-frames in the GOP should always be less than the total frames in the GOP.

Some more clearing :wink: .. I meant that I used the same formula as the other people here, 1-8-3-1-8 produced the smallest filesize :)

SansGrip 12-17-2002 11:13 AM

ARGH!! WE'RE ALL POSTING AT THE SAME TIME!!!! :lol: :mrgreen:

kwag 12-17-2002 11:16 AM

We go on like this, this thread will have 20 pages by the end of the day :lol:
At this speed, we'll probably have a solution to all of this in a matter of hours :mrgreen:

-kwag

Boulder 12-17-2002 11:19 AM

Quote:

Originally Posted by SansGrip
If you think this is complicated check out the process used to transfer a studio release onto DVD... Those compressionists do all this and more -- usually on a scene-by-scene basis! 8O

I would as well if they paid me big money too :wink:

To be honest, if this thing gets included in the KVCD Predictor, it's going to be the sliced bread of amateur(?) video encoding, if you see what I mean 8)

Boulder 12-17-2002 11:24 AM

Quote:

Originally Posted by kwag
At this speed, we'll probably have a solution to all of this in a matter of hours :mrgreen:

Distributed computing's the name of the game these days..the interest in this has been huge, I must admit.

SansGrip 12-17-2002 11:26 AM

Quote:

Originally Posted by Boulder
I would as well if they paid me big money too :wink:

hehe no kidding.

Quote:

To be honest, if this thing gets included in the KVCD Predictor, it's going to be the sliced bread of amateur(?) video encoding, if you see what I mean 8)
Right now I have a picture in my head forming...

It involves selecting several sample strips (say, "this represents the average amount of action in the film", "this represents more sedate scenes", "this represents particularly high-action scenes", or whatever) and encoding them, then running them through an MPEG analyzer to determine how efficiently each strip is using the CQ_VBR and GOP settings, then generate a new template (incorporating "force picture type" settings) to use based on the analysis, then repeat...

Sort of like a feedback loop, all in one program...

8O

SansGrip 12-17-2002 11:46 AM

Another thought...
 
wrt the analysis idea, if one were to go through the encoded sample strip and calculate the average size of I-frames, P-frames and B-frames, shouldn't it be possible to calculate the best GOP structure from that information?

In other words, let's say we had the following results from the analysis (numbers are made up and probably bear no resemblance to real figures):

Avg. I-frame = 25kb
Avg. P-frame = 10kb
Avg. B-frame = 5kb

This information would suggest a large GOP, with as many P- and B- frames as possible.

The question is, what would the average sizes be for a movie that compresses better with a smaller GOP? Could it possibly look like this:

Avg. I-frame = 20kb
Avg. P-frame = 22kb
Avg. B-frame = 25kb

:?:

What else would account for the phenomenon?


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