|
|
INDEX F.A.Q. SEARCH LATEST POSTS
Rules Register Profile Private messages Login
| Author |
Message |
Quantum Member
Joined: 11 Dec 2003
|
|
Hello,
I am converting some personal camcorder footage of mine (wedding) to DVD and have been performing some experiments to find the best quality conversion. All footage is less than 60 minutes and I am using 1 AC3 2-channel audio track. TMPGEnc Xpress 3.0 is my encoder using 10 bit DC Component Precision and Highest (with error correction) Motion Search Precision.
1. My first thought that since space was not an issue (<60 minutes per DVD) that constant bit rate (CBR) would be quick and appropriate using a bitrate of 9200 kbits/sec. So I encoded a video that was 34 minutes and 34 secs long with a 448 kbits/sec AC3 audio track using TMPGEnc Xpress 3.0. When you select CBR in TMPGEnc Xpress the Average/Minimum/Maximum bitrates all get set to 9200 kbits/sec. The integrated bitrate calculator said the compliation would be 2428.65 MB. The resulting output file was 2,534,987,780 bytes.
2. Then I wondered if using the Varible Bit Rate (VBR) mode with 2 passes would optimize GOP's, I-, or B- frames. I don't really understand these that well but I thought what the heck, perhaps 2 passes would be better even if the bitrate was still 9200 kbits/sec like the CBR example above. So I set TMPGEnc Xpress 3.0 up in VBR 2 pass mode with the Average and Maximum bitrates set to 9200 kbits/sec and Minimum set to 0. The integrated bitrate calculator said the compilation would again be 2428.65MB. The resulting output file was 2,384,832,516 bytes.
3. Having seen the discrepency in resulting file sizes above I suspected it may have been due to setting the the minimum bitrate to 0 and only setting the average and maximum bitrate to 9200 kbits/sec. So I set the Average, Maximum, and Minimum bitrates to 9200 kbits/sec and ran TMPGEnc Xpress 3.0 again in VBR 2 pass mode. The integrated bitrate calculator said the compilation would be 2428.65MB for the third time. I expected to have a resulting encoded file the same size as the CBR example #1 because all the bitrates were now set the same as well as all other settings. The resulting output file was different coming in at 2,534,973,444. Granted pretty darn close to #1 but still different.
So the question I'm trying to answer ultimately is which mode is best for maintaining the best possible quality between my DV source and MPEG2 output for DVD?
To get that answer I'm wondering:
1. Is there any advantage to using 2 pass VBR mode with the same bitrate settings as CBR? (Does 2 passes optimize picture quality through different GOP, I-, B- frames settings, ect.)
2. If average and maximum bitrates were both set to 9200 kbits/sec in example #2 with VBR 2-pass, why did the resulting file come in smaller than example #1 with 9200 kbits/sec CBR?
For the sake of argument in this discussion let's say that time encoding and size of files don't matter.
Thank you very much for any insight you can provide.
|
|
daamon Cockney Pommy
Joined: 10 Jun 2003 Location: Melbourne, Oz
|
|
Wow...!!! <- That's how my eyes are now...
OK, here goes... I'm gonna pick through and address points and questions - there's quite a few hidden in there!
1st Attempt: All fine there...
2nd Attempt:
| Quote: |
| I wondered if using the Varible Bit Rate (VBR) mode with 2 passes would optimize GOP's... |
A GOP is a Group Of Pictures - obviously video is just a load of pictures played fast enough to give the impression of motion. DVDs have all the pictures grouped. PAL requires no more than 15 pictures in a group, whereas NTSC allows up to 18.
CBR and VBR are not influenced by GOPs - the end result will still have the defined number of pictures in a group. How is this number defined? See next response...
| Quote: |
| ...I-, or B- frames. I don't really understand these that well... |
DV AVI (as an example) is made of purely I-frames. An I-frame is a picture that contains the most information that can be held in a picture using that codec.
MPEG compresses the video by using an I-frame at the start of the GOP as a kind of starting point - here's a picture with the most info in. It then uses P-frames and B-frames to fill in the gaps until the next GOP starting with an I-frame - an intra frame.
A P-frame is a picture that is predicted based on the previous picture.
A B-frame is a picture that is bidirectionally predicted - My take on this is that it's a picture that is based on both the previous and following picture.
Without getting into technicalities (coz I'll be in deep water without my water wings), the short of it is that B- and P- frames are pictures that are "intelligently guessed" based on the pictures around them - stuff like "only take into account differences between pictures" etc.
See this, taken from a VirtualDub pop up:
A GOP has a "structure" - a way of arranging the I-, P- and B-frames. The one I use for PAL in TMPGEnc is I : P : B = 1 : 4 : 2, as below:
This gives 15 pictures in a GOP, calculated as follows:
Rules: GOP starts with an I-frame. B-frames follow either the I-frame or a single P-frame. Only one P frame at a time.
So, you'll get 1 x I + 2 x B. No I-frames left coz you only specified 1, so next is 1 x P followed by 2 x B. And so on... So for every I- and P-frame there's 2 B-frames, making little clusters of 3 pictures (1 I- or P-frame plus 2 B-frames).
Formula works out as: (I + P) x (B + 1) = (1 + 4) x (2 + 1) = 15.
(The "+1" in the "B + 1" accounts for the preceeding I- or P-frame, and the (I + P) is the total number of little clusters).
| Quote: |
| So I set TMPGEnc Xpress 3.0 up in VBR 2 pass mode with the Average and Maximum bitrates set to 9200 kbits/sec and Minimum set to 0. |
There's no point having VBR with the average and the max the same, unles you're experimenting (as you may be). VBR should have a low min, a high max and the average set to what you want it to be to get a desired filesize after encoding.
See here for more details...
3rd Attempt:
| Quote: |
| Having seen the discrepency in resulting file sizes above I suspected it may have been due to setting the the minimum bitrate to 0 and only setting the average and maximum bitrate to 9200 kbits/sec. So I set the Average, Maximum, and Minimum bitrates to 9200 kbits/sec and ran TMPGEnc Xpress 3.0 again in VBR 2 pass mode. |
Same as above, no point in setting all three the same - unless you're experimenting.
Rhetorical question, and my answers to questions it prompts:
| Quote: |
| So the question I'm trying to answer ultimately is which mode is best for maintaining the best possible quality between my DV source and MPEG2 output for DVD? |
| Quote: |
| 1. Is there any advantage to using 2 pass VBR mode with the same bitrate settings as CBR? (Does 2 passes optimize picture quality through different GOP, I-, B- frames settings, ect.) |
In my opinion, given the resultant file sizes are (in the scheme of things) pretty close then I'd say view it and gor for whichever one looks best to you. The only downside is that 2-pass VBR will take twice as long to encode for a small difference in quality - either better or worse.
Simple rule I follow: If it's short enough to allow me to do CBR, I do CBR.
As for the question in brackets, I'd say "probably not enough to make a huge difference, if at all" based on the info I gave above and my understanding / interpretation of it.
| Quote: |
| 2. If average and maximum bitrates were both set to 9200 kbits/sec in example #2 with VBR 2-pass, why did the resulting file come in smaller than example #1 with 9200 kbits/sec CBR? |
I don't know this for sure, but I'd guess it's coz CBR and VBR use different encoding algorithms (or whatever you want to call it) - "methods". It's like driving from A to B to C - two people will take slightly different routes but get to the same place and have very ever so slightly different mileage on the clocks.
It's just that one (the VBR guy) will take twice as long!
There - That's my insight. I hope it's been of use and interest.
I'm now off to get my eyes replaced...
_________________ There is some corner of a foreign field that is forever England: Telstra Stadium, Sydney, 22/11/2003.
Carpe diem.
If you're not living on the edge, you're taking up too much room.
|
|
Quantum Member
Joined: 11 Dec 2003
|
|
Thank you very much for the lengthy and informative response. I've been doing some additional research on I, B, P frames as well as analyzing my three encodes by frames. What I found:
1. Each GOP TMPGEnc Xpress 3.0 encodes for my NTSC project for both CBR and VBR are as follows:
IBBPBBPBBPBBPBBP, IBBPBBPBBPBBPBBP, ect. so I guess my NTSC GOP is set for 16 if you count the I frame.
2. I have "detect scene change" checked in TMPGEnc Xpress and I've noticed in at least one spot in both VBR encodes that TMPGEnc Xpress ended the GOP early (before 16) and started another I frame at the scene change. The CBR encode keeps the GOP at 16 before the scene change and then starts a new I frame at the scene change (after the last's GOP's 16).
Once of my original questions was why is the file size smaller even though I selected 9200 for both average bit rate and maximum bit rate while 0 for minimum bitrate in example #2? I've been thinking and to get an average of 9200 kbits/sec then the maximum and minimum would have to both be held to 9200 kbits/sec. It appears that if you set the minimum to 0 and average/max both to 9200 kbits/sec than TMPGEnc Xpress is doing a VBR encode that uses a minimum less than 9200 kbits/sec and therefore isn't really following a 9200 kbits/sec average.
I also burnt two DVD+RW's, one with the CBR 9200 kbits/sec encode (example #1) and VBR encode with min/max/average set to 9200 kbits/sec (example #3) and I really couldn't tell a difference subjectively on my 27" TV.
I'll continue to look for an objective difference between the two above and hope if someone knows of a nuts and bolts difference (different algorithms?) for those unique situations they can explain it for us.
Thanks again.
|
|
Shadowmistress Serene Savage
Joined: 28 Mar 2004 Location: Controlled Chaos
|
|
You're missing a fundamental understanding of what CBR/VBR is. This can become a very complicated answer, but I'll try and simplify it as much as I can.
CBR= Constant biterate. The disk in your dvd player will spin at the same speed throught the entire playing of the movie.
VBR= Variable biterate. Your dvd player will either speed up or slow down the spin speed of your disk while playing the movie, depending on how much information it requires to play each scene.
Each individual frame of a movie has a different bitesize. Each frame is a sum total of light, color and motion variances. (Lets forget about GOP for a second cause that's just another calculation in the mix and has nothing to do with it anyway.)
CBR. If you choose a constant biterate that is too low, you loose quality in your picture as some information gets "dumped". If you choose a constant biterate that's too high, you are overinflating your movie and wasting disk space. Most people don't use CBR.
VBR is actually CBR evolved. A variable biterate will try to adjust for space while keeping quality. It asks you what average biterate you would like (you feed it what the calculater states will fit into your dvd), it asks you how high can it go to accomodate high motion scenes that require more biterate to keep the quality of the picture, and it asks you how low it can go to save space on your disk.
This results in an effect that most people (inaccurately) call borrowing bites from low motion scenes to make high motion scenes look better. You end up with improved overall picture quality with saved disk space.
When you input the exact same numbers in your ave/max/min values in vbr, you are essentially telling vbr that it cannot deviate from that biterate. This is exactly the same as using CBR.
When you use 0 in the min field you are allowing vbr to compress the parts it can to save on space, but since you've given identical ave/max biterates, vbr will not compress those parts very much in order to keep up with the overall quality of the rest of the movie.
The proper way to use vbr is to set the max way higher than the average and the min way lower and let vbr do the adjusting for you.
I can't tell you what those numbers should be, because I use CQ rather than vbr, but that's for another post to try to explain.
To illistrate how infuriating and complicated the process is, isolate exactly 50 frames of your movie with a shot of a person standing still and encode it using CBR at 01 kbps. Then isolate 50 frames of a pan shot from side to side and encode it using CBR at 01 kbps. Even though you have 50 frames of each, the pan shot will have a much higher filesize than the still. (Yes it will look like shit, but this is just for curiosity's sake.)
By coding at 01 kbps you are allowing the encoder to just use the absolutely necessary bites required to make each frame.
|
|
monzie Member
Joined: 16 Nov 2003 Location: The Village
|
|
[quote="Shadowmistress"]You're missing a fundamental understanding of what CBR/VBR is. This can become a very complicated answer, but I'll try and simplify it as much as I can.
CBR= Constant biterate. The disk in your dvd player will spin at the same speed throught the entire playing of the movie.
VBR= Variable biterate. Your dvd player will either speed up or slow down the spin speed of your disk while playing the movie, depending on how much information it requires to play each scene.
quote]
No it doesnt.
The DVD does not spin at a different rate at all.
|
|
daamon Cockney Pommy
Joined: 10 Jun 2003 Location: Melbourne, Oz
|
|
| Quantum wrote: |
| Thank you very much for the lengthy and informative response. |
No problem - I quite enjoyed it. Sad, I know...
| Quantum wrote: |
| I have "detect scene change" checked in TMPGEnc Xpress and I've noticed in at least one spot in both VBR encodes that TMPGEnc Xpress ended the GOP early (before 16) and started another I frame at the scene change. The CBR encode keeps the GOP at 16 before the scene change and then starts a new I frame at the scene change (after the last's GOP's 16). |
That's probably a fluke - chance rather than design. The "Detect scene change" setting tells TMPGEnc to start a new scene with an I-frame. So encoding with CBR or VBR will make no difference, a scene change is a scene change either way, and an I-frame will start it with that setting ticked.
Why do it? Well, when you come to authoring, based on my use of TMPGEnc DVD AUthor, you can only start a chapter point on an I-frame. So it's handy to have new scenes starting with an I-frame. This may not apply to other authoring apps.
| Quantum wrote: |
| I also burnt two DVD+RW's, one with the CBR 9200 kbits/sec encode (example #1) and VBR encode with min/max/average set to 9200 kbits/sec (example #3) and I really couldn't tell a difference subjectively on my 27" TV. |
That's not surprising - you'll be hard pushed to tell the difference between encodes done at 9200 and 8000, so trying to spot the difference in your CBR and VBR 9200 encodes is pointless...
| Shadowmistress wrote: |
| Most people don't use CBR. |
This may or may not be true - I certainly use it when I can. CBR has a very valid reason for being used when your footage has a sufficiently short enough running time, and / or there are few / no fast motion scenes (including fast pans and zooms).
I quote often do CBR encodes with the bitrate as low as 5000 and still get excellent results. It all depends on the footage and its running time.
That reason is that it takes half the time to encode when compared to a 2-pass VBR.
See here (http://dvd-hq.info/Calculator.html) for a useful guide on when to use CBR vs VBR...
| monzie wrote: |
No it doesnt.
The DVD does not spin at a different rate at all. |
That's what I thought too...
_________________ There is some corner of a foreign field that is forever England: Telstra Stadium, Sydney, 22/11/2003.
Carpe diem.
If you're not living on the edge, you're taking up too much room.
|
|
adam Member
Joined: 13 Sep 2000 Location: United States
|
|
The speed the DVD spins will slow down progressively as it plays but in no case will bitrate have any effect on it.
http://electronics.howstuffworks.com/dvd12.htm
CBR actually does not mean constant bitrate, it means constant buffer rate. The bits per second still fluctuate per scene just not by as much so that the buffer size remains constant.
|
|
Shadowmistress Serene Savage
Joined: 28 Mar 2004 Location: Controlled Chaos
|
|
Quantum Member
Joined: 11 Dec 2003
|
|
I've been doing some more research on encoding methods and ran across a CCE manual on google. According to what I've read, CCE has a mode called multipass CBR that allows you to set one bitrate value with multiple passes. So that natually prompted me to ask what is going on during the multiple passes in a CBR encode? Can it be duplicated somewhat in TMPGEnc by running it in VBR mode with min/max/average bitrate settings of 9200 kbits/sec?
If anyone has information on multipass CBR encoding I would be interested to hear it and probably others would be too.
My next step is to get a trial version of CCE and do one of these encodes and compare it subjectively to my TMPGEnc Xpress encodes.
|
|
adam Member
Joined: 13 Sep 2000 Location: United States
|
|
You could accomplish roughly the same thing using the same min, max, avg settings in TMPGEnc, yes.
As stated before, CBR just means constant buffer rate. There is still some fluctuation at the GOP level. Mpeg encoding is all about finding redundancy in a series of frames and storing that repeated information in one frame, and then recalling it for all others that use it. The more passes you use to analyze the clip, the more redundancy you find, and thus the better compression you achieve....up to a point of course. This holds true even for CBR encodes, obviously not nearly to the same degree as VBR encodes though.
|
|
SatStorm The old one
Joined: 10 Aug 2000 Location: Hellas (Greece), E.U.
|
|
IMO, with TMPGenc, just use 2 PASS VBR with min / aver / max the maximum avalaible bitrate for DVDs (9200 kbits/sec that is)
That way you emulate something called 2 pass CBR which in theory can be better a simply pass CBR.
You can't go higher than this.
_________________ La Linea by Osvaldo Cavandoli
|
|
SaSi Very Confused
Joined: 10 Jan 2003 Location: Hellas
|
|
I agree that 2 pass CBR can produce better encoding compared to single pass. However, if bitrate is set high enough (as originally stated at 9200kbps), isn't a single pass encoding "equal enough" to a 2 pass one?
In the same fashion, when someone encodes at 9Mbps, I think that things like motion search become less important as there is plenty of bitrate to spare.
There has to be an optimum encoding strategy for low bitrate and a different one for high bitrate.
_________________ The more I learn, the more I come to realize how little it is I know.
|
|
video_sync Member
Joined: 11 Nov 2007 Location: Sweden
|
|
| SatStorm wrote: |
IMO, with TMPGenc, just use 2 PASS VBR with min / aver / max the maximum avalaible bitrate for DVDs (9200 kbits/sec that is)
|
Maximal bitrate for a DVD Video stream is set for the standard as 9800 kbit / sek , not 9200 kbit / sek.
It is possible that a DVD Video stream at 9800 kbit / sek is not compliant with an audiostream.
The total DVD standard is set to 10,08 mbit / sek, a Video stream at 9800 kbit / sek wont let much bandwith over for example overhead mux.
|
|
guns1inger So Very Tired
Joined: 01 Apr 2004 Location: Miskatonic U
|
|
You have waited over three years to post this ?
_________________ The views expressed in this post are mine alone, unless plagiarised from others
Read my obscure DVD reviews here and my general blah here
|
|
SatStorm The old one
Joined: 10 Aug 2000 Location: Hellas (Greece), E.U.
|
|
@video_sync: 9200+audio with TMPEGenc 2.5. That encoder can't go higher without issues. Also can't go lower 3.000kb/s without issues.
But that's TMPGenc-ology, a long forgotten knowledge of the ancient ones
|
|
jagabo Member
Joined: 09 Dec 2005 Location: none
|
|
The only people who could tell you what the difference between 2-pass VBR encoding with minimum, average, and maximum bitrates as 9200 vs. a CBR encoding at 9200, with TMPGEnc, are the programmers at TMPGEnc.
But here's a little thought experiment for you:
Write down three numbers. The average of the three numbers must be 9200. The biggest of the three numbers cannot be more than 9200.
I know what three numbers you wrote down without you telling me. In fact, the experiment can use any number of numbers. I still know what they all are.
Last edited by jagabo on Apr 10, 2008 07:59, edited 3 times in total
|
|
jman98 Member
Joined: 08 Oct 2004 Location: Freedonia
|
|
| SatStorm wrote: |
@video_sync: 9200+audio with TMPEGenc 2.5. That encoder can't go higher without issues. Also can't go lower 3.000kb/s without issues.
|
TMPGenc can be used quite successfully to make VCDs without issues and the VCD bitrate is 1150 Kbps CBR.
I agree with guns1inger that this thread should not have been reopened after 3 years.
|
|
SatStorm The old one
Joined: 10 Aug 2000 Location: Hellas (Greece), E.U.
|
|
jman98, we don't talking here about VCDs and Mpeg 1.
We talking about DVDs and Mpeg 2.
TMPGenc is a good encoder but it has issues on static scenes when you go below 3000kb/s and you encode to mpeg 2. It create macroblocks on the dark areas. FYI, the popular TMPGenc 2.5 pro encoder, also creates problematic mpeg 2 for DVDs overall. Minor things that nobody gives attention. But those issues shows when you use more than 9200KB/s for video.
The point of 2 pass CBR is the better pixel allocation of the video data during frames. Some encoders offer 2 Pass CBR mode.
Yes, 2 Pass CBR helps with mpeg 2 and specifically with TMPEGenc. Of course you must be mad with the picture quality to use it, only the very few can tell the difference.
jagabo, if you have a full HD TV and a DVD player that upscales Full D1 material created by TMPGenc to 1080i, do a test yourself: Find a dark scene from a movie you captured from TV and encode it as usual, with low bitrate around 3000kb/s, CBR@9200 and 2Pass VBR all set to 9200. You be amazed with the results. Watch this upscaled to 1080i.
|
|
themaster1 Member
Joined: 16 Nov 2006 Location: France
|
|
Hmm 2 pass CBR? I have never tested this but i'm gonna
My opinion about VBR is >>never use this<< unless it's necessary: length of the video content too long.
Slowing / Speeding the disc is not something i like much
If at some point you fast forward or rewind, your dvd player will suffer and the disc as well.That's how i see/understand things.
edit:
Which mpeg encoder can encode in 2pass Cbr? (procoder 2 don't)
|
|
SLK001 Member
Joined: 24 May 2001 Location: United States
|
|
| themaster1 wrote: |
Hmm 2 pass CBR? I have never tested this but i'm gonna
My opinion about VBR is >>never use this<< unless it's necessary: length of the video content too long.
Slowing / Speeding the disc is not something i like much
If at some point you fast forward or rewind, your dvd player will suffer and the disc as well.That's how i see/understand things.
edit:
Which mpeg encoder can encode in 2pass Cbr? (procoder 2 don't) |
Never use VBR??? You have a basic misunderstanding of exactly what it is. If you only have an hour of video that you want on a DVD, then go ahead and encode at CBR @~9.8 kbps - it just might fit on the disc.
Slowing / Speeding of the disc??? A DVD spins at a constant linear velocity. That means that it will spin faster at the beginning (near the center of the disc) than it will at the end (near the edge of the disc). A DVD player reads data constantly off the disc at ~22Mbps (that means AT ALL TIMES)! If the player doesn't need the data that it read at the particular instant, then it is simply discarded (to be re-read and used at another time).
Fast forwarding / rewinding doesn't cause the player or the disc to "suffer". So go ahead, FF or FR to your heart's content.
_________________ ICBM target coordinates:
26° 14' 7.62"N
80° 16' 0.78"W
|
|
SatStorm The old one
Joined: 10 Aug 2000 Location: Hellas (Greece), E.U.
|
|
CCE had 2PASS CBR once upon the time from what I recall.
Basically. as I said 3 years ago, you can emulate 2 Pass CBR by setting 2 Pass VBR with the same value for low,average,high bitrate. You can do this with any encoder that allows 2pass Vbr
Back in the old days, we use to do whatever possible to create the best VCDs, CVDs and SVCDs. 2 Pass CBR used frequently on commercial VCDs, it was industry's "secret" to have slightly better picture quality on their movies. Better pixel allocation per frame, was the only thing they could do, especially on VCDs, which the specifics are not flexible at all. When our PCs was Duron 700 and Celerons, 2 Pass was something for the very advanced enthusiasts! I remember myself waiting 36 hours for a 2 hour conversion using 2 Pass VBR back in 1999, using TMPGenc 0.12 I think, the last freeware version of this encoder....
| | |