Ping-Pong Prediction vs Long-Short Prediction - Page 5 - digitalFAQ.com Forums [Archives]
 digitalFAQ.com Forums [Archives] Ping-Pong Prediction vs Long-Short Prediction

#81
06-10-2005, 08:14 PM
 rds_correia Free Member Join Date: Apr 2003 Location: Chinese Democracy starts now! Posts: 2,563 Thanks: 1 Thanked 0 Times in 0 Posts
Yep, I get it .
I had noticed that slicer had a very small tendecy to oversize.
Maybe that's got something to do with the way I was using.
Thanks for pointing out my mistake.
Cheers
__________________
Rui
Someday, 12:01 PM
 Site Staff / Ad Manager Join Date: Dec 2002 Posts: 42 Thanks: ∞ Thanked 42 Times in 42 Posts
#82
06-10-2005, 08:53 PM
 Prodater64 Free Member Join Date: Mar 2003 Location: Palma de Mallorca - España Posts: 2,925 Thanks: 0 Thanked 0 Times in 0 Posts
I want to illustrate what I'm saying.

Your target is 52045 (is avg between next ping-pong values, just hipotetic to illustrate this)

To obtain it you needed:

One 2% ping = 52371 KB
One 2% pong = 51719 KB
Total encoding 4%

I needed:
One 1% Ping + 1% Pong = 52410 KB
Total encoding 2%
Difference with usual ping-pong 0.77%
Not more than first avs edition needed.
Half time to obtain it.

The script as you point me previously:
Quote:
 Video=Mpeg2source("E:\DVD Authoring Working Folder\PB.d2v") ping = Video.slicer(1,15,1,"ping") pong = Video.slicer(1,15,1,"pong") last = ping++pong #crop, resize and filtering function slicer(clip input,int percent,int Goplenght,int Gopmulti,string "ping") { PercCount=(Framecount(input)/100)*percent period=int(Framecount(input)/PercCount)*(Goplenght*Gopmulti) input=(ping=="pong")?input.trim((period/2),Framecount(input)):input selectrangeevery(input,period,(Goplenght*Gopmulti) ) }
Most important, if you have a command line encoder you can do:

Quote:
 set v_target_size=52045 for /L %%G in (1,1,100) do set v_quant=%%G & call :routine goto :eof :routine start /wait Encoder -i "my.avs" -o "my%v_quant%.m2v" -cq %v_quant% for %%H in ("my%v_quant%.m2v") do set v_sample_size=%%~zH if v_sample_size geq v_target_size goto :eof goto :eof Encoder -i "myfull.avs" -o "myfull.m2v" -cq %v_quant% :eof
and go to take some coffee or to sleep.
When you come back you will have full elementary stream.

The command line maybe need some adjustements, it is only to give an idea.

Don't see you some advantages in this method?
I see it.

Lesser sample with this method is 2% as slicer function don't supports floating values.

Edited.
#83
06-11-2005, 08:43 AM
 rds_correia Free Member Join Date: Apr 2003 Location: Chinese Democracy starts now! Posts: 2,563 Thanks: 1 Thanked 0 Times in 0 Posts
Pro...
I don't know where you're going here...
I see you have found a break through with a method you are trying but I can't see what is it that you're trying.
Instead of many calculations could you try to explain me what you're trying to achieve?
And how you'd want to achieve it?
And please don't get mad at me for this post but I am really bad at maths .
Cheers
__________________
Rui
#84
06-11-2005, 08:55 AM
 Prodater64 Free Member Join Date: Mar 2003 Location: Palma de Mallorca - España Posts: 2,925 Thanks: 0 Thanked 0 Times in 0 Posts
Quote:
 Originally Posted by rds_correia Pro... I don't know where you're going here... I see you have found a break through with a method you are trying but I can't see what is it that you're trying. Instead of many calculations could you try to explain me what you're trying to achieve? And how you'd want to achieve it? And please don't get mad at me for this post but I am really bad at maths . Cheers
Is a little change in ping-pong method.

Let's say that you want to do a prediction. Do math to obtain 2% of your final target size.
You don't need to do any ping pong as original Incredible method.
You don't need to calculate proportional difference.
You only need to do one pass ping-pongs (as the previous script show) and see in your screen if size match with your 2% target size.
It is an easier mod ping-pong method.
#85
06-26-2005, 08:55 PM
 Prodater64 Free Member Join Date: Mar 2003 Location: Palma de Mallorca - España Posts: 2,925 Thanks: 0 Thanked 0 Times in 0 Posts
I was talking witn Amnon82 from d9 about HC-Qmatic, AutoCQ, and AutoQ2 (by Amnon82). All these tools do predict and encodes with differents encoders CCE > AutoQ2, HC Encoder > AutoQ2 and HC-Qmatic.
Both of us have problems with HC Encoder doubt to that program itself, as we all know.
But with AutoQ2 I talked with Amnon about prediction method and I proposed him my new prediction way with Incredible slicer function (he was using the function but with a ping pong ping pong ping pong ping pong approach):

Quote:
 Video=Mpeg2source("E:\DVD Authoring Working Folder\PB.d2v") ping = Video.slicer(1,15,1,"ping") pong = Video.slicer(1,15,1,"pong") last = ping++pong #crop, resize and filtering function slicer(clip input,int percent,int Goplenght,int Gopmulti,string "ping") { PercCount=(Framecount(input)/100)*percent period=int(Framecount(input)/PercCount)*(Goplenght*Gopmulti) input=(ping=="pong")?input.trim((period/2),Framecount(input)):input selectrangeevery(input,period,(Goplenght*Gopmulti) ) }
Now his tool is predicting matching 99.999% the target size.

Does somebody test it here?
#86
06-27-2005, 01:55 AM
 rds_correia Free Member Join Date: Apr 2003 Location: Chinese Democracy starts now! Posts: 2,563 Thanks: 1 Thanked 0 Times in 0 Posts
Wait, there no reason why his tool wouldn't be accurate doing ping-pong ping-pong ping-pong.
It just meant that it would take more time that's all.
You really should think if it's wise to share information with Avalon, he is a dangerous guy.
Even because he knew the old slicer but he might not know the latest slicer.
Cheers
__________________
Rui
#87
06-27-2005, 03:45 AM
 Prodater64 Free Member Join Date: Mar 2003 Location: Palma de Mallorca - España Posts: 2,925 Thanks: 0 Thanked 0 Times in 0 Posts
Quote:
 Originally Posted by rds_correia Wait, there no reason why his tool wouldn't be accurate doing ping-pong ping-pong ping-pong. It just meant that it would take more time that's all. Cheers
I don't say the usual method is inaccurate.
My "one pass ping pong method" could be more accurated than the original ping pong.
#88
06-27-2005, 05:15 AM
 rds_correia Free Member Join Date: Apr 2003 Location: Chinese Democracy starts now! Posts: 2,563 Thanks: 1 Thanked 0 Times in 0 Posts
Quote:
 Originally Posted by Prodater64 I don't say the usual method is inaccurate. My "one pass ping pong method" could be more accurated than the original ping pong.
The usual method is accurate.
It is just innacurate when used with an encoder that doesn't fully respect the given commands.
That is what is happening with HC.
You give it the right Q figure but it doesn't use it.
It tries to use it but when set for Max bitrate checking it will override the given Q.
And that's why it doesn't output an accurate OPV.
Yes, your method could be more accurate.
But when used with HC (in it's current release status) it shouldn't be accurate.
I'm saying *shouldn't*.
But that's something that I'll try tonight on a couple of movies.
Cheers
__________________
Rui
#89
06-27-2005, 05:54 AM
 Prodater64 Free Member Join Date: Mar 2003 Location: Palma de Mallorca - España Posts: 2,925 Thanks: 0 Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rds_correia
Quote:
 Originally Posted by Prodater64 I don't say the usual method is inaccurate. My "one pass ping pong method" could be more accurated than the original ping pong.
The usual method is accurate.
It is just innacurate when used with an encoder that doesn't fully respect the given commands.
That is what is happening with HC.
You give it the right Q figure but it doesn't use it.
It tries to use it but when set for Max bitrate checking it will override the given Q.
And that's why it doesn't output an accurate OPV.
Yes, your method could be more accurate.
But when used with HC (in it's current release status) it shouldn't be accurate.
I'm saying *shouldn't*.
But that's something that I'll try tonight on a couple of movies.
Cheers
Don't spend your time in that. As you say, it is not a problem with prediction. It is a problem with HC.
But if you want, you can do 2 predictions, with, maybe TMPGEnc, one with old method, one with my one, and post here results, please.
#90
06-27-2005, 06:26 AM
 rds_correia Free Member Join Date: Apr 2003 Location: Chinese Democracy starts now! Posts: 2,563 Thanks: 1 Thanked 0 Times in 0 Posts
Quote:
 Originally Posted by Prodater64 But if you want, you can do 2 predictions, with, maybe TMPGEnc, one with old method, one with my one, and post here results, please.
Oops didn't make myself clear.
That's actually what I had in mind but didn't explain correctly.
Cheers
__________________
Rui
#91
06-27-2005, 07:24 AM
 Dialhot Free Member Join Date: May 2003 Posts: 10,463 Thanks: 0 Thanked 0 Times in 0 Posts
Quote:
 Originally Posted by Prodater64 Now his tool is predicting matching 99.999% the target size.
And of course he added a line into the changelog to thanks Incredible and you for that, isn't it ?
#92
06-27-2005, 07:39 AM
 Prodater64 Free Member Join Date: Mar 2003 Location: Palma de Mallorca - España Posts: 2,925 Thanks: 0 Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Quote:
 Originally Posted by Prodater64 Now his tool is predicting matching 99.999% the target size.
And of course he added a line into the changelog to thanks Incredible and you for that, isn't it ?
The line for Incredible was before I talked with him.
My line was added in last version.
#93
06-27-2005, 06:52 PM
 incredible Free Member Join Date: May 2003 Location: Germany Posts: 3,189 Thanks: 0 Thanked 0 Times in 0 Posts
Amnon (AKA Avalon) is very well known!

I would be careful when sharing ANY developements or even thoughts with him. So many times he did not respect other people by their ideas and their developing spirits, then afterwards he excused and said "ok, that was a bad behaviour and I have changed", but if you turn your back to him ... his behaviour continues and thats a fact!

He always tries to catch personality and thats not only a talking of mine, you can see clearly that in his deeds and behaviours everywhere. Look at his type of talking and acting at doom9. At Delphi Praxis community for instance in a thread he "begged" for a way to show him how to parse avs files, after some imho useful replies there he did find out it by himself (orig. quote in the next post of that thread) but .... shurely he didnt post the code there nice isn't it. He TAKES but DOESN'T SHARE ... thats for me the conclusion.

My two cents for you Luis.
#94
06-27-2005, 07:13 PM
 kwag 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 Prodater64 I was talking witn Amnon82 from d9 about HC-Qmatic, AutoCQ, and AutoQ2 (by Amnon82)..............
Why are you doing this Luis
Aren't you aware that Amnon (alias Avalon) is "Persona Non Grata" in this forum
Aren't you aware of what he did
Are you aware that he can't program at all, and he uses other's code and says it's his
If doom9 wants to permit this, that is, letting someone who is known to steal other's ideas (Avalon), well so be it (that tells me A LOT about doom.9.org, btw).
But here, Avalon was kicked out of this site, exactly for those reasons. For stealing ideas, and saying they were his, and for not giving credit to others.
Just wanted to remind you of that

-kwag
#95
06-27-2005, 07:45 PM
 Prodater64 Free Member Join Date: Mar 2003 Location: Palma de Mallorca - España Posts: 2,925 Thanks: 0 Thanked 0 Times in 0 Posts
I will not condemn a person by his past actions.
There is no any present action of Amnon82 againts kvcd.net.
There is no any present action of Amnon82 againts me.
He gives me inmediately credit by my "one pass ping pong prediction" (OPPPP) method. He add a line for me in his thread and in his program.
I saw also an Incredible THX line.
All I am seeing is opposite to that you say me here.
Then I have not any reason to leave talking with him, interchanging knowledge.

And I would like to remark, that here, nobody, none of the people that read my last posts about "OPPPP" gives credit to it neither tested it.
Amnon82 test it inmediately, while we have a chating by messenger.

And at last, my code really is totally free as I release it without any kind of license, in a plain text file as a batch file is, and, of course, anybody can take it with any intention, and I can not do anything against that, neither I want to do.

Time will say me if you have reason or not. Thanks again.

Edited: I don't wanted to do this off topic, public. As I answered first rds advise by PM. But it seems that nobody remember moderators sub-forum.
#96
06-28-2005, 05:29 AM
 rds_correia Free Member Join Date: Apr 2003 Location: Chinese Democracy starts now! Posts: 2,563 Thanks: 1 Thanked 0 Times in 0 Posts
Quote:
 Originally Posted by Prodater64 Edited:... But it seems that nobody remember moderators sub-forum.
Hi Luis ,
Please don't take it worng, but perhaps this is an issue also to be discussed in the public part of the forum .
You see, Avalon's past is full of wrong things he did to anybody that was passing by near him.
Some were even very far from him but he tried to get closer just to rip their work.
I'm not talking about open code .
I'm talking about people - such as Hank315 - that have closed source but that he desperatly wants to help.
Why would he be so desperate to help Hank?
We all try to help Hank and many others everyday...
But we don't bug him every half an hour with something like hey, remember me? if you need help I'm here.
So it is obvious that some of us here want to make some points very much clear so that newbies - in the sense of newbies at kvcd.net but somewhat experienced in code development - don't fall in the same trap that Avalon has used so many times.
If you make a search at the HC sub-forum you will find one of my posts alerting Hank315 for such issues .
So, I see this as an issue to be taken care right here at the forum, and perhaps in the Mods room too if you want to go into more details.
That is my most honest oppinion.
As for your latest findings with the so called OPPPP, I just need some info from you to be able to test it.
I always use a 1% ping-pong-ping-ping-ping-...-final pong approach.
What settings do I need to use in OPPPP to compare with such an above approach?
Cheers
__________________
Rui
#97
06-28-2005, 05:45 AM
 Prodater64 Free Member Join Date: Mar 2003 Location: Palma de Mallorca - España Posts: 2,925 Thanks: 0 Thanked 0 Times in 0 Posts
Quote:
 Originally Posted by rds_correia As for your latest findings with the so called OPPPP, I just need some info from you to be able to test it. I always use a 1% ping-pong-ping-ping-ping-...-final pong approach. What settings do I need to use in OPPPP to compare with such an above approach? Cheers
About Amnon82: If he is gulty. How many time is the sentence. Does him be banned from here for ever, is a "perpetua" or for life sentence. I thanks all your advices, but I repeat, I don't know any bad action in the near present performed by Amnon82. Can you understand this.
If a person did a crime, hi was sentenced and go ahead with that. But if here we are applyng that sentence for ever, we punishing his faults with a harder sentence than murderer.

About the OPPPP, you need to compare it with a 2% usual pinp pong (I said this before) as minimal value you can use in slicer command is 1%.

Then your usual ping-pong will be:

slicer(2,15,1,"ping")

slicer(1,15,1,"ping")
slicer(1,15,1,"pong")

Your gopsize and goplenght can be any that you want, but always same in both Incredible and my methods.

Edited: In you case that usually do use 1% slicers, maybe don't give any advantage to use OPPPP, as it will take same time as before, and I don't think that difference be so big. But better is test it and see results.
#98
06-28-2005, 06:35 AM
 incredible Free Member Join Date: May 2003 Location: Germany Posts: 3,189 Thanks: 0 Thanked 0 Times in 0 Posts
I do put in in codetext, so monospaced Letters will keep the proportions ..

Code:
```Slicer(2,15,1,"ping") results in a prediction pass of ...

_________________________________________________________________________________________________

x.........x.........x.........x..........x..........x..........x..........x..........x..........x
_________________________________________________________________________________________________

Slicer(1,15,1,"ping") =

_________________________________________________________________________________________________

x...................x....................x.....................x.....................x...........
_________________________________________________________________________________________________

Slicer(1,15,1,"pong") =

_________________________________________________________________________________________________

..........x...................x.....................x.....................x.....................x
_________________________________________________________________________________________________

So if you do ..

a=Slicer(1,15,1,"ping")
b=Slicer(1,15,1,"pong")
return a+b

This means both streams will be appended:

AppendingPoint of
Moviecontend ping'ed                                              stream a and b                                     Same! Moviecontend but pong'ed
________________________________________________________________________________________________|_________________________________________________________________________________________________

x...................x....................x.....................x.....................x.....................x...................x.....................x.....................x.....................x
__________________________________________________________________________________________________________________________________________________________________________________________________

... but the real sampled movieinformation will be the same like ..

_________________________________________________________________________________________________

x.........x.........x.........x..........x..........x..........x..........x..........x..........x
_________________________________________________________________________________________________

... and thats Slicer(2,15,1, "ping").```
#99
06-28-2005, 09:39 AM
 rds_correia Free Member Join Date: Apr 2003 Location: Chinese Democracy starts now! Posts: 2,563 Thanks: 1 Thanked 0 Times in 0 Posts
@Andrej
So is it mathematically prooven that 1% OPPPP is exactly the same as 2% usual methods?
Because I'm getting ready to try this tonight but if it's scientifically prooven that results are exactly the same there's no reason to do it.
@Luis
I believe this is not the 1st time that Andrej points us this explanation.
Cheers
__________________
Rui
#100
06-28-2005, 01:20 PM
 Dialhot Free Member Join Date: May 2003 Posts: 10,463 Thanks: 0 Thanked 0 Times in 0 Posts
Be carrefull, the two options are not really equivalent : you don't have the same number of I pictures, and they are not generated at the same place.

In other words, you can't tell that Slicer(1,15,1,"ping")+Slicer(1,15,1,"pong") == Slicer(2,15,1, "ping")

Now, I can't tell you which one is more accurate than the other...

 Similar Threads Thread Thread Starter Forum Replies Last Post neptune Conversion et d'Encodage de Vidéo (Français) 3 11-09-2004 04:18 AM fabrice Avisynth Scripting 4 11-05-2004 11:53 AM m0rdant Video Encoding and Conversion 6 08-14-2004 10:17 AM zagor Avisynth Scripting 8 05-08-2004 03:06 PM Prodater64 Convertir y Codificar Video (Español) 13 04-02-2004 08:54 PM