Darksoul71
23rd September 2004, 09:52
Hi Tylo,
Iīve got a question on calculatthe CQ value
Iīm aware that D2SRoBa uses Newton Raphson (http://www.sosmath.com/calculus/diff/der07/der07.html) to estimate the Q-Value for CCE which is needed to hit a certain file size.
What is following now, is just my understanding of the method I think you used. So I ask you to tell me if I understood it correctly.
Newton-Raphson is used to find the zeros for an equation y = f(x). Now lets say y equals the bitrate and x represents the CQ value. f(x) is the "function" which represents the overall compressibility of the movie which to my understanding basically just means: Each movie will give you different quality depending on the bitrate you use. As "f(x)" is not linear, we have to interpolate the function to get the CQ value for the choosen movie and targeted filesize (-> CBR). As Newton-Raphson can only be used to find the value where f(x) equals zero, we have to generate an equation that results in a zero for the CQ value we look for.
x is the CQ value we look for in order to get the targeted file size which equals to a certain average bitrate (repesented by "b" in the equation)
Something like this: 0 = b - f(x)
http://www.sosmath.com/calculus/diff/der07/Image01.gif
So in reference to this diagram we are looking for "r".
Now letīs look at the equation that it used to aproximate "r":
http://www.sosmath.com/calculus/diff/der07/img11.gif
We need to determine f'(x) which can be replaced by the tangent equation. So eg. we need the tangent equation for CQ value of 40, we could use a CQ value of 41 combined with the CBR bitrate values of both CQ value, correct ?
Is it possible to have a look into the D2SRoba sources how the CQ value is calculated ?
This would be very helpful to me.
Background of all my questions:
I use my PC mainly as PVR and do a lot of captures I want to archive to DVD. As Iīm using a WinTV PVR USB2, all/most of my captures are in DVD compliant MPEG2 format. I demux them and do my cutting using Cuttermaran.
Normally I either master multiple episodes to on DVD-R or one complete movie per DVD. For the "multiple episode" stuff Ulead Movie Factory 2.0 does a fine job for me but for 1 movie per DVD stuff needs way to much work in Movie Factory: Load movie, add chapters and generate ISO to burn DVD. My idea was a "one click and go" solution. Iīve now done a small Delphi app that does the following: Generating a chapterlist for Ifoedit, calls ifoedit via a small AutoIt app (ifoedit_cli), masters the DVD and generates an ISO using mkisofs. All this works quite fine. Now and then I have an "oversized" video stream which I "squeeze" down using rejig. As I donīt like those "compressed domain transcoder", the integration of an external MPEG encoder came to my mind. In order to generate the "chapters.txt" for IfoEdit, I generate an AVS-file using DGIndex. So a "source file" for any sort of MPEG2 encoder would be available. QEnc would do the job quite fine I think but CCE is a faster solution. Calling CCE via CLI using EclCCE is no big deal. The only thing I need to do HiQuality video automized in a small time period would be the implementation of the RoBa method which is currently integrated in D2SRoBa :D
Further plans are to support AVS / AVI Input in my GUI. Audioencoding would be done seperate using
VirtualDub and BeSweet (as I already do in VCF2AVS). I know that DVD2SVCD supports AVI input but itīs way too overloaded (donīt misunderstand me) for my needs. I just want to cut my captures, choose Audio/video files in a frontend and hit the "Go"-button. Afterwards I expect a complete DVD compliant ISO ready for burning.
TIA,
-D$
Iīve got a question on calculatthe CQ value
Iīm aware that D2SRoBa uses Newton Raphson (http://www.sosmath.com/calculus/diff/der07/der07.html) to estimate the Q-Value for CCE which is needed to hit a certain file size.
What is following now, is just my understanding of the method I think you used. So I ask you to tell me if I understood it correctly.
Newton-Raphson is used to find the zeros for an equation y = f(x). Now lets say y equals the bitrate and x represents the CQ value. f(x) is the "function" which represents the overall compressibility of the movie which to my understanding basically just means: Each movie will give you different quality depending on the bitrate you use. As "f(x)" is not linear, we have to interpolate the function to get the CQ value for the choosen movie and targeted filesize (-> CBR). As Newton-Raphson can only be used to find the value where f(x) equals zero, we have to generate an equation that results in a zero for the CQ value we look for.
x is the CQ value we look for in order to get the targeted file size which equals to a certain average bitrate (repesented by "b" in the equation)
Something like this: 0 = b - f(x)
http://www.sosmath.com/calculus/diff/der07/Image01.gif
So in reference to this diagram we are looking for "r".
Now letīs look at the equation that it used to aproximate "r":
http://www.sosmath.com/calculus/diff/der07/img11.gif
We need to determine f'(x) which can be replaced by the tangent equation. So eg. we need the tangent equation for CQ value of 40, we could use a CQ value of 41 combined with the CBR bitrate values of both CQ value, correct ?
Is it possible to have a look into the D2SRoba sources how the CQ value is calculated ?
This would be very helpful to me.
Background of all my questions:
I use my PC mainly as PVR and do a lot of captures I want to archive to DVD. As Iīm using a WinTV PVR USB2, all/most of my captures are in DVD compliant MPEG2 format. I demux them and do my cutting using Cuttermaran.
Normally I either master multiple episodes to on DVD-R or one complete movie per DVD. For the "multiple episode" stuff Ulead Movie Factory 2.0 does a fine job for me but for 1 movie per DVD stuff needs way to much work in Movie Factory: Load movie, add chapters and generate ISO to burn DVD. My idea was a "one click and go" solution. Iīve now done a small Delphi app that does the following: Generating a chapterlist for Ifoedit, calls ifoedit via a small AutoIt app (ifoedit_cli), masters the DVD and generates an ISO using mkisofs. All this works quite fine. Now and then I have an "oversized" video stream which I "squeeze" down using rejig. As I donīt like those "compressed domain transcoder", the integration of an external MPEG encoder came to my mind. In order to generate the "chapters.txt" for IfoEdit, I generate an AVS-file using DGIndex. So a "source file" for any sort of MPEG2 encoder would be available. QEnc would do the job quite fine I think but CCE is a faster solution. Calling CCE via CLI using EclCCE is no big deal. The only thing I need to do HiQuality video automized in a small time period would be the implementation of the RoBa method which is currently integrated in D2SRoBa :D
Further plans are to support AVS / AVI Input in my GUI. Audioencoding would be done seperate using
VirtualDub and BeSweet (as I already do in VCF2AVS). I know that DVD2SVCD supports AVI input but itīs way too overloaded (donīt misunderstand me) for my needs. I just want to cut my captures, choose Audio/video files in a frontend and hit the "Go"-button. Afterwards I expect a complete DVD compliant ISO ready for burning.
TIA,
-D$