John Bean
Forum Replies Created
-
My bad @Dave. I mistakenly used 8 bpp when it is suppose to be 24 bpp (8 bits per RGB channel=8×3=24). A simple slip of the mind that that there 3 channels of color to account for.
But atleast now I know you took the time to carefully go over my analysis. :p
Even still, correcting that mistake still does not change the conclusion because the BITS PER PIXEL cancel out in the final overall calculation anyways. I’ll get back to that in a second.
What you said about the MPEG-2 and AVC codecs is correct in regards to quality (ie. macro-block size etc). AVC is indeed much better than MPEG-2.
Your claim that a 1920x1080p (23.976 fps, 24 bpp) video at 6 Mb/s is of higher quality than a 720x480p (23.976 fps, 24 bpp) video at 8 Mb/s would be correct … only if the compression was LOSSLESS.
But you cannot achieve LOSSLESS compression at those high rates for 1920x1080p-6Mb/s videos!
I am not sure if you understand the role and importance of the BIT-RATE setting.
The target BIT-RATE setting you select during encoding (compression) limits how much bits the encoder can use to encode all the FRAMES that make up a video PER SECOND.
The encoding codec must find a way to divide the allowable BITS PER SECOND among all the FRAMES that make up a video PER SECOND. For example, for 24 fps and a target bit-rate of 6 Mb/s, the encoder has to divide 6 Mb among the 24 frames in each second of the video in order to satisfy the target bit-rate requirement.
The target BIT-RATE setting is how you control the file size of the video. A higher bit-rate leads to a bigger file size.
The target BIT-RATE setting defines the minimum processing rate at which a playback device has to operate at in order to process those video frames to display back without frame dropping. For example, if your video has a BIT-RATE of 25 Mb/s but the playback device can only process 10 Mb/s, there will be lots of dropped frames (choppy video).
Here’s another example. You can burn a Bluray ISO image onto a DVD disc so long as your videos have a BIT-RATE less than 28 Mb/s because that is the maximum BIT-RATE that can be read from of a DVD disc. Conversely, Bluray discs limit videos to 40 Mb/s.
In other words, the BIT-RATE controls the video’s BANDWIDTH requirements.
So if you follow, than the BIT-RATE is the setting that constrains the allowable BITS PER FRAME.
If your target BIT-RATE is CONSTANT, then the BITS PER FRAME is CONSTANT too. If your target BIT-RATE is VARIABLE, then the BITS PER FRAME is VARIABLE too.
For VARIABLE BIT-RATE, the encoder takes bits away from frames with less activity (ie. low frequency information) and gives it to frames with high activity (ie. high frequency information). Frames with more high frequency information have more information to encode and hence require more bits.
So a higher BIT-RATE means the encoder has more bits to work with … ie. it can encode with more BITS PER FRAME.
If you follow, then there are just no way an encoder can compress a 1920x1080p (23.976 fps, 24 bpp) video to a bit-rate of 6 Mb/s without having to restrict the allowable BITS PER FRAME to a very small value. The compression ratio is just way too high!
And as I’ll show again below with the corrected calculation … a 1920x1080p (23.976 fps, 24 bpp) video with 6 Mb/s will have a very small BITS PER FRAME value … that is also much smaller than the BITS PER FRAME for a 720x480p (23.976 fps, 24 bpp) video with 8 Mb/s.
So here are the calculations again after fixing the bits per pixel to 24 bpp:
1920x1080p (23.976 fps, 24 bpp) compressed to a target bit-rate of 6 Mb/s
{uncompressed video}=49766.4 kb/frame ->[compression 200 to 1]-> 250 kb/frame={compressed video}
or in reverse ..
{compressed video}=250 kb/frame ->[decompression 1 to 200]-> {uncompressed video}=49766.4 kb/frame720x480p (23.976 fps, 24bpp) compressed to a target bit-rate of 8 Mb/s
{uncompressed video}=8294.4 kb/frame ->[compression 25 to 1]-> 334 kb/frame={compressed video}
or in reverse ..
{compressed video}=334 kb/frame ->[decompression 1 to 25]-> 8294.4 kb/frame=> a 720x480p (23.976 fps, 24bpp) video compressed to a target bit-rate of 8 Mb/s will have:
1. a smaller compression ratio than a 1920x1080p (23.976 fps, 24 bpp) video compressed to a target bit-rate of 6 Mb/s2. a larger bits per frame of compressed data than a 1920x1080p (23.976 fps, 24 bpp) video compressed to a target bit-rate of 6 Mb/s
Again, this can be visually verified that for the majority of the cases, a high quality DVD movie looks visually clearer and better than any YouTube 1920x1080p video.
* * * * *
Here’s the analysis again corrected for 24 bpp.
For Video#1: 1920x1080p (23.976 fps, 24 bpp) @6 Mb/s
bits per frame (uncompressed) = pixels per frame * bits per pixel
= (1920×1080 ppf) * 24 bpp
= 49766400 bits/frame
~= 49766.4 kb/frame
~= 49.8 Mb/framebits per second (uncompressed) = bits per frame * frames per second
= 49766400 bpf * 23.976 fps
= 1193199206.3999999 bps
~= 1193.19 Mb/s
~= 1.19 Gb/s=>for a 1920x1080p (23.976 fps, 24 bpp) video, in its uncompressed form, it has a BIT-RATE of about 1193 Mb/s.
compression ratio = target bit rate / uncompressed bits per second
= 6 Mbps / 1193.19 Mbps
= 6000000 bps / 1193199206.3999999 bps
= 0.005028498148354116
= 198.8665344 to 1
~= 200 to 1=>to achieve a TARGET BIT-RATE of 6 Mb/s, for a LOSSLESS compression, a video stream of 1920x1080p (23.976 fps, 8 bpp) requires a compression ratio of about 200 to 1.
That is, for LOSSLESS compression, roughly 200 bits of uncompressed video information must get encoded to 1 bit to achieve a TARGET BIT-RATE of 6 Mb/s.
Or stated differently, for LOSSLESS compression, 1 bit of compressed video information must decode to 200 bits of uncompressed (original) video information, if the desired TARGET BIT-RATE is 6 Mb/s.
On a PER FRAME basis, a 1920×1080 video frame compressed by a factor of 0.0150854944, gives:
=> bits per frame * compression ratio
= 49766400 bpf * 0.005028498148354116
= 250250.25025025025 bits/frame
~= 250 kb/frame (unchanged from the last calculation)=>for LOSSLESS compression, a video stream of 1920x1080p (23.976 fps, 24 bpp) at 6 Mbps has 250 kb/frame of information.
=>to obtain a TARGET BIT-RATE of 6 Mb/s for LOSSLESS compression, the encoding video codec must compress 49766.4 kb/frame of ORIGINAL UNCOMPRESSED video information into about 250 kb/frame.
{uncompressed video}=49766.4 kb/frame->[compression]->250 kb/frame={compressed video}
For Video#2: 720x480p (23.976 fps, 24 bpp) @8 Mb/s
bits per frame (uncompressed) = pixels per frame * bits per pixel
= (720×480) ppf * 8 bpp
= 8294400 bits/frame
= 8294.4 kb/frame
~= 8.29 Mb/framebits per second (uncompressed) = bits per frame * frames per second
= 8294400 bpf * 23.976 fps
= 198866534.4 bits/s
~= 198.9 Mb/s
~= 0.199 Gb/s=>for a 720x480p (23.976 fps, 24 bpp) video, in its uncompressed form, it has a BIT-RATE of about 198.9 Mb/s
compression ratio = target bit rate / uncompressed bits per second
= 8 Mbps / 198.9 Mbps
= 8000000 bps / 198866534.4 bps
= 0.040227985186832925
~= 25 to 1=>to achieve a TARGET BIT-RATE of 8 Mb/s, for a LOSSLESS compression, a video stream of 720x480p (23.976 fps, 24 bpp) requires a compression ratio of about 25 to 1.
That is, for LOSSLESS compression, roughly 25 bits of uncompressed video information must get compressed to 1 bit to achieve a TARGET BIT-RATE of 8 Mb/s.
Or stated differently, for LOSSLESS compression, 1 bit of compressed video information must decode to 25 bits of uncompressed (original) video information, if the desired TARGET BIT-RATE is 8 Mb/s.
On a PER FRAME basis, a 720×480 video frame compressed by a factor of 0.965471644, gives:
=> bits per frame * compression ratio
= 8294400 bpf * 0.040227985186832925
= 333667.0 bits/frame
~= 333.7 kb/frame (unchanged from last calcultion)=>for LOSSLESS compression, a video stream of 720x480p(23.976 fps, 24 bpp) at 8 Mb/s has 334 kb/frame of information
=>to obtain a TARGET BIT-RATE of 8 Mb/s for LOSSLESS compression, the encoding video codec must compress 8294.4 kb/frame of ORIGINAL UNCOMPRESSED video information into 334 kb/frame.
{uncompressed video}=8294.4 kb/frame->[compression]->334 kb/frame={compressed video}
Cheers!
-
John Bean
March 4, 2012 at 7:15 pm in reply to: New to Sony Vegas Pro 11 – best rendering format/settingUnless you are RENDERING to a VOB format with the exact same names as your source VOB files in the exact same directory, you are not writing over your source VOB files.
I’m pretty sure you are not writing over your source VOB files. That’s just common sense.
Your source VOB files are the same quality as they were when they were first created 10 years ago. That’s the beauty of digital technology.
When you open your source VOB files in Vegas to edit, Vegas uncompresses your VOB files to RAW bits in the RGB colorpsace. Most likely your VOB files are using the MPEG-2 codec with colorspace YUV. Conversion between different colorspaces will introduce some lost of original color because of rounding-off errors and conversion formula factors.
But this is not a big problem since the reason you opened it up in Vegas was to edit it anyways.
And if you know how to edit, you will be adding new information to your video that hopefully improves its.
When you are done editing, if you are rendering out your project to a LOSSY codec, you are re-compressing it. Every time you uncompress and recompress to and from a LOSSY format, you will lose some original information.
But like I said, you edit in Vegas because you wanted to improve the quality of your original videos.
So when you are ready to render out to a format that you can watch on a DVD player or Blu-ray player, as long as you use a high-quality render setting that your DVD authoring software can work with without re-encoding, your video should be more than fine – assuming you improved it during editing using restoration techniques.
If you need to render out your Vegas project so that you can further enhance it in another application, then you should use a LOSSLESS codec as your intermediate format if you don’t want to use any quality.
Cheers!
-
John Bean
March 4, 2012 at 5:40 pm in reply to: New to Sony Vegas Pro 11 – best rendering format/settingHah! So you listened to my advice and save yourself money and time!
Good man!
You should attempt some *restoration* techniques to improve your video quality. Remove noise. Make it sharper and smoother. Maybe even color correct.
Make sure you crop out BLACK BARS that may be present. Then make sure your video fills the entire frame of your project. I am assuming your project is set to 720×480.
If you know what you are doing, who knows maybe you can upscale to 1280x720p and make it HD for Bluray! That’s probably stretching it for a VHS tape source. But not entirely impossible if you know what you doing.
This maybe a good idea to do too especially if you plan on watching your videos on a HDTV.
You should be able to accomplish a lot of restoration just using the stock Vegas effects. But there are *better* third-party effects available too. But that costs money and may not be worth it.
Then when you are finished, make sure to use one of DVD Architect templates that matches your project settings.
-
I understand very well how compression works and that AVC is a much better compressor than MPEG-2.
If you are talking about a 720×480 pixels per frame of video, you don’t need a great compressor!
For a 720×480 video, to achieve a TARGET BIT-RATE of 8 Mb/s using a *LOSSLESS* compression only requires about a 1.032 to 1 compression of the bits! That is practically 1 to 1 – no compression at all!
An *UNCOMPRESSED* 720x480p (23.976 fps, 8 bpp) video only needs a 8.236 Mb/s bit-rate! That is UNCOMPRESSED! This works out to be only 346 kb/frame. To compress this video to 8 Mb/s works out to be 334 kb/frame only!
346-334 = 12 kb difference!
In other words, if you set the TARGET BIT-RATE to 8.236 Mb/s, a 720x480p (23.976 fps, 8 bpp) doesn’t even need compression at all! Setting a TARGET BIT-RATE of higher than 8.236 Mb/s would be redundant too!
A 1920x1080p (23.976 fps, 8 bpp) video in its *UNCOMPRESSED* form has a BIT-RATE of 398 Mb/s.
But if you wanted to compress this 1920x1080p (23.976 fps, 8 bpp) video to a TARGET BIT-RATE of 6 Mb/s, that requires a great compressor!
Yeah, 398 Mb/s is significantly larger than 6 Mb/s! That’s a 392 Mb/s difference! The only way to go from 398 Mb/s to 6 Mb/s is to throw away a lot of information using a LOSSY codec like AVC.
A 1920x1080p (23.976 fps, 8 bpp) in its UNCOMPRESSED form contains 16588.8 kb/frame or 16.6 Mb/frame.
For a 1920x1080p (23.976 fps, 8 bpp) video, if you use a constant bit-rate of 6 Mb/s, then the compression codec is limited to 250 kb/frame or 0.25 Mb/frame! That is a 16.35 Mb/frame difference!
That is a lot of compression needed!
Since AVC is INTERFRAME compressor, depending on your AVC compression settings (like how many reference frames), it can recreate the current frame using information from the previous reference frames. So the amount of information an AVC decoder has to recreate a frame may be larger than 250 kb for some frames for at TARGET BIT RATE of 6 Mb/s.
For example, in our case scenario, frame#0 is limited to 250 kb. But frame#1, uses frame#0 as a reference. Lets assume frame#1 contains 250 kb of new information. So in total, frame#1 will be recreated from 500 kb of information.
But even still, this is still a far cry from 16.6 Mb/s (uncompressed).
A 1920x1080p (23.976 fps, 8 bpp) at 6 Mb/s does not contain 1920×1080 pixels of information. It contains way less more information to accurately decode back to 1920×1080 uncompressed. On average, it will only have about 250 kb/frame of information to work.
Where as a 720×480 (23.976 fps, 8 bpp) at 8 Mb/s essentially does not need any compression at all. At 8 Mb/s, it will contain on average of about 334 kb/s of information to work with.
334 kb/frame > 250 kb/frame
That is why in a lot of cases, you will get better results *upscaling* a DVD 720×480-8Mb/s video to 1920×1080 than you do *decoding* a YouTube 1920×1080-6Mb/s video back to 1920×1080.
Cheers!
-
Upgrading your computer will improve things, but if you have a lot effects and transitions, it is still going to be very poor preview.
It is still just a PREVIEW window!
You can step through your timeline manually (using mouse and keyboard) to see how each frame looks in the PREVIEW window. But even still, with a lot effects and transitions, the PREVIEW is still just a PREVIEW and will still be quite different from what the actual rendered-as output will be.
So for very intense sections of your project, you will need to render it out if you want to see a more accurate view.
-
More RAM, a QUAD Core CPU, and an OpenCL capable GPU video graphics card that has lots of RAM!
OR …
Have faith that Vegas will do what you want it to do.
If you want re-assurance, then just rendered out a test of the desired region in your project. You don’t need to render out all of your project. If you keep your selected region to a few seconds, the render shouldn’t be too long.
As well, if your source media files uses a video codec that is very CPU intensive to decode, you should re-encode it to some more expedient video codec that Vegas can more easily work with if you want better quality real-time preview.
For example, AVCHD (H264) is a highly compressed codec that requires a lot of CPU work to decode. But if you re-encode to some intermediate codec that is less compressed, it will give Vegas more time to focus on transitions and effects instead of decoding.
-
I know he did not say what codec his video is in.
I just didn’t want to waste a post asking him to report back about his video information.
I remember when I was still on Vegas 9, how it could not handle AVCHD video from little consumer camcorders even though Vegas could import them into the project. This was a known issue (or bug) with Vegas 9.
When I upgraded to Vegas 10, all my AVCHD files worked like magic!
-
John Bean
March 4, 2012 at 4:06 am in reply to: New to Sony Vegas Pro 11 – best rendering format/settingIs this project a one-time thing only?
Do you really want to waste money on a VHS capture device in this day in age?
VHS tape loses quality over time and they suck to begin with too!
Chances are the capture you did 10 years ago will look better than anything you will be able to capture today.
So, first, you should check if Vegas can open and edit your VOB files. Most likely it should be able too.
If Vegas can work with your VOBs, then your set!
If not, then find the codec that will allow Vegas to work with your VOBs.
If you can’t find the codec, maybe some other app like Adobe Media Encoder can convert it for you to another format that Vegas can work with.
So that should be your starting point before you go out and waste money on a VHS capture device!
-
OLDER versions of Vegas have problems playing some AVCHD formats.
Upgrade to atleast the lastest Pro 10 is my suggestion.