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)

christopher 12-20-2002 01:24 PM

Quote:

Originally Posted by kwag
"The Green Mile" is done.

Roll the drums .|.|.|.|.|.|.
Here is the result:

Predicted file size: 662MB
Final file size ->>> 660,765KB :mrgreen:

Too early for a beer, but I'll have a couple tonight :lol:

-kwag

Great! Just had a Beamish Irish Stout. Its 1:30pm here....

kwag 12-20-2002 01:37 PM

Quote:

Originally Posted by christopher
Quote:

Originally Posted by kwag
"The Green Mile" is done.

Roll the drums .|.|.|.|.|.|.
Here is the result:

Predicted file size: 662MB
Final file size ->>> 660,765KB :mrgreen:

Too early for a beer, but I'll have a couple tonight :lol:

-kwag

Great! Just had a Beamish Irish Stout. Its 1:30pm here....

I'll settle for a "Samuel Adams" later on :D

-kwag

christopher 12-20-2002 01:50 PM

I've got some SA Cream Stout, Love it. Have your tried their Lite beer yet?

kwag 12-20-2002 02:00 PM

Quote:

Originally Posted by christopher
I've got some SA Cream Stout, Love it. Have your tried their Lite beer yet?

Never heard of that one :)

-kwag

rendalunit 12-20-2002 02:02 PM

I'm working on my fourth Meister Brau right now and it's 11 AM here- just kidding! :lol:

Hey Kwag,

have you tried Lanczos resizer with the LBR template? I'm really blown away by the sharpness of it. Lanczos is built into avisynth 2.06 and is a resizing option in the latest FitCD too :wink:

thanks,
ren

SansGrip 12-20-2002 02:03 PM

Great result, kwag! I'd have a beer right now, if there were any in the house ;).

This might be a little premature, but I'm getting some promising results with 50/48 and scene change detection OFF for this 1h59m movie...

kwag 12-20-2002 02:04 PM

Quote:

Originally Posted by rendalunit
I'm working on my fourth Meister Brau right now and it's 11 AM here- just kidding! :lol:

Hey Kwag,

have you tried Lanczos resizer with the LBR template? I'm really blown away by the sharpness of it. Lanczos is built into avisynth 2.06 and is a resizing option in the latest FitCD too :wink:

thanks,
ren

I forgot to try that in my script. I'll run another prediction now to see how the sample comes out on "The Green (kilometric :lol: )Mile". I'll post result here :D

-kwag

kwag 12-20-2002 02:07 PM

Quote:

Originally Posted by SansGrip
Great result, kwag! I'd have a beer right now, if there were any in the house ;).

Here, have a virtual beer :D

Quote:

This might be a little premature, but I'm getting some promising results with 50/48 and scene change detection OFF for this 1h59m movie...
I always leave scene change detection OFF, because I've seen TMPEG insert false I frames where there's no actual scene change. So I just leave it off. Same with "Soften Blocks". It works in reverse as advertized. If you turn it on and set 100-100, you see sharper macroblock edges. I've reported this to Pegasys, Inc, and they never responded :?

-kwag

SansGrip 12-20-2002 02:15 PM

Quote:

Originally Posted by kwag
I always leave scene change detection OFF, because I've seen TMPEG insert false I frames where there's no actual scene change.

I might be mistaken here, but I'm pretty sure it's enabled in the x3 template. Might want to check that when you release with the new GOP structure.

I just finished sampling with a new technique I'm using (basically the same kinda deal, just slightly more accurate I think) and will know in 3h34m how close it is...

By the way, do you know any details on exactly how much overhead there is on a VCD? VCDEasy seems to use a figure of muxed_size + around 11mb for its prediction.

kwag 12-20-2002 02:31 PM

Quote:

Originally Posted by SansGrip
I might be mistaken here, but I'm pretty sure it's enabled in the x3 template. Might want to check that when you release with the new GOP structure.

Turn it OFF 8O. And sorry about that. ALL templates should be set to OFF. I probably screwed up when I made the last update.
Quote:

I just finished sampling with a new technique I'm using (basically the same kinda deal, just slightly more accurate I think) and will know in 3h34m how close it is...
We'll be here drinking beer waiting for your result :D
Quote:

By the way, do you know any details on exactly how much overhead there is on a VCD? VCDEasy seems to use a figure of muxed_size + around 11mb for its prediction.
That number is about right. I don't have any references, but ~10 to ~11 MB is the fixed overhead structure on a VCD. That total will always be added to your mpeg files, no matter what size they are.

-kwag

SansGrip 12-20-2002 03:14 PM

Quote:

Originally Posted by kwag
We'll be here drinking beer waiting for your result :D

Bah :P. I'm going to call my wife and tell... er, ask her to pick up some on the way home :D.

Quote:

That number is about right. I don't have any references, but ~10 to ~11 MB is the fixed overhead structure on a VCD. That total will always be added to your mpeg files, no matter what size they are.
That explains why I had to overburn my last "100% accurate" encode :mrgreen:.

If my current test proves to be on the money I think I might have come up with an even more accurate way of doing it that shouldn't require an error margin (or, if it does, it should be very small). Basically instead of doing calculations in seconds I'm doing it with frames:

Target media = 80 minutes = 836,640,000 bytes
Frames in movie = 171,774
Audio size = 114,633,253 bytes
Padded audio size = 115,628,333 bytes
Sample points = 50
Sample length = 48 frames
Frames in sample = 2424 (:?: still don't know how SelectEvery arrives at this figure... it also gives 4848 for 100/48... any ideas? If we can't come up with a formula to duplicate its frame count I'll have to look at the source, or ask dividee ;))

Compensate for overhead:
836,640,000 - 11,534,336 = 825,105,664
Compensate for system stream:
825,105,664 * (2018 / 2048) = 813,019,155
Compensate for audio:
813,019,155 - 115,628,333 = 697,390,822

Final encode size = 697,390,822 bytes
Bytes per frame = 4,060
Target sample size = 4,060 * 2424 = 9,841,440 bytes

Theoretically this should bring us as close as possible to the correct result. I have a feeling that disabling scene change detection will help a great deal, and might explain why you always get more accurate predictions than me ;).

Does anyone see a problem with my theory/math?

black prince 12-20-2002 03:40 PM

Hi SansGrip and Kwag,

@SansGrip

Quote:

That number is about right. I don't have any references, but ~10 to ~11 MB is the fixed overhead structure on a VCD. That total will always be added to your mpeg files, no matter what size they are.
I believe this is true for VCDEasy, but Nero's padding is larger. :)

@Kwag

I have been using the script below and have a question about using
multiples of 30 for each hour of movie time (i.e. 2hrs * 30 = 60)?
Minority Report is 139 minutes or 2 hours 19 minutes.
I see some scripts using 50????? What's the rule and are you still
trying to determine the factor being used (i.e. 0.95, 0.98, 0.95555, etc.)

LoadPlugin("E:\DVD Backup\2 - DVD2SVCD\MPEG2DEC\MPEG2DEC.dll")
LoadPlugin("E:\DVD Backup\2 - DVD2SVCD\BlockBuster\BlockBuster.dll")
LoadPlugin("E:\DVD Backup\2 - DVD2SVCD\LegalClip\LegalClip.dll")
mpeg2source("D:\Temp\movie.d2v")
#
IL = Framecount / 60
SL = round(Framerate) * 2
SelectRangeEvery(IL, SL)
#
LegalClip()
LanczosResize(496,448)
Blockbuster( method="noise", detail_min=1, detail_max=10, variance=1, seed=1 )
AddBorders(16,16,16,16)
LegalClip()



-black prince

black prince 12-20-2002 04:37 PM

Hey SansGrip,

Just did a test file prediction using Tmpgenc's Clip Frame. The test file
size using Clip Frame is 18,483,997 and without 20,305,188. I believe
you felt there should be no significant decrease in file size just by
masking borders. This shows a 2MB decrease with no change in
picture quality. What could be happening during Tmpgenc's mask
that accounts for this decrease :?

-black prince

SansGrip 12-20-2002 04:39 PM

Quote:

Originally Posted by black prince
I believe you felt there should be no significant decrease in file size just by masking borders. This shows a 2MB decrease with no change in picture quality. What could be happening during Tmpgenc's mask that accounts for this decrease :?

I'm really not sure. If your Avisynth script is correct, theoretically there should be no difference whatsoever. Could you post your complete script?

Edit: I'm glad you brought this up again. I really want to thrash this out, because that's a serious gain in compressibility...

black prince 12-20-2002 04:46 PM

Hey SansGrip,

Quote:

Could you post your complete script?
LoadPlugin("E:\DVD Backup\2 - DVD2SVCD\MPEG2DEC\MPEG2DEC.dll")
LoadPlugin("E:\DVD Backup\2 - DVD2SVCD\BlockBuster\BlockBuster.dll")
LoadPlugin("E:\DVD Backup\2 - DVD2SVCD\LegalClip\LegalClip.dll")
mpeg2source("D:\Temp\movie.d2v")
#
IL = Framecount / 60
SL = round(Framerate) * 2
SelectRangeEvery(IL, SL)
#
LegalClip()
LanczosResize(496,448)
Blockbuster( method="noise", detail_min=1, detail_max=10, variance=1, seed=1 )
AddBorders(16,16,16,16)
LegalClip()


I ran this script using CQ_VBR=11 and without Clip Frame file size = 20,305,188
With Clip Frame file size = 18,483,997. This is KVCDx3 (528x480) :)

-black prince

SansGrip 12-20-2002 04:48 PM

Quote:

Originally Posted by black prince
I ran this script using CQ_VBR=11

I notice you're not cropping in the script. How big are the "black" borders around the original, non-resized frame?

black prince 12-20-2002 04:57 PM

@SansGrip,

Quote:

I notice you're not cropping in the script. How big are the "black" borders around the original, non-resized frame?
I believe LanczosResize will automatically crop to resize :) When I
view this script with Tmpgenc Clip Frame the borders for masking
seem correct for the aspect ratio from FitCD (16,16,16,16) or
TV-overscan #2. :)

-black prince

SansGrip 12-20-2002 05:02 PM

Quote:

Originally Posted by black prince
I believe LanczosResize will automatically crop to resize :)

The Avisynth resizing filters only resize -- none of them crop. Make a simple .avs with just the following:

Code:

Mpeg2Source("...")
and load it into TMPGEnc. Use the mask dialog to figure out the size of the existing borders on the frame, then let me know what they are and I'll post an updated version of your script to crop them in Avisynth. I think this might be what's causing the difference.

SansGrip 12-20-2002 05:57 PM

The results are in :). Untouchables, 1h59m, new GOP, no scene-change detection, 50/48.

Target file size of video: 706,804kb
Actual size of video: 697,068kb
Difference: 9,736kb = 1.39%

Not bad -- looks like I can go ahead and code this new method up and then play a little more with the sample points/sample length settings...

kwag 12-20-2002 06:12 PM

Quote:

Originally Posted by SansGrip
The results are in :). Untouchables, 1h59m, new GOP, no scene-change detection, 50/48.

Target file size of video: 706,804kb
Actual size of video: 697,068kb
Difference: 9,736kb = 1.39%

Not bad -- looks like I can go ahead and code this new method up and then play a little more with the sample points/sample length settings...

How does "Untouchables" look SansGrip :?:

-kwag


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