Quantcast CQ vs. CQ_VBR ... Very Interesting... - Page 20 - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Avisynth Scripting

Reply
 
LinkBack Thread Tools
  #381  
01-07-2003, 06:10 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 SansGrip ,

I'll run a couple of tests to see if I can reproduce that. Maybe just setting the minimum notch area to 8 will solve the problem
Can you make that change and test that same sample and see if you see that red artifact again Just change the two 6's and the 7 on the upper left corner of the matrix to 8 and run that test again on that part

-kwag
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
  #382  
01-07-2003, 07:08 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Can you make that change and test that same sample and see if you see that red artifact again
Yep, I'll do that as soon as this encode is finished (1h40m) .
Reply With Quote
  #383  
01-07-2003, 07:53 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
I just finished the movie "The Matrix" ( Which I have encoded now around 10+ times for test purposes ), but now with KVCDx3. The results are better that anything I had previously done with that movie .
Here's a minute and a half sample of what the complete 136 minute film looks like on one CD, thanks to your filters SansGrip , the new GOP, prediction, CQ=64, BETA-1 matrix ( Yes, I did it with that one, unless the 8's fix the error you pointed out and I'll have to re-encode again )
http://www.kvcd.net/matrix.cq.beta1mat.sample.m1v

Here's the .avs I used:

Code:
LoadPlugin("C:\encoding\MPEG2DEC.dll")
LoadPlugin("C:\encoding\fluxsmooth.dll")
LoadPlugin("C:\encoding\blockbuster.dll")
LoadPlugin("C:\encoding\legalclip.dll")
LoadPlugin("C:\encoding\sampler.dll")

Mpeg2Source("F:\THE_MATRIX_16X9LB_N_AMERICA\VIDEO_TS\matrix-dvd2avi-176.d2v")
LegalClip()
BilinearResize(496,256,12,62,696,356)
FluxSmooth()
Blockbuster(method="noise", variance=.3, seed=1)
#AddBorders(16,112,16,112)
LegalClip()

#Sampler(length=24)
## MPEG size = ((Total frames/MovieTimeInMinutes)/24) * MPEG sample file size ##
-kwag
Reply With Quote
  #384  
01-08-2003, 05:35 AM
GFR GFR is offline
Free Member
 
Join Date: May 2002
Posts: 438
Thanks: 0
Thanked 0 Times in 0 Posts
AviSource("D:\Captures\MSMurders\capture_1.00.avi" ) + AviSource("D:\Captures\MSMurders\capture_1.01.avi" ) + AviSource("D:\Captures\MSMurders\capture_1.02.avi" ) + AviSource("D:\Captures\MSMurders\capture_1.03.avi" )

You can use

SegmentedAviSource("D:\Captures\MSMurders\capture_ 1.avi")

and it will load all four files automatically.
Reply With Quote
  #385  
01-08-2003, 05:52 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by GFR
AviSource("D:\Captures\MSMurders\capture_1.00.avi" ) + AviSource("D:\Captures\MSMurders\capture_1.01.avi" ) + AviSource("D:\Captures\MSMurders\capture_1.02.avi" ) + AviSource("D:\Captures\MSMurders\capture_1.03.avi" )

You can use

SegmentedAviSource("D:\Captures\MSMurders\capture_ 1.avi")

and it will load all four files automatically.
Remember to delete the dummy .avi file if it exists, VirtualDub creates it if you use it for capturing. It's the last file with no video content in it. If you don't delete it, you might get an access violation when using SegmentedAVISource.
Reply With Quote
  #386  
01-08-2003, 05:55 AM
gonzopdx gonzopdx is offline
Free Member
 
Join Date: Dec 2002
Location: Corvallis, OR
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
I just finished the movie "The Matrix" ( Which I have encoded now around 10+ times for test purposes ), but now with KVCDx3. The results are better that anything I had previously done with that movie .
Here's a minute and a half sample of what the complete 136 minute film looks like on one CD, thanks to your filters SansGrip , the new GOP, prediction, CQ=64, BETA-1 matrix ( Yes, I did it with that one, unless the 8's fix the error you pointed out and I'll have to re-encode again )
http://www.kvcd.net/matrix.cq.beta1mat.sample.m1v

Here's the .avs I used:

Code:
LoadPlugin("C:\encoding\MPEG2DEC.dll")
LoadPlugin("C:\encoding\fluxsmooth.dll")
LoadPlugin("C:\encoding\blockbuster.dll")
LoadPlugin("C:\encoding\legalclip.dll")
LoadPlugin("C:\encoding\sampler.dll")

Mpeg2Source("F:\THE_MATRIX_16X9LB_N_AMERICA\VIDEO_TS\matrix-dvd2avi-176.d2v")
LegalClip()
BilinearResize(496,256,12,62,696,356)
FluxSmooth()
Blockbuster(method="noise", variance=.3, seed=1)
#AddBorders(16,112,16,112)
LegalClip()

#Sampler(length=24)
## MPEG size = ((Total frames/MovieTimeInMinutes)/24) * MPEG sample file size ##
-kwag
@kwag

I still don't understand how you possibly get such high CQ values, ESPECIALLY with a high-action movie like The Matrix at 528x480.

The last encode I did was Jay & Silent Bob -- it's about 97 minutes, low action, at 528x480. Audio 128k (about 85 megs). Using an almost identical script (tried adding/removing BB -- this didn't make much difference), new GOP (1/12/2/1/24), Beta-1 Matrix, CQ of 50 was too much to fit on one disc -- I had to overburn. I am using scripts almost identical to yours and the same methods.

What am I missing here? I'm racking my brain. How do you do it?
Reply With Quote
  #387  
01-08-2003, 05:58 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
What's the aspect ratio of the movie? If there's a lot of black, it compresses very well.
Reply With Quote
  #388  
01-08-2003, 06:31 AM
gonzopdx gonzopdx is offline
Free Member
 
Join Date: Dec 2002
Location: Corvallis, OR
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
What's the aspect ratio of the movie? If there's a lot of black, it compresses very well.
Yes, I know.. it's a widescreen movie, I believe 2.35:1 or 1.85:1.

Using TMPGEnc 2.58 (I heard about some issues with 2.59).
Reply With Quote
  #389  
01-08-2003, 07:59 AM
GFR GFR is offline
Free Member
 
Join Date: May 2002
Posts: 438
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Remember to delete the dummy .avi file if it exists, VirtualDub creates it if you use it for capturing. It's the last file with no video content in it. If you don't delete it, you might get an access violation when using SegmentedAVISource.
But,

Quote:
I've just finished an episode of Midsomer Murders - after taking out the adverts it is 1hr 45 minutes and it fits on two CD's at 544x576. It looks superb! I captured in AVI_IO (the best capture program available) at 544x576 so i don't have to resize. I do the Cropping in TMpeg for the time being. Here is my script:
with AVI_IO you don't need to worry about that.
Reply With Quote
  #390  
01-08-2003, 08:12 AM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hey gonzopdx,

Quote:
LoadPlugin("C:\encoding\MPEG2DEC.dll")
LoadPlugin("C:\encoding\fluxsmooth.dll")
LoadPlugin("C:\encoding\blockbuster.dll")
LoadPlugin("C:\encoding\legalclip.dll")
LoadPlugin("C:\encoding\sampler.dll")

Mpeg2Source("F:\THE_MATRIX_16X9LB_N_AMERICA\VIDEO_ TS\matrix-dvd2avi-176.d2v")
LegalClip()
BilinearResize(496,256,12,62,696,356)
FluxSmooth()
Blockbuster(method="noise", variance=.3, seed=1)
#AddBorders(16,112,16,112)
LegalClip()

#Sampler(length=24)
## MPEG size = ((Total frames/MovieTimeInMinutes)/24) * MPEG sample file size ##
Kwag's resize for 528x480 is 496x256 and the movie is widescreen 16:9
letter box to start with. If he cuts out credits and uses heavy softening,
he could raise CQ even higher. The new GOP and Q-Matrix compresses
even more. I usually resize 528x480 to 496x336 and still get a CQ in the
high 50's. On STD 27" TV, Kwag's movie would look somewhat flat,
because of the heavy letterbox.

-black prince
Reply With Quote
  #391  
01-08-2003, 08:45 AM
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 black prince
On STD 27" TV, Kwag's movie would look somewhat flat,
because of the heavy letterbox.
But that's the original aspect for that movie . If I resize to something else taller, people will look streched

-kwag
Reply With Quote
  #392  
01-08-2003, 09:49 AM
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
You guys think we were done with GOP and matrix. Think again :
In theory, a GOP of 1-12-2-1-24 should compress more than 1-12-1-1-24 right , WRONG ( At least with TMPEG in CQ mode ). After reading the previous posts about the small "flashing" effect and always trying to optimize more on the DCT level and artifacts, I ran a test to drop the B frames from 2 to 1, but keeping the size of GOP at 24. Look at the result. I don't even need to circle with red , you should see clearly the difference (You might have to blow up the images):



No filters used here. Only LegalClip(). The funny thing is that with CQ=65 on the 1-12-1-1-24, the file size is actually smaller than CQ=64 with 1-12-2-1-24
Sample file size for 1-12-2-1-24 = 14,430KB
Sample file size for 1-12-1-1-24 = 14,380KB

Would anyone be so kind and try this, to see if I'm still dreaming, or if it's true
Playing back my 1-12-1-1-24 sample, seems to be more smoother and less visible artifacts in the overall picture. Specially the background areas, where there was more movement on stills images.

Edit: This changes each GOP to IBPBPBPBPBPBPBPBPBPBPBPB instead of IBBPBBPBBPBBPBBPBBPBBPBB

-kwag
Reply With Quote
  #393  
01-08-2003, 10:10 AM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by gonzopdx
I still don't understand how you possibly get such high CQ values, ESPECIALLY with a high-action movie like The Matrix at 528x480.
If the encoder doesn't have enough bits it simply makes macroblocks. This is often not noticible when things are moving fast, but you'll see it clearly if you freeze-frame. Of course, the problem is worse when you use very high resolutions with a low bitrate.

I just did a test encode with The Fifth Element (from AVI), 2h2m, and used a CQ of 64 at 528x480. It's very widescreen, though, probably between 1.85:1 and 2.35:1. This means big borders and lots of compression. I also used fairly heavy smoothing.

Bear in mind that kwag uses two overscan blocks when he resizes, and that makes quite a difference. Try encoding two samples, one with no overscan blocks and one with two overscan blocks. You'll see a significant difference in file size.
Reply With Quote
  #394  
01-08-2003, 10:12 AM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by black prince
The new GOP and Q-Matrix compresses
even more.
The new GOP compresses more but the new Q-matrix compresses less. My last encode dropped from CQ 64 to 58 with the new matrix. This is because it -- by design -- does not quantize low frequencies as aggressively as the old.
Reply With Quote
  #395  
01-08-2003, 10:18 AM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
In theory, a GOP of 1-12-2-1-24 should compress more than 1-12-1-1-24 right , WRONG
Like you I'm suspicious. B-frames are significantly smaller than both I- and P-frames: in my last encode, my I-frames were 13,985 bytes on average, my P-frames were 4,601 and my B-frames were 2,785. Based on that it should be the case that fewer B-frames means much less compression...

Quote:
Look at the result. I don't even need to circle with red , you should see clearly the difference (You might have to blow up the images)
It's certainly a very clear difference. But where are those extra bits coming from?

Quote:
Would anyone be so kind and try this, to see if I'm still dreaming, or if it's true
I'll try it right after I run the artifact test (something came up last night)!

Did you encode the whole movie with those settings? I'd be interested to know if prediction still holds true...
Reply With Quote
  #396  
01-08-2003, 10:38 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by GFR
Quote:
Remember to delete the dummy .avi file if it exists, VirtualDub creates it if you use it for capturing. It's the last file with no video content in it. If you don't delete it, you might get an access violation when using SegmentedAVISource.
But,

with AVI_IO you don't need to worry about that.
Oops..I didn't notice that you used AVI_IO. My bad
Reply With Quote
  #397  
01-08-2003, 10:40 AM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
@kwag

I ran the artifact test and the problem I highlighted is indeed gone when I use 8 as a minimum. That said, now I see similar artifacts in the left-hand side of the frame.

Using a lot of 8s in a frame has never worked for me -- while theoretically it should give best quality, if you single-step through the frames you'll see serious degeneration in the P- and B- frames...
Reply With Quote
  #398  
01-08-2003, 10:56 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Kwag, you've created another monster

I did a quick-and-dirty test, and *drum roll*

CQ_VBR file size increased when B frames set to 1 (CQ_VBR value 17,3)

It went from 11,712 to 13219.

CQ file size decreased when B frames set to 1 (CQ value 60)

It went from 6,547 to 6,231.

Uh oh. Looks like this will be another chaotic TMPGEnc test session for you lads.
Reply With Quote
  #399  
01-08-2003, 10:57 AM
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 SansGrip

Did you encode the whole movie with those settings? I'd be interested to know if prediction still holds true...
I only encoded the sampler. There is clearly a better visual experience, at least viewed on the computer. Where are the extra bits coming from I agree with you. I don't know
I'm going to encode 5 minutes with each GOP and see if the file sizes maintain their consistency.

-kwag
Reply With Quote
  #400  
01-08-2003, 10:58 AM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
Uh oh. Looks like this will be another chaotic TMPGEnc test session for you lads.
Great .
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Interesting results with YlevelsS supermule Avisynth Scripting 2 08-06-2006 11:59 PM
Avisynth: Interesting ASharp phenomenon... audioslave Avisynth Scripting 12 10-23-2003 06:36 AM
Interesting info about the Luminance Level in CCE digitalize Video Encoding and Conversion 0 04-28-2003 12:29 PM
A couple of interesting links.. kwag Off-topic Lounge 0 12-31-2002 03:47 PM
KVCD: Interesting poll found kwag Video Encoding and Conversion 2 12-31-2002 02:44 AM




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