Best compression when creating video in MS8
Best compression when creating video in MS8
I've captured avi video from my digital Sony camcorder. The avi video looks great. After adding transitions and music, I created a DVD-compliant file using the default compression with two-pass also selected. The 40 min video came out to about 1.2 gigs. When I previewed the completed file, I noticed that there was some macroblocking in shadows. Obviously the default settings compress too much. I found that I had to set the maximum variable compression to over 9,000 and the average to over 8,000 in order to remove or reduce the macroblocking.
My question is this: Is it better to make another avi file with MS8 and then a DVD-compliant mpeg in a program like tmpgenc? In other words, do other programs do a better job with mpeg compression? Does anyone have custom setting in MS8 that works well? There are many options in the video advanced section, but not much documentation in getting the highest quality. I prefer quality over rendering time.
My question is this: Is it better to make another avi file with MS8 and then a DVD-compliant mpeg in a program like tmpgenc? In other words, do other programs do a better job with mpeg compression? Does anyone have custom setting in MS8 that works well? There are many options in the video advanced section, but not much documentation in getting the highest quality. I prefer quality over rendering time.
You don't give us much info, do you?
What is your input format? Sony make at least 5 types of digital cam, each with different formats. I would expect a 40 minute file to result in about 2 Gb at 6000 kbit/s CBR and AC-3 192 kbit/s audio and this setting is usually OK for DV video.
It is a mistake to use VBR for short projects. You could get max bitrate at transitions and, to compensate, it will use a much smaller bitrate for other scenes, where you may want the max quality.
Also, you don't mention your quality setting: I usually use 90.
Also, remember that DV uses compression in the camera and careful examination will always reveal pixellation due to this: no encoder setting will eliminate the faults that are already there.
Finally, if you take my advice, don't try to be more royalist than the king. A video is normally viewed esconced in a comfortable armchair, 2, 3 or more m from the TV screen. Most defects are totally invisible under these conditions, where they may be seen with the tip of the nose 50 cm away from a computer monitor, which has a much better resolution than a TV. Pragmatism is much more profitable than perfectionism.
What is your input format? Sony make at least 5 types of digital cam, each with different formats. I would expect a 40 minute file to result in about 2 Gb at 6000 kbit/s CBR and AC-3 192 kbit/s audio and this setting is usually OK for DV video.
It is a mistake to use VBR for short projects. You could get max bitrate at transitions and, to compensate, it will use a much smaller bitrate for other scenes, where you may want the max quality.
Also, you don't mention your quality setting: I usually use 90.
Also, remember that DV uses compression in the camera and careful examination will always reveal pixellation due to this: no encoder setting will eliminate the faults that are already there.
Finally, if you take my advice, don't try to be more royalist than the king. A video is normally viewed esconced in a comfortable armchair, 2, 3 or more m from the TV screen. Most defects are totally invisible under these conditions, where they may be seen with the tip of the nose 50 cm away from a computer monitor, which has a much better resolution than a TV. Pragmatism is much more profitable than perfectionism.
[b][i][color=red]Devil[/color][/i][/b]
[size=84]P4 Core 2 Duo 2.6 GHz/Elite NVidia NF650iSLIT-A/2 Gb dual channel FSB 1333 MHz/Gainward NVidia 7300/2 x 80 Gb, 1 x 300 Gb, 1 x 200 Gb/DVCAM DRV-1000P drive/ Pan NV-DX1&-DX100/MSP8/WS2/PI11/C3D etc.[/size]
[size=84]P4 Core 2 Duo 2.6 GHz/Elite NVidia NF650iSLIT-A/2 Gb dual channel FSB 1333 MHz/Gainward NVidia 7300/2 x 80 Gb, 1 x 300 Gb, 1 x 200 Gb/DVCAM DRV-1000P drive/ Pan NV-DX1&-DX100/MSP8/WS2/PI11/C3D etc.[/size]
I think my digital camera is a dcr-740. I can't remember the exact model number. It is about three years old, but was one of their better models at the time with over a one megapixel CCD. As for compression artifacts in the original, there really aren't any noticable artifacts. Any artifacts present after encoding were not in the original. I always use maximum quality (I move the slider clear to the right). I rerendered using a miximum of 9,000, an average of 6,500, and a minimum of 4,500. I wasn't comfortable using the higher bitrates of my last rendered project because I know some DVD players have a harder time with higher bitrates. My latest file size for a 38 min file using ac3 audio was 1.9 gigs which is more where it should be. My only complaint with MS8 is that there is no documentation with the advanced video settings, at least as far as I can tell. In previous versions there was at least a help icon that you could press to give more details. It would be nice if Ulead could provide more details describing what the advanced settings are designed to do.
Try Constant bitrate at 6000 or 6500 kbit/s and forget the advanced settings, at least until you are sure you need them.
You will find full doc on the settings at http://downloads.mainconcept.com/MPEGEncoder_en.zip
You will find full doc on the settings at http://downloads.mainconcept.com/MPEGEncoder_en.zip
[b][i][color=red]Devil[/color][/i][/b]
[size=84]P4 Core 2 Duo 2.6 GHz/Elite NVidia NF650iSLIT-A/2 Gb dual channel FSB 1333 MHz/Gainward NVidia 7300/2 x 80 Gb, 1 x 300 Gb, 1 x 200 Gb/DVCAM DRV-1000P drive/ Pan NV-DX1&-DX100/MSP8/WS2/PI11/C3D etc.[/size]
[size=84]P4 Core 2 Duo 2.6 GHz/Elite NVidia NF650iSLIT-A/2 Gb dual channel FSB 1333 MHz/Gainward NVidia 7300/2 x 80 Gb, 1 x 300 Gb, 1 x 200 Gb/DVCAM DRV-1000P drive/ Pan NV-DX1&-DX100/MSP8/WS2/PI11/C3D etc.[/size]
-
Scenestealer
"It is a mistake to use VBR for short projects. You could get max bitrate at transitions and, to compensate, it will use a much smaller bitrate for other scenes, where you may want the max quality. "
I think the opposite is true. With CBR you are wasting bandwidth on scenes that could be compressed easily at a lower bitrate at the expense of more complex scenes / frames that could use the extra bits.
You need to use a VBR setting that maintains constant Q - quantization though (Q =quality but this is not the same as the quality slider which is more to do with motion estimation, I believe) and not one that tries to keep an average bitrate because it will drop the quality if the average bitrate looks like it will be exceeded on a complex frame.
2 pass VBR makes this even more true by recalculating where there are runaways of bitrate required for complex frames on the first pass and reassigning more bits to those frames on the second pass.
Scenestealer
I think the opposite is true. With CBR you are wasting bandwidth on scenes that could be compressed easily at a lower bitrate at the expense of more complex scenes / frames that could use the extra bits.
You need to use a VBR setting that maintains constant Q - quantization though (Q =quality but this is not the same as the quality slider which is more to do with motion estimation, I believe) and not one that tries to keep an average bitrate because it will drop the quality if the average bitrate looks like it will be exceeded on a complex frame.
2 pass VBR makes this even more true by recalculating where there are runaways of bitrate required for complex frames on the first pass and reassigning more bits to those frames on the second pass.
Scenestealer
Sorry, disagree for 40 min projects, as the OP stated: you may "waste" bandwidth, as you put it, but what does that matter when you only half-fill the platter?
Just think: which scenario would be better:
1. 6000 kbit/s CBR with all the scenes ± encoded equally at the bitrate which is about optimum for a DV original with no significant added artefacts
2. 6000 kbit/s VBR average, 8000 max, 4000 min. Takes up the same disk space, give or take a few grams (actually not). The transitions would encode superbly, normal action would not be significantly different and the more static scenes would have additional artefacts, over and above those from the DV itself. With the added risk that the DVD would glitch in some players.
???
This is not theory but the result of hundreds of practical tests from PAL DV and DVCAM tapes, with careful frame-by-frame examination of the results, often down to a pixel level, even with fast-moving objects or rapid panning.
I agree that quantisation does play a role, but I assume this is equal in the above comparison. I admit to being hazy on this subject.
I believe that the best way of improving quality for short projects, but I have not yet tested this in practice, may be to have shorter GOPs. This would require more I-frames, which use up most bandwidth, but the interpolation in the B- and P-frames would be reduced. Unfortunately, I lack time just now to find out how to balance the horses and the courses with practical experiments.
Just think: which scenario would be better:
1. 6000 kbit/s CBR with all the scenes ± encoded equally at the bitrate which is about optimum for a DV original with no significant added artefacts
2. 6000 kbit/s VBR average, 8000 max, 4000 min. Takes up the same disk space, give or take a few grams (actually not). The transitions would encode superbly, normal action would not be significantly different and the more static scenes would have additional artefacts, over and above those from the DV itself. With the added risk that the DVD would glitch in some players.
???
This is not theory but the result of hundreds of practical tests from PAL DV and DVCAM tapes, with careful frame-by-frame examination of the results, often down to a pixel level, even with fast-moving objects or rapid panning.
I agree that quantisation does play a role, but I assume this is equal in the above comparison. I admit to being hazy on this subject.
I believe that the best way of improving quality for short projects, but I have not yet tested this in practice, may be to have shorter GOPs. This would require more I-frames, which use up most bandwidth, but the interpolation in the B- and P-frames would be reduced. Unfortunately, I lack time just now to find out how to balance the horses and the courses with practical experiments.
[b][i][color=red]Devil[/color][/i][/b]
[size=84]P4 Core 2 Duo 2.6 GHz/Elite NVidia NF650iSLIT-A/2 Gb dual channel FSB 1333 MHz/Gainward NVidia 7300/2 x 80 Gb, 1 x 300 Gb, 1 x 200 Gb/DVCAM DRV-1000P drive/ Pan NV-DX1&-DX100/MSP8/WS2/PI11/C3D etc.[/size]
[size=84]P4 Core 2 Duo 2.6 GHz/Elite NVidia NF650iSLIT-A/2 Gb dual channel FSB 1333 MHz/Gainward NVidia 7300/2 x 80 Gb, 1 x 300 Gb, 1 x 200 Gb/DVCAM DRV-1000P drive/ Pan NV-DX1&-DX100/MSP8/WS2/PI11/C3D etc.[/size]
-
Scenestealer
Sorry Devil - cant agree with all that either.
It is not a matter of "filling the platter" ie the total number of bits on the disc. It is a matter of aportioning the the number of bits per second (which is limited by the DVD standard to a max of 9.8Mbps) in the most effective way to maintain consistant quality in each frame.
It is a dynamic thing that is occurring in the encoder and not a question of static disc space. Bits not used in some frames can be used to improve other frames in the buffer.
CBR does not encode all scenes equally it drops the quality on complex scenes to keep within the fixed buffer rate.
I dont think you can say that 6Mbps is optimum for DV when the bitrate for DV is 25Mbps before encoding to Mpeg. It certainly isnt in my experience where you have a lot of detail and motion.
Also "it is not logical, Captain" that VBR will drop the bitrate to such a point that the static scenes would look worse. The whole idea of VBR is to only drop the rate if the scenes/frames are uncomplex and do not require the maximum or average bits/sec.
I also have done a few practical tests myself.
The problem with shortening GOP's is that this uses more lowly compressed I frames, which use band width as you pointed out. This then drops the the resolution of those I frames, which in turn drops the quality of the P and B frames which are based on those I frames. In other words robbing Peter to pay Paul.
It seems that for best quality one should use GOP's as long as possible with all P frames or perhaps 1 B frame in between (if bitrate needs to be rationed) . Scene detection should be turned on also.
It is not a matter of "filling the platter" ie the total number of bits on the disc. It is a matter of aportioning the the number of bits per second (which is limited by the DVD standard to a max of 9.8Mbps) in the most effective way to maintain consistant quality in each frame.
It is a dynamic thing that is occurring in the encoder and not a question of static disc space. Bits not used in some frames can be used to improve other frames in the buffer.
CBR does not encode all scenes equally it drops the quality on complex scenes to keep within the fixed buffer rate.
I dont think you can say that 6Mbps is optimum for DV when the bitrate for DV is 25Mbps before encoding to Mpeg. It certainly isnt in my experience where you have a lot of detail and motion.
Also "it is not logical, Captain" that VBR will drop the bitrate to such a point that the static scenes would look worse. The whole idea of VBR is to only drop the rate if the scenes/frames are uncomplex and do not require the maximum or average bits/sec.
I also have done a few practical tests myself.
The problem with shortening GOP's is that this uses more lowly compressed I frames, which use band width as you pointed out. This then drops the the resolution of those I frames, which in turn drops the quality of the P and B frames which are based on those I frames. In other words robbing Peter to pay Paul.
It seems that for best quality one should use GOP's as long as possible with all P frames or perhaps 1 B frame in between (if bitrate needs to be rationed) . Scene detection should be turned on also.
DO NOT use 2 pass encode in MSP8 - it is buggy and actually has blocking problems that a single pass will not at the same bitrate. MSP7 did not have this problem - this should be addressed soon but in the meantime use single pass if VBR is desired.
With a CLOSED GOP DVD players will NOT have an issue with 9000K video bitrate (I have used as high as 9500K with sucess.
CBR will generally produce higher quality files and VBR will compress more produces smaller files by 10-20%.
Regards,
Rob Tywlak
With a CLOSED GOP DVD players will NOT have an issue with 9000K video bitrate (I have used as high as 9500K with sucess.
CBR will generally produce higher quality files and VBR will compress more produces smaller files by 10-20%.
Regards,
Rob Tywlak
Athalon 64 X2 6400+, 1GIG DD2 PC6400, Asus M2NBP-VM CSM MB, ADS Pryo IEEE-1394, 260 Gig UDMA133 Hard Drive + 15 gig system drive, 18x DVDRW+/-, Windows XP SP2. 47" LCD HDTV / Monitor 1920x1080
We'll agree to differ. All my tests, and I have spent many hours doing them, have shown that the DV artefacts prime over the MPEG-2 ones, even with very fast moving objects, at bitrates >6000 kbit/s. Also, it is a total non-sequitur to compare DV25 with MPEG-2, because each frame in DV is indidually highly compressed, with plenty of artefacts.
I've also analysed on many occasions MPEG-2 VBR bitrates. Invariably, the highest ones are not where you want them, but in the transitions. One of my test clips combines 4 street scenes in Kuala Lumpur. The first shows cars moving fairly slowly round a roundabout in mid-distance. The second shows cars travelling fast at mid-distance, the third is as the second, but with the camera panning rapidly to keep two cars in the frame and the fourth is taken at right angles to fast-moving traffic from the edge of the pavement. When encoded with VBR (1 or 2-pass), most of the time the bitrate is about average. Interestingly, the encoders tend to give up on the last scene.
Low-cost encoders are not like those hardware ones used in Hollywood, which are tweaked to ignore what doesn't matter and, after tens of passes, push the bitrate up where it is really needed. It may surprise you to know than some Hollywood DVDs have average bitrates as low as 4500 kbit/s with peaks up to about 8000 and troughs down to 2800. Yet the quality is superb, mainly because they do not start with a DV AVI, but with uncompressed 4:4:4 colourspace studio-quality video. If you want to do the same, your investment in cameras, studio equipment, editing bays, encoding systems etc. will run at > $1 million entry level.
I've also analysed on many occasions MPEG-2 VBR bitrates. Invariably, the highest ones are not where you want them, but in the transitions. One of my test clips combines 4 street scenes in Kuala Lumpur. The first shows cars moving fairly slowly round a roundabout in mid-distance. The second shows cars travelling fast at mid-distance, the third is as the second, but with the camera panning rapidly to keep two cars in the frame and the fourth is taken at right angles to fast-moving traffic from the edge of the pavement. When encoded with VBR (1 or 2-pass), most of the time the bitrate is about average. Interestingly, the encoders tend to give up on the last scene.
Low-cost encoders are not like those hardware ones used in Hollywood, which are tweaked to ignore what doesn't matter and, after tens of passes, push the bitrate up where it is really needed. It may surprise you to know than some Hollywood DVDs have average bitrates as low as 4500 kbit/s with peaks up to about 8000 and troughs down to 2800. Yet the quality is superb, mainly because they do not start with a DV AVI, but with uncompressed 4:4:4 colourspace studio-quality video. If you want to do the same, your investment in cameras, studio equipment, editing bays, encoding systems etc. will run at > $1 million entry level.
[b][i][color=red]Devil[/color][/i][/b]
[size=84]P4 Core 2 Duo 2.6 GHz/Elite NVidia NF650iSLIT-A/2 Gb dual channel FSB 1333 MHz/Gainward NVidia 7300/2 x 80 Gb, 1 x 300 Gb, 1 x 200 Gb/DVCAM DRV-1000P drive/ Pan NV-DX1&-DX100/MSP8/WS2/PI11/C3D etc.[/size]
[size=84]P4 Core 2 Duo 2.6 GHz/Elite NVidia NF650iSLIT-A/2 Gb dual channel FSB 1333 MHz/Gainward NVidia 7300/2 x 80 Gb, 1 x 300 Gb, 1 x 200 Gb/DVCAM DRV-1000P drive/ Pan NV-DX1&-DX100/MSP8/WS2/PI11/C3D etc.[/size]
Forgot to ask NTSC or PAL as they are quite different...
DV NTSC is 4:1:1 colorspace while PAL is 4:2:0
DV compression is only 5:1 after colorspace reduction and Discrete cosine Transform. MPEG is 4:2:0 but with a different downsampling pattern than PAL's DV 4:2:0.
For some clarification:
DV can't have "motion artifacts" because each picture frame is real and has no reference to previous or later ones. DV's bitrate is rather high and the quality is pretty much determined by the bit allocation - here is where it differes drastically from MPEG. DV's bits are allocated for EACH 8x8 pixel block independently while MPEG is done on an entire frame. Thus the image quality can be better with DV at the same bitrate as an all "I" frame MPEG.
It is true that any artifacts present in the original DV footage will at best come thru the same in MPEG or be worse because the DCT and bit allocation is done differently. If the DV file looks great the MPEG should be able to get damn close or match it with the proper settings.
In my experience when quality matters go for the least compression possible (Highest legal bitrate) for DVD and use a short GOP of 6 frames.
Post analysis of a 9000K stream shows "I" frame compression is only about 5:1 to 7:1 which is quite good and lower levels of the P&B frames in the 10-20 range. By using a short GOP the motion accuracy can be much higher since the reference "I" frames are closer together. I would not use a short GOP at lower bitrates however since the "I" frames will get to compressed. This trick only works at the high bitrates.
On a good TV / Monitor you *CAN* see a difference between 6000K and 9000K when encoding fast motion or high detail - basically the gibs artifacts all but dissapear at 9000K while they can be visible at 6000K.
The 9000K stream is visually identical to the DV source 99% of the time and the other 1% with only slight artifacts not present in the original DV footage.
Expanding the motion search range helps also - especially on GOP>6. In general I use CBR unless I need a smaller file size simply because I would rather have lower "Q" scale factors and higher quality and I don't care about "extra wasted bits". It is better to have extra than not enough.
With MSP8 the 2 pass currently has a problem - use single pass VBR if your going the VBR route. Crank the quality to 100%, use closed GOP 6 frame with IBPBPB as the GOP structure at a 9000K bitrate and you should get a good clean render with either CBR or VBR. Enable the half pel motion search and set the range to 16 each for extra high quality on the motion vectors if desired though you probably won't see any difference on a short GOP.
Regards,
Rob Tywlak
DV NTSC is 4:1:1 colorspace while PAL is 4:2:0
DV compression is only 5:1 after colorspace reduction and Discrete cosine Transform. MPEG is 4:2:0 but with a different downsampling pattern than PAL's DV 4:2:0.
For some clarification:
DV can't have "motion artifacts" because each picture frame is real and has no reference to previous or later ones. DV's bitrate is rather high and the quality is pretty much determined by the bit allocation - here is where it differes drastically from MPEG. DV's bits are allocated for EACH 8x8 pixel block independently while MPEG is done on an entire frame. Thus the image quality can be better with DV at the same bitrate as an all "I" frame MPEG.
It is true that any artifacts present in the original DV footage will at best come thru the same in MPEG or be worse because the DCT and bit allocation is done differently. If the DV file looks great the MPEG should be able to get damn close or match it with the proper settings.
In my experience when quality matters go for the least compression possible (Highest legal bitrate) for DVD and use a short GOP of 6 frames.
Post analysis of a 9000K stream shows "I" frame compression is only about 5:1 to 7:1 which is quite good and lower levels of the P&B frames in the 10-20 range. By using a short GOP the motion accuracy can be much higher since the reference "I" frames are closer together. I would not use a short GOP at lower bitrates however since the "I" frames will get to compressed. This trick only works at the high bitrates.
On a good TV / Monitor you *CAN* see a difference between 6000K and 9000K when encoding fast motion or high detail - basically the gibs artifacts all but dissapear at 9000K while they can be visible at 6000K.
The 9000K stream is visually identical to the DV source 99% of the time and the other 1% with only slight artifacts not present in the original DV footage.
Expanding the motion search range helps also - especially on GOP>6. In general I use CBR unless I need a smaller file size simply because I would rather have lower "Q" scale factors and higher quality and I don't care about "extra wasted bits". It is better to have extra than not enough.
With MSP8 the 2 pass currently has a problem - use single pass VBR if your going the VBR route. Crank the quality to 100%, use closed GOP 6 frame with IBPBPB as the GOP structure at a 9000K bitrate and you should get a good clean render with either CBR or VBR. Enable the half pel motion search and set the range to 16 each for extra high quality on the motion vectors if desired though you probably won't see any difference on a short GOP.
Regards,
Rob Tywlak
Athalon 64 X2 6400+, 1GIG DD2 PC6400, Asus M2NBP-VM CSM MB, ADS Pryo IEEE-1394, 260 Gig UDMA133 Hard Drive + 15 gig system drive, 18x DVDRW+/-, Windows XP SP2. 47" LCD HDTV / Monitor 1920x1080
Hi,
I'm sorry to digress even more, but this thread has evolved to a very instructive and general discussion, so I would like to ask if one of you will want to comment about the special case of slide show movies.
When the video is basically the same frame repeated several seconds, with the only movement being the transitions effects and the occasional moving title, should the encoding type/bitrate choice be different?
In particular the VBR/CBR selection; does or does it not allow the changing parts to benefit from the bits not needed to merely repeat frames? Or is the spacetime too long for it to work. I mean, lets display an image 5 seconds between transitions; that's 125 images (PAL) of repeated frames. Is CBR a huge waste then?
I'm sorry to digress even more, but this thread has evolved to a very instructive and general discussion, so I would like to ask if one of you will want to comment about the special case of slide show movies.
When the video is basically the same frame repeated several seconds, with the only movement being the transitions effects and the occasional moving title, should the encoding type/bitrate choice be different?
In particular the VBR/CBR selection; does or does it not allow the changing parts to benefit from the bits not needed to merely repeat frames? Or is the spacetime too long for it to work. I mean, lets display an image 5 seconds between transitions; that's 125 images (PAL) of repeated frames. Is CBR a huge waste then?
Daniel:
For a slide show yes VBR would be a better choice to save the final version into. Ideally you want a high bitrate durning transitions and a low bitrate during stills because in theory all "P" and "B" frames are all zero with no motion or changes. A proper encoder will allocate nearly all the bits to the "I" frame and keep the image quality. I have never used VBR in that way because I don't do MPEG slide shows but I could easily see a 4:1 bitrate swing from say 8000K max to 2000 min. I would still use highest quality setting for motion search to minimize artifacts during transitions (set quality to MAX).
CBR would work just fine too - just waste a lot of bits that are not needed in this case.
Regards,
Rob Tywlak
For a slide show yes VBR would be a better choice to save the final version into. Ideally you want a high bitrate durning transitions and a low bitrate during stills because in theory all "P" and "B" frames are all zero with no motion or changes. A proper encoder will allocate nearly all the bits to the "I" frame and keep the image quality. I have never used VBR in that way because I don't do MPEG slide shows but I could easily see a 4:1 bitrate swing from say 8000K max to 2000 min. I would still use highest quality setting for motion search to minimize artifacts during transitions (set quality to MAX).
CBR would work just fine too - just waste a lot of bits that are not needed in this case.
Regards,
Rob Tywlak
Athalon 64 X2 6400+, 1GIG DD2 PC6400, Asus M2NBP-VM CSM MB, ADS Pryo IEEE-1394, 260 Gig UDMA133 Hard Drive + 15 gig system drive, 18x DVDRW+/-, Windows XP SP2. 47" LCD HDTV / Monitor 1920x1080
