digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   DVDShrink in two steps for transcode ? (http://www.digitalfaq.com/archives/encode/12742-dvdshrink-two-steps.html)

 jorel 10-26-2004 10:42 AM

DVDShrink in two steps for transcode ?

hy all!
using dvdshrink, how can i transcode a "main movie" that need 53% of
automatic compression but after my tests i saw that using 2 steps give better result.
the doubt is: if the main movie have 7,976 Mb with audio 475 Mb(include)
how can i divide in 2 steps with the same proportional compression
in each step, if the audio never change his size? :?

seems simple but i "crash" my brain searching the solution.
i'm using the intuition, not a perfect way to find equal porcentage for each step.
was posted in the end of that page,nobody can find a "magical" formula to do that:
http://forum.digital-digest.com/show...5&pagenumber=2

any idea to help?
thanks! :wink:

 Dialhot 10-26-2004 10:47 AM

Can you explain what you mean by 2 steps ?

 jorel 10-26-2004 10:58 AM

of course :lol: ....means:
7976Mb source to 4464Mb target using dvdshrink twice.
and not using a single pass (as i call) with 53% of compression to get the target!
2 trancodes using round 26,5% and not a single pass 53%!
but as you can see 26,5% seems a perfect division but it's not cos the audio don't change his size, no matter how many times you load and trancode the main movie, only the video is transcoded!

this is my doubt Phil. thanks :wink:

 Dialhot 10-26-2004 12:00 PM

I do'nt really understand why you want to do 2 equal steps. Do the first one to 30% and let DVDShrink compute automatically how much will be the second step. The result won't be so different.

Note: you hould really use DVD-RB when you need such compression level !

 jorel 10-26-2004 02:48 PM

2 points o view Phil.
the main movie of the musical Camel have bad image quality and don't deserve to use encoders and the dvd don't have menus...or better, the worse menu that i saw.....only one ac3-2ch audio ....then, don't deserve a good job.....!
i know that shrink will compute the sencond pass, indiferent of the porcentage in the first pass choosed.
but what i read (and can't find now but i will and post here)is that with more than 30% of compression shring don't compress only the B frames(i uncertain) and after tests i saw that is better do 2 longs trancodes than only one with hard compression.
but this is not the real solution.
i need and want to know how to calculate that 2 passes in equal percentage if the program don't change the audio size ....example:

in DVD Browse, Title 1 --> 02:21.12 --> 7,976 Mb
in Compression Settings, --> Automatic 53% --> AC3-2ch 475MB
in DVD Complilation, Title 1 --> 02:21.12 --> 4,463 Mb

than we can think: "to do in 2 steps we only divide the percentage for 2"
wrong cos 1/2 of 53% is 26.5%....applying to the tanscoder i got:

the first step using 26,5% in the source with 7,976 Mb give
5,862Mb but shrink show as 71,7% cos the audio don't will change the size
before that first step.
if i follow that way the next step will get differetn porcentage(of course)
but in the final the audio will stay with the original size of the source...485Mb!
this is the point Phil, i really wanto to know the way to calculate it and not only to use it!
it's my will....how i can do this calculations?!?!? :?
i'm feeling stup to see the problem but i can't find the solution.
it's for my personal taste.

the real numbers to use are
source 7,976Mb with audio 475 Mb inside
target 4,464 Mb with the same audio without compress
in 2 full trancodes in equals porcentages!
:?

my ignorance can't accept my own ignorance and i need to know the solution!

:wink:

 Dialhot 10-27-2004 04:19 AM

Quote:
 Originally Posted by jorel but what i read (and can't find now but i will and post here)is that with more than 30% of compression shring don't compress only the B frames(i uncertain)
Okay. I didn't know. But...
Quote:
 i need and want to know how to calculate that 2 passes in equal percentage
... I still don't understand what you need a equal pourcentage. As long as each of your two passes are done with a percentage under 30%, where is the problem ?

I mean... you have the right to whish to have an answer to your question, but I do not see the absolute need of that :-)
But as you say afterwards in your post, you just want to know, so let see if we can find a solution for you ;-).
Quote:
 Camel loaded in DVDShrink show: in DVD Browse, Title 1 --> 02:21.12 --> 7,976 Mb in Compression Settings, --> Automatic 53% --> AC3-2ch 475MB in DVD Complilation, Title 1 --> 02:21.12 --> 4,463 Mb than we can think: "to do in 2 steps we only divide the percentage for 2" wrong cos 1/2 of 53% is 26.5%....applying to the tanscoder i got:
8O 8O 8O
When DVDShrink indicates 53% that means that the final target will be 53% of the original size. In other words the compression is 47% :!: (47 = 100 - 53)
Then if you want to divide something by two, this is 47/2 = 23.5%.
Is that what you did ?

Quote:
 the real numbers to use are source 7,976Mb with audio 475 Mb inside target 4,464 Mb with the same audio without compress
The problem is that you can't really find a solution. Why ? Because after the first step, all the numbers change.

The source size is not anymore 7976 with 475 audio, but 5862 with 475 audio. As percentages are proportional numbers, when you change the numbers, you changes the percentages !

You can try to use Excel and its solver to find this out by a step-by-step approach.

 jorel 10-27-2004 05:43 AM

Quote:
 Originally Posted by dialhot ... I still don't understand what you need a equal pourcentage.
who can believe? i'm posting explanations to one teacher! :lol:
because musicals like Led ZEp are TOO BIG and good sound but not so good image. more than 30% of compression in each step will get more looses....i want to stay with 30% of max compression for that movies that don't deserve encodings! :wink:

Quote:
 Originally Posted by dialhot but I do not see the absolute need of that
as you can see i really need that after my explanations about too big sources that don't deserve to be encoded....like posted!

Quote:
 Originally Posted by dialhot When DVDShrink indicates 53% that means that the final target will be 53% of the original size.
yes! 8O
Quote:
 Originally Posted by dialhot In other words the compression is 47% (47 = 100 - 53) Then if you want to divide something by two, this is 47/2 = 23.5%. Is that what you did ?
exact..you got the "spirit"! :D

Quote:
 Originally Posted by dialhot The problem is that you can't really find a solution. Why ? Because after the first step, all the numbers change.
:roll: but I KNOW that Phil!
:lol: :lol: :lol: that's why i'm calling for help.
seems easy at the first sign but is very complicated.
Quote:
 Originally Posted by dialhot The source size is not anymore 7976 with 475 audio, but 5862 with 475 audio. As percentages are proportional numbers, when you change the numbers, you changes the percentages !
8O but it is EXACT what i was trying to show! i was unclear?:lol: :lol:

Quote:
 You can try to use Excel and its solver to find this out by a step-by-step approach.
i don't know how to do it, don't have and don't use excel!

:arrow: now i'm back to egg......
:roll:
HOW I DO THAT CALCULATIONS PHIL? :lol: :lol: :lol:

 Livlander 10-28-2004 06:33 AM

Maybe not a specialist of video compression, but my two cents may help...
Instead of dividing a global percentage by 2 to find out the value you want, I think you should remember that percentages are submitted to the laws of multiplication, not addition.
Therefore, if you want to achieve a global T % reduction, you should apply twice a 10.SQR(T) % reduction.
Hope this helps :)

 jorel 10-28-2004 08:15 AM

thank you Livlanderbut you don't know some details:
first i don't use excel or something but i need the "magical formula".....your recomendations can be cool(and are) but my first problem remains the same: how i do that formula? :?
i'm not advanced in math for this reason i call for help here and in dvdshrink forum and

this is the second reason: after long tests and friendly discussions the conclusion after my tests is: better is do the trancode in 2 times with short compression, than only one with big compression.....in the end everybody there agree with that point but nobody answer how to apply the formula that seems simple but is very complex for me and for all (i think) cos the answer still in the "air" ....nobody post any solution. did you saw?
http://forum.digital-digest.com/show...5&pagenumber=2
http://forum.digital-digest.com/show...5&pagenumber=1

now my (repetitive) question for you and for anyone that want ot help:

if you know how to do that, please,
:arrow: post it here cos i really don't know how to do....
and 2 forums will thank you include me here and there!

can you, please? (this is the central point my friend! ) can you do that?
:wink:

 Dialhot 10-28-2004 08:39 AM

Jorel I'm thinking about your problem (hat is basically an equation of the second order to resolve). Just let me a little time ;-)

Note: Nobody posted a solution because it has no real interrest ! That's only for brain pleasure ;-.
The real interresting thing to do is not to have the same percentage in both pass, but to have each pass that make you gain the same number of MB !

(you have to go from source 7,976Mb with audio 475 Mb inside
target 4,464 Mb with the same audio without compress in two step so each step should make you gain ((7.976 - 450) - (4464 - 450)) / 2.
Thisis a real "2-step" process. But it means that each step wil have a different percentage.

 Livlander 10-28-2004 09:04 AM

Okay, let's try LedZep (Although I tend to prefer Camel ;-)
Necessary compression : 65.8%
In two passes, apply 10*SQR(65.8) = 81.12 % each pass.

Led Zep disk one loaded in DVDShrink show:
in DVD Browse, Title 6 --> 01:42.13 --> 5,668 Mb
in Compression Settings, --> Automatic 65.8% --> with:
LPCM 2CH 1,189Mb, AC3-5.1 345Mb, DTS 5CH 582 Mb
in DVD Complilation, Title 6 --> 01:42.13 --> 4,463 Mb

Means that :
- AudioSize = 1189 + 345 + 582 = 2216
- VideoSize0 = TotalSize0 - AudioSize = 3552
- VideoSizeFinal = VideoSize0*65.8/100 = 2337
- TotalSizeFinal = VideoSizeFinal + AudioSize = 2337 + 2216 = 4553
(small difference here compared to 4463, don't know why...).

In two passes
First pass :
- AudioSize = 1189 + 345 + 582 = 2216
- VideoSize0 = TotalSize0 - AudioSize = 3552
- VideoSize1 = VideoSize0*81.12/100 = 2881
- TotalSize1 = VideoSize1 + AudioSize = 2881 + 2216 = 5097

Second pass
- AudioSize = 1189 + 345 + 582 = 2216
- VideoSize1 = TotalSize1 - AudioSize = 2881
- VideoSizeFinal = VideoSize1*81.12/100 = 2337
- TotalSizeFinal = VideoSizeFinal + AudioSize = 2337 + 2216 = 4553

Don't know if this helps though...

 Dialhot 10-28-2004 09:23 AM

Quote:
 Originally Posted by Livlander Don't know if this helps though...
YOur calc are bright but... you applied your percentage (81.12%) on the video part only, but when you set "81.12" in DVDShring, the percentage is applied on video+audio ! But as audio in not compressed, then the real percentage taht will be applied on the video is different than 81.12 !

81.12 means taht at the end of the process Video+Audio size will be 81.12% of the original (video+audio) size.

It's really more tricky than you thought it was ;-))

 Livlander 10-28-2004 01:11 PM

Not that bright a calc so :-/

Back to the initial example,
Quote:
 Led Zep disk one loaded in DVDShrink show: in DVD Browse, Title 6 --> 01:42.13 --> 5,668 Mb in Compression Settings, --> Automatic 65.8% --> with: LPCM 2CH 1,189Mb, AC3-5.1 345Mb, DTS 5CH 582 Mb in DVD Complilation, Title 6 --> 01:42.13 --> 4,463 Mb
I wonder what the automatic 65.8% compression apply to...
Applied to [Video+Audio] does not seem to match either.

 Dialhot 10-28-2004 01:20 PM

I don't know but (5,668 - 1,189 - 582) * 65.8% + 1,189 + 582 = 4335.26

So it seems you were not so wrong 8O
I will try to figure this out by doing some tests.

 audioslave 10-28-2004 03:28 PM

Hi guys! Long time since we last spoke ;)
Please, forgive an ignorant guy, but what's the point in doing the encoding in two steps? I'm guessing the quality is supposed to better that way, but how come? Won't the video look the same with only one step?
(Confused....) :roll:

 jorel 10-28-2004 04:54 PM

Quote:
 Originally Posted by Livlander Led Zep disk one loaded in DVDShrink show: in DVD Browse, Title 6 --> 01:42.13 --> 5,668 Mb in Compression Settings, --> Automatic 65.8% --> with: LPCM 2CH 1,189Mb, AC3-5.1 345Mb, DTS 5CH 582 Mb in DVD Complilation, Title 6 --> 01:42.13 --> 4,463 Mb Means that : - AudioSize = 1189 + 345 + 582 = 2216 - VideoSize0 = TotalSize0 - AudioSize = 3552 - VideoSizeFinal = VideoSize0*65.8/100 = 2337 - TotalSizeFinal = VideoSizeFinal + AudioSize = 2337 + 2216 = 4553 (small difference here compared to 4463, don't know why...). ...
Livlander,
you need to re-start from here cos:
- AudioSize = 1189 + 345 + 582 = 2216
- VideoSize0 = TotalSize0 - AudioSize = -> 3452
- VideoSizeFinal = VideoSize0*65.8/100 = -> 2271
- TotalSizeFinal = VideoSizeFinal + AudioSize = 2271 + 2216 = -> 4487

now kidding:
small difference here compared to 4463, i know why...:
Quote:
 Originally Posted by Dialhot Jorel I'm thinking about your problem (hat is basically an equation of the second order to resolve). Just let me a little time :wink:
:screwy: ...ahhh...ok! :heee:
:hihi:
that's why nobody understand cientistis :rotf:

i told you...seems easy but.... :banghead:

Quote:
 Originally Posted by audioslave (Confused....) :roll: ...Please, forgive an ignorant guy, but what's the point in doing the encoding in two steps?

 danpos 10-28-2004 05:34 PM

I also should like to do a bit contribution to the question. In fact, in math´s viewpoint we have a system with 2 degrees of freedom (percents A and B of each pass) and 1 (one) constraint (size of target); in this way we have a indeterminated system, which means that we have a relationship between A and B, e.g. B=B(A). So We´re going to model the problem in this way:

Let it to be
Code:

`S-Sa`
the size of video of my source (S means size of source and Sa means size of audio). In first pass we have:
Code:

`a=A/100`
applied to source (It means a percentual reduction of)
Code:

`(1-a)`
. So, we´ll have:

Code:

` S´ = (S - Sa) (1 - a) + Sa (1)`
In the second pass we´ll have
Code:

`b = B/100`
applied to actual video source S´:

Code:

`S´´ = (S´ - Sa) (1 - b) + Sa (2)`
So, combining (1) and (2) and doing some algebra, we will have the following relationship:

Code:

```b = 1 - alfa/(1 - a)  (3)     alfa = 1 - K/(S - Sa),        (4)     K = S - S´´ = difference between the size of source and target one```
If we to want equal percentage, we let b = a in equation (3). The result is an polynomial equation in variable a (degree 2):

Code:

`a^2 - 2a + (1 - alfa) = 0`
(Continue)

 danpos 10-28-2004 06:16 PM

Solving the previous equation by using Bhaskara´s formula, we have the following roots:

Code:

```a1 = 1 + sqrt(alfa) (1)         a2 = 1 - sqrt(alfa)  (2)```
The root (1) is senseless because of we have to treat with percentage; so, the result is the root a2 ...

If we remember who is alfa e back the calculation, we have that:

Code:

`1 - alfa = (Size of Source - Size of Target)/(Size of Source - Size of Audio)`
So, if we to input the values 7976 MB, 4464 MB e 475 MB in the above equation, we have:

Code:

`a = a2 = 46,82%`
...

 Dialhot 10-29-2004 03:17 AM

I didn't remember a second order equation was so tought to solve :-) :bowdown: :bowdown:

 jorel 10-29-2004 05:45 AM

Danilo,
my bad memory forgot :oops: that you are physics teacher
and the worse, i only needed to ask you.
:roll: shame on me..... :oops:(
with a friend and teacher in Brasil, the help was in my own home.
:bowdown:
but now i need to know how to apply your formula using numbers.
can you please post how simple mortals can use it? :screwy:
please, don't delay....my anat knees are hurting but i deserve it! :bowdown: ( :lol: )