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)

muaddib 12-22-2002 11:46 AM

Quote:

Originally Posted by kwag
:oops: I must go back to sleep 8O
You are correct. Maybe I should step away from the computer for a couple of hours :lol:

8O Don't do that! 8O
We need you right here! :D

SansGrip 12-22-2002 11:48 AM

Quote:

Originally Posted by muaddib
And I just thought that this "supposed" missing frame would be the "information" frame that we talk on the other thread. :mrgreen:

I looked into that and displaying the info for the Avisynth 2.0 version would be easy, but I'd need to modify some code (someone else's code, to be precise) to make it work with 2.5, so it's still on the to-do list :).

kwag 12-22-2002 12:31 PM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
And the correct lines are what you posted:

MI = (Framecount/Framerate)/60
IL = round(Framecount/MI)
SL = round(Framerate)
SelectRangeEvery(IL,SL)

Also correct is:

Sampler(minutes, 24)

:mrgreen:

You see, I come back here and feel like a :P because my :idea: are burned for the day so I'm 8O at my own stupidity. :twisted:
I really think I should go back to sleep and recharge my neurons :?
I just keep dragging the old legacy methods around :lol:

:mrgreen:
-kwag

SansGrip 12-22-2002 12:52 PM

Quote:

Originally Posted by kwag
You see, I come back here and feel like a :P because my :idea: are burned for the day so I'm 8O at my own stupidity. :twisted:

Ah, I couldn't even form a sentence this morning until I'd had at least 3 cups of caffeine ;).

Quote:

I just keep dragging the old legacy methods around :lol:
Well the nice thing about Sampler is that it's not only easier to use but as muaddib pointed out it's also more accurate. When we're talking about sampling not even 2% of the movie, every frame counts.

Oh, and as of 0.2 we don't need to "fix" the Source Range to stop TMPGEnc trying to encode the whole movie :).

kwag 12-22-2002 01:05 PM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
You see, I come back here and feel like a :P because my :idea: are burned for the day so I'm 8O at my own stupidity. :twisted:

Ah, I couldn't even form a sentence this morning until I'd had at least 3 cups of caffeine ;).

You're ahead of me by 2 cups :lol:
Quote:

Quote:

I just keep dragging the old legacy methods around :lol:
Well the nice thing about Sampler is that it's not only easier to use but as muaddib pointed out it's also more accurate. When we're talking about sampling not even 2% of the movie, every frame counts.

So then instead of Sampler( 120, 24 ), or any other hard coded nubers, we can automate it like this:

Code:

Minutes = round((Framecount/Framerate)/60 )
SL = round(Framerate)
Sampler(Minutes, SL)

:wink:

-kwag

Racer99 12-22-2002 01:37 PM

Hey Kwag,

Don't worry about it, it's just us other enthusiasts. I got your back. With all the hard work you've put in lately combined with the lack of sleep, it's incredible that you got it even close. Keep up the faith.

Racer99

gonzopdx 12-22-2002 02:14 PM

Quote:

Originally Posted by SansGrip
When we're talking about sampling not even 2% of the movie, every frame counts.

So to make sure I got this right -- when using KVCDP, sample points should equal the length of the movie in minutes and error margin should be 2%?

black prince 12-22-2002 02:34 PM

Hi SansGrip,

Would AutoCrop accomplish the same thing as Tmpgenc's Clip Frame or
FitCD's crop, but do it automatically :?: Here's the link:

http://forum.doom9.org/showthread.ph...light=AutoCrop

What do you think :)

-black prince

kwag 12-22-2002 02:41 PM

This is just to report that I finished a complete encode (again) of "The Green Mile" that I started last night. On my Celeron 1Ghz it took 10 hours 52 minutes 8O . But here are the results:

Predicted file size with MovieInMinutes:24 (180:24 ) was 659,323KB
Final encoded file size: 650,042KB.

Difference of 9,281KB for a 180 minute film. That is ~1.40% difference.
So I can see that the results with the new method are extremely accurate. This was with a %factor of 1.0, not with 0.98, as it should have been.

-kwag

black prince 12-22-2002 02:50 PM

Hi All,

Tried the new file predictor for Minority Report which I previously
encoded using an old formula and CQ_VBR=12.34. The final movie
(audio+video) = 1,538,867,346. I didn't fill the entire 2 CDs. The new
formula increased my CQ_VBR to 12.903 and guess what 8O
it came out perfect at 1,593,434,274. :D It's so close to 1.6GB
I was floored 8O Great job Kwag and SansGrip. :D :D :D

My aduio formula is off for calculating mp2 file size. I'm using

((audio bitrate) / 8 ) * Movie time in seconds = audio file size

The results always seem to be a little greater than Headac3he.

-black prince

SansGrip 12-22-2002 03:05 PM

Quote:

Originally Posted by kwag
So then instead of Sampler( 120, 24 ), or any other hard coded nubers, we can automate it like this

We could, but personally I find Sampler(minutes, 24) easier to understand and less easy to mistype ;). However, I could change Sampler so that "samples" defaults to minutes-in-movie and "length" defaults to one second.

When you say SL=Round(Framerate) etc. are you sure you really mean that? I think it should be SL=24, since we're going by GOP length not frame rate. The two just happen to coincide at the moment...

SansGrip 12-22-2002 03:08 PM

Quote:

Originally Posted by grivad
So to make sure I got this right -- when using KVCDP, sample points should equal the length of the movie in minutes and error margin should be 2%?

I believe that should work. I'm not 100% confident because KVCDP 0.2 was written with the old prediction formula in mind, but my initial thoughts are that since our new GOP length happens to correspond to the frame rate, it should work regardless.

But yes, you'll definitely need to set the sample points to the length of the movie in minutes. That won't be necessary in the next version.

SansGrip 12-22-2002 03:13 PM

Quote:

Originally Posted by black prince
Would AutoCrop accomplish the same thing as Tmpgenc's Clip Frame or FitCD's crop, but do it automatically :?:

Theoretically, yes. To be honest I have my doubts about how well an automated process would be able to properly detect borders (it may work 9 times out of 10, but if you have to keep checking each time it runs then you might as well just do it yourself and be sure).

The filter appears still to be in alpha or beta, and my reading of the thread is that it doesn't preserve aspect ratio yet, which makes it interesting but not very useful. With some work, though, it could be an excellent filter -- I see no reason why the whole FitCD process couldn't be automated fairly successfully provided the filter was very careful and "alerted" the user if anything didn't look right. 3-12 hours or so is a long time to wait to find out your autocropper threw a fit ;).

kwag 12-22-2002 03:14 PM

Quote:

Originally Posted by SansGrip
When you say SL=Round(Framerate) etc. are you sure you really mean that? I think it should be SL=24, since we're going by GOP length not frame rate. The two just happen to coincide at the moment...

Yes, you're right. We're going by GOP, and it should be fixed to 24. So that simplifies it to:

Code:

Minutes = round((Framecount/Framerate)/60 )
Sampler(Minutes, 24)

I still think this is simpler than having to find out the running time of any movie. Just attach the code to the end of any .avs script, and the sample will always be correct without any human errors :D

-kwag

SansGrip 12-22-2002 03:14 PM

Quote:

Originally Posted by black prince
it came out perfect at 1,593,434,274

8O

Quote:

My aduio formula is off for calculating mp2 file size. I'm using
I always encode the audio first. That way I know precisely how big it is :).

SansGrip 12-22-2002 03:41 PM

Check here for a new Sampler, this time with very helpful defaults. From now on (at least until we change the formula again) all you'll need to add to your scripts is:

Code:

Sampler()
I can't make it much easier without renaming the filter to just "S" :mrgreen:.

SansGrip 12-22-2002 03:49 PM

Re-encoded Resident Evil at 352x480 with 400 min bitrate, slightly more smoothing, slightly less noise, and a slightly higher CQ_VBR (15.63 instead of 15.55). Of course I also used the new GOP and formula.

Target size: 716,523,242
Actual size: 711,603,443
Difference: 0.69%

Not bad, not bad 8).

kwag 12-22-2002 03:50 PM

Quote:

Originally Posted by SansGrip
Check here for a new Sampler, this time with very helpful defaults. From now on (at least until we change the formula again) all you'll need to add to your scripts is:

Code:

Sampler()
I can't make it much easier without renaming the filter to just "S" :mrgreen:.

:mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen:
Or "SG" For SansGrip :idea:

-kwag

black prince 12-22-2002 08:11 PM

@SansGrip,

Quote:

I always encode the audio first. That way I know precisely how big it is .
I have a semi-automated process for file prediction (FitCD is the exception)
which calculates the audio file size and subtracts this from the number
of CD's (1 or 2) to determine the video target file size. It's close enough
now. It's usually only ~2mb larger then than the acutal audio size. :)

Quote:

The filter appears still to be in alpha or beta, and my reading of the thread is that it doesn't preserve aspect ratio yet, which makes it interesting but not very useful. With some work, though, it could be an excellent filter -- I see no reason why the whole FitCD process couldn't be automated fairly successfully provided the filter was very careful and "alerted" the user if anything didn't look right. 3-12 hours or so is a long time to wait to find out your autocropper threw a fit .
This sounds like another project. This would be especially useful for
automated processes as "acp" on this forum. We have been trying to
find a way to intergrate a "FitCD" a like filter into our avs script. :D
Until Kwag created "SweetHead" we had to use BeSweet instead of
Headac3he for example. At low audio bitrates Head is da BOMB. :mrgreen:


-black prince

SansGrip 12-22-2002 08:40 PM

Quote:

Originally Posted by black prince
We have been trying to find a way to intergrate a "FitCD" a like filter into our avs script. :D

It would be useful, but I'm guessing it would be quite hard to determine borders automatically. It sounds easy but I don't think it would be :).

Quote:

Until Kwag created "SweetHead" we had to use BeSweet instead of
Headac3he for example. At low audio bitrates Head is da BOMB. :mrgreen:
I've always had a lot of luck with SCMPX -- it seems to produce really good quality even at low bitrates. I've never tried it lower than 128 though.

kwag 12-22-2002 08:52 PM

Quote:

Originally Posted by SansGrip
I've always had a lot of luck with SCMPX -- it seems to produce really good quality even at low bitrates. I've never tried it lower than 128 though.

I think SCMPX is as good as HeadAC3he, but it's a slower encoder. Still it's excelent. :wink:

-kwag

kwag 12-22-2002 08:53 PM

Quote:

Originally Posted by kwag
Quote:

Originally Posted by SansGrip
I've always had a lot of luck with SCMPX -- it seems to produce really good quality even at low bitrates. I've never tried it lower than 128 though.

I think SCMPX is as good as HeadAC3he, but it's a slower encoder. Still it's excelent. :wink:
Only problem is tht if you want to encode "Surround 2" sound, you need to convert AC3 to WAV with Mediator, in order to encode with SCMPX :roll:

-kwag


kwag 12-22-2002 08:54 PM

Quote:

Originally Posted by SansGrip
I've always had a lot of luck with SCMPX -- it seems to produce really good quality even at low bitrates. I've never tried it lower than 128 though.

I think SCMPX is as good as HeadAC3he, but it's a slower encoder. Still it's excelent. :wink:

Edit: Only problem is if you want "Dolby Surround 2" audio, you need to convert the AC3 audio to WAV in order to use SCMPX to encode :roll: .

-kwag

SansGrip 12-22-2002 08:59 PM

Quote:

Originally Posted by kwag
Only problem is if you want "Dolby Surround 2" audio, you need to convert the AC3 audio to WAV in order to use SCMPX to encode[/color] :roll: .

I always encode audio through TMPGEnc (external encoders), and it makes a temporary wav anyway.

kwag 12-22-2002 09:02 PM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
Only problem is if you want "Dolby Surround 2" audio, you need to convert the AC3 audio to WAV in order to use SCMPX to encode[/color] :roll: .

I always encode audio through TMPGEnc (external encoders), and it makes a temporary wav anyway.

But you're not retaining the dolby surround 2 mode, AKA: Dolby Prologic II. That's the beauty of HeadAC3he. It encodes the .mp2 with that feature. SCMPX doesn't do that. The sound is very close to Dolby 5.1 if you encode with this mode turned on.

-kwag

jorel 12-22-2002 09:06 PM

about:
"It would be useful, but I'm guessing it would be quite hard to determine borders automatically. It sounds easy but I don't think it would be . "

i post this link before,but don't remember where......
it's about autoboarder.....:
neopholus (in doom9) make a script for me to make vcds.
maybe it could help! :wink:

http://forum.doom9.org/showthread.ph...6&pagenumber=2

SansGrip 12-22-2002 09:16 PM

Quote:

Originally Posted by kwag
But you're not retaining the dolby surround 2 mode, AKA: Dolby Prologic II.

I've never even heard of that 8O. How does it differ from regular ProLogic? Why does resampling as PCM not retain the surround information?

kwag 12-22-2002 09:31 PM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
But you're not retaining the dolby surround 2 mode, AKA: Dolby Prologic II.

I've never even heard of that 8O. How does it differ from regular ProLogic? Why does resampling as PCM not retain the surround information?

It is retained. The problem is in the encoding. There is a difference between regular "Dolby Surround" and "Dolby Prologic II". I'm not sure what is the algo used, but I tested a regular WAV encoded with TMPEG at 160Kbps, and the same thing encoded with HeadAC3he as "Dolby Surround 2" and I couldn't believe the sound effects. I think it has to do with the actual separation of rear channels, where in regular surround, rear speakers are one channel. Don''t flame me here 8O . I'm no audio expert :P . This is what I've read, but my ears tell me a HUGE difference between the encodes. BTW: If you run DVD2SVCD, you'll notice that on the Audio tab and then click on the down arrow besides the little folder besides BeSweet, you get a popup dialog that let's you select "Stereo downmix type" . It defaults to "Surround." But you'll see that it has a "Surround 2" option :wink:

-kwag

SansGrip 12-22-2002 09:35 PM

Quote:

Originally Posted by kwag
It is retained. The problem is in the encoding. There is a difference between regular "Dolby Surround" and "Dolby Prologic II".

Ok, so assuming I demux the AC3 with DVD2AVI as usual, what do I need to do to encode the audio with ProLogic II? I really want to try this because I have a nice surround setup and regular ProLogic just doesn't really cut it for me after AC3 ;).

kwag 12-22-2002 09:45 PM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
It is retained. The problem is in the encoding. There is a difference between regular "Dolby Surround" and "Dolby Prologic II".

Ok, so assuming I demux the AC3 with DVD2AVI as usual, what do I need to do to encode the audio with ProLogic II? I really want to try this because I have a nice surround setup and regular ProLogic just doesn't really cut it for me after AC3 ;).

Get HeadAC3he, and when you run it, select "Surround 2" on downmix type on the channel configuration screen ( At the bottom ). Also make sure you select "Dual Channel" NOT STEREO. It makes a hell of a difference on the surround signals being carried to your receiver. If you encode as "Stereo", the small adjacent channel interference from one channel to the other can dampen your dolby surround signals, and your receiver may not detect your channel separation signals correctly. When you encode as "Dual Channel" each channel is 100% independent of each other. That is, adjacent channel rejection is i believe >100db, so basically it's like two independent mono channels.

-kwag

SansGrip 12-22-2002 10:12 PM

Quote:

Originally Posted by kwag
Get HeadAC3he, and when you run it, select "Surround 2" on downmix type on the channel configuration screen ( At the bottom ). Also make sure you select "Dual Channel" NOT STEREO.

And then just encode as mp2?

Does this only work for AC3 sources? Do all AC3 sources contain ProLogic II information, or just some? If just some, how can I tell which do and which don't? Do I need the 5.1 AC3 or can I use the 2-channel AC3, assuming the DVD contains both?

kwag 12-22-2002 10:24 PM

Quote:

Originally Posted by SansGrip
And then just encode as mp2?

Right!
Quote:


Does this only work for AC3 sources? Do all AC3 sources contain ProLogic II information, or just some? If just some, how can I tell which do and which don't? Do I need the 5.1 AC3 or can I use the 2-channel AC3, assuming the DVD contains both?
What it's doing is down mixing the AC3 ( Digital 5.1 ) channels to Dolby Surround Mode 2. If your DVD has a DD 3/2 channel, use that channel. Just make sure you pick the right channel, as viewed on DVD2AVI preview. That's the channel I always convert to .mp2, usually Channel 1 :wink:

-kwag

SansGrip 12-22-2002 10:32 PM

Quote:

Originally Posted by kwag
What it's doing is down mixing the AC3 ( Digital 5.1 ) channels to Dolby Surround Mode 2. If your DVD has a DD 3/2 channel, use that channel.

Ok. I usually pull off just the 2-channel version if there is one, since it's smaller. But if the ProLogic II information is only in the 5.1 version then I'll make sure to get that. Maybe it's time to ask Dr Google about ProLogic II ;).

muaddib 12-22-2002 10:35 PM

Quote:

Originally Posted by kwag
If your DVD has a DD 3/2 channel, use that channel. Just make sure you pick the right channel, as viewed on DVD2AVI preview. That's the channel I always convert to .mp2, usually Channel 1 :wink:

Are you saying that a 3/2 channel is better for mp2 than 5.1 channel?
It is something that I always feel… but never knew. :mrgreen:

kwag 12-22-2002 10:35 PM

Quote:

Originally Posted by SansGrip
Maybe it's time to ask Dr Google about ProLogic II ;).

Prologic != Prologic II :wink:

-kwag

SansGrip 12-22-2002 10:37 PM

Quote:

Originally Posted by kwag
Prologic != Prologic II :wink:

I'll make sure I'm reading about the right version :).

kwag 12-22-2002 10:37 PM

Quote:

Originally Posted by muaddib
Are you saying that a 3/2 channel is better for mp2 than 5.1 channel?
It is something that I always feel… but never knew. :mrgreen:

No, it's not better than 5.1. That's impossible :D
But Dolby Prologic II is way better than regular surround :wink:

-kwag

SansGrip 12-22-2002 10:39 PM

Quote:

Originally Posted by muaddib
Are you saying that a 3/2 channel is better for mp2 than 5.1 channel?

I might be wrong but I assumed they were the same thing. 3 front channels, 2 rear. The only difference is that a 5.1 has a separate sub-woofer channel.

kwag 12-22-2002 10:39 PM

http://www.kvcd.net/forum/viewtopic....light=prologic

muaddib 12-22-2002 10:44 PM

Quote:

Originally Posted by kwag
No, it's not better than 5.1. That's impossible :D
But Dolby Prologic II is way better than regular surround :wink:

Yes, I know that 5.1 is better, but we can't have 5.1 with .mp2, can we?
So, if my DVD has both 5.1 and 3/2... Which should I choose to convert to mp2 with surround 2 downmix?


All times are GMT -5. The time now is 04:52 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.