Welcome to our community

Be a part of something great, join today!

  • Hey all, just changed over the backend after 15 years I figured time to give it a bit of an update, its probably gonna be a bit weird for most of you and i am sure there is a few bugs to work out but it should kinda work the same as before... hopefully :)

The Art of Compression and Encoding

Resizing is definately part of compression quality.
What bothers me is that in Photoshop you can choose from 5 different resizing algorithms. There's no such option in Premiere Pro (or AE). There were times I resized in Photoshop just to know that the optimal algorithm was being used.
Right now my latest info was that, working in Premiere, creating a new sequence and resizing the source within the timeline and then export is supposed to give best results, but there are different opinions out there.

If you are using a supported CUDA GPU, Premiere Pro uses Lanczos 2 - which is excellent. If not, and you are forced to Software Only MPE, then the default is Gaussian sampled with bilinear. Selecting "Maximum Render Quality" gives you variable radius bicubic. I think Lanczos offers the best balance for almost all situations. However, when downsampling, Lanczos may create some high frequency ringing in certain scenes - although it is mostly not noticeable. Softcubic is the best as far as IQ is concerned - it avoids most ringing or aliasing - but the perceived "sharpness" is down on Lanczos. Mitchell-Netravali with Smart Anti-Aliasing is an excellent overall compromise between the two. All said, I mostly just stick to Lanczos 4 and try other algorithms only if there are issues.
 
If you are using a supported CUDA GPU, Premiere Pro uses Lanczos 2 - which is excellent. If not, and you are forced to Software Only MPE, then the default is Gaussian sampled with bilinear. Selecting "Maximum Render Quality" gives you variable radius bicubic. I think Lanczos offers the best balance for almost all situations. However, when downsampling, Lanczos may create some high frequency ringing in certain scenes - although it is mostly not noticeable. Softcubic is the best as far as IQ is concerned - it avoids most ringing or aliasing - but the perceived "sharpness" is down on Lanczos. Mitchell-Netravali with Smart Anti-Aliasing is an excellent overall compromise between the two. All said, I mostly just stick to Lanczos 4 and try other algorithms only if there are issues.

Great insight Subhadip, thank you very much!!
Yes I'm using CUDA supported GPU. So that means not choosing "Maximum Render Quality" will use Lanczos 2 by default? What prog do you use for Lanczos 4 then?
EDIT: Just trying to google what '4' does, can't find it?!
 
Last edited:
Great insight Subhadip, thank you very much!!
Yes I'm using CUDA supported GPU. So that means not choosing "Maximum Render Quality" will use Lanczos 2 by default? What prog do you use for Lanczos 4 then?
If you are using CUDA, all scaling is always Lanczos, unless it must fall back to the CPU (I don't know why, if or when that might happen). Like I mentioned before, I use MeGUI. Debugmode FrameServer can serve frames straight to MeGUI or any other DirectShow based app. (all of the above are Windows based solutions)

A scaling algorithm some members at Doom9 sware by is Spline32 and Spline64. For upscaling Spline64 is indeed unmatched.

Edit - Just saw your edit, the 4 in Lanczos 4 simply refers to 4 taps. I don't understand the math myself, you will need to google that!
 
As a side note - I have a personal soft spot for SoftCubic. It is extremely clean - no aliasing or ringing. But most clients and audiences prefer "sharp" images - which is why Lanczos is becoming the defacto standard.

*Sharp = high edge contrast
 
Temporal noise reduction, free

Temporal noise reduction, free

One way to reduce the bandwidth compressed formats require is to prep the frames with temporal noise reduction before compression.

NeatVideo (tm) does things to the images so is not the best option if you don't want to change the look of the images.

I have built in Temporal noise reduction in my free de-Bayer program DANCINEC.ZIP (v0.05 is up, v0.06 is being worked on) that can reduce background noise without making much of a change to the images since it just acts on the parts of the shot that are not moving much, and those parts, like blank out of focus walls or sky are where you see noise the most, and such noise can be amplified in to mosquito noise and block artifacts by some compressed image formats.

Its free if you want to try it, the workflow would be:

1) R3D

2) R3D to REDCINE-X outputting 48bpp TIF (or 30bpp or 48bpp DPX)

3) TIF to DANCINEC.EXE (tm) outputting TIF/DPX/CIN/BMP

4a) BMP to VirtualDUB to MPEG4v2 (MPEG4 is like H.264) for upload to Vimeo (tm) etc.

4b) TIF/DPX/CIN for conversion to 35mm print or for making DCP

The key is not to increase the contrast in grading the input TIF files too much as if you make the noise too high contrast its hard to tell the noise from subject movement, its better to grade harder and sharpen AFTER the temporal noise reduction if you need to.

Works better on static camera shots, with the noise threshold between 0.025 and 0.050, and a window of 7 frames. The window can be as large as 49 frames and the threshold as high as maybe 0.09 for shots that need heavy de-noise, but you need to review the processed footage to see if any issues are produced like un-even noise reduction.

You might cut the size of the space needed for Blu-ray (tm) as well, and so be able to encode at a higher bit rate etc. to get fewer compression artifacts.

Since it does not make much of a footprint if the noise is light to start with, you can apply other noise reduction after if needed to get maybe better results.

If you have any questions you can email me, my email is at the top of each page at my web site, put 'REDUSER temporal noise reduction' in the subject line so I know its not junk mail, thanks.
 
Absolutely, I agree. I think we can cover a lot of ground from the most accessible of solutions (AME, Compressor, etc) to the more advanced, high end tools people are using. I think it will all be helpful. Here are some screen shots of X264 implementation in MPEGStreamclip. My guess is it's exactly what you used. Like I said, these controls are probably not as advanced as some other tools, and therefore may not be the ideal choice for everyone.
Flags.jpg

Values.jpg

Behavior.jpg

Tagging.jpg

Where do you find these settings in Streamclip?
 
A friend of mine works at Giant, which does encoding for tons of Hollywood DVD and Blu-rays, and I worked out of his office for around 18 months, so I got pretty familiar with how it's done.

The reason that "high-end" encodes look so good at low bit rates is because they encode different parts of the film differently. A dedicated person (the "compressionist") does an initial encode with normal settings, and then watches each and every scene. When there is a problem with the compression on a particular shot, he fires off a re-encode, with different settings until he finds a group of settings that work well on that particular shot. If the initial encode takes a day, re-encodes could take the rest of the week. The encodes are compared against each other in split-screen, and by toggling back and forth. (This is all done on expensive, calibrated monitors in a dark room.)

I don't know if x264 has functionality to splice together compressed segments, but the high-end tools all do, at least for the H.264/VC-1 codecs.
 
Even within Final Cut and Compressor You can also improve results using compression markers on scene changes, especially with fades etc where long GOP compression exposes macro blacking as i-frames fall outside the deepest black segment.

It's really very much about how much time you spend trying to encode things in a particular environment, and how flexible your encoder is.
 
There is also the fact that one size does not fit all, and one set of settings can't possibly be optimal for every scene in a show. That's why scene by scene programmed compression is what's done for DVD and BluRay releases. And that compression is controlled by a compressionist, a person whose sole job is to determine proper optimal compression settings on a per scene basis based on the total "bit budget," or the required final file size. That's one reason why studio level DVD's have always looked a lot better than those produced by individuals using single compression settings, regardless of the compression engine. When there are fewer compromises, there are better results.

Fully agree. There are also better results when employing a highly knowledgeable and experienced professional -and downsides when you try to do everything yourself as a "one man band".
 
I don't know if x264 has functionality to splice together compressed segments, but the high-end tools all do, at least for the H.264/VC-1 codecs.
Hi Erich,

Can you tell us what software was being used to splice together compressed segments, or the names of any that you know?

@ Steve: this is a great thread. Thanks for starting it!
 
I posted this in another thread, and thought it might fit our theme of easy ways to encode directly off NLEs. Here's how to get compressed 4K H.264 files straight out of Premiere Pro -

If you want a quick 4K viewable file out of Premiere Pro then H.264 is an option too. Choose H.264, go for the HDTV 1080p preset. First thing you do then is choose Level as 5.1. That unlocks 4096x2304 at upto 27fps. If you are shooting 30p, 4096x2048 is possible. Level 5.2 gets you 4K at 60fps, but CS5.x doesn't support that natively. ~80-120 Mbps is excellent quality. Of course, the best compressed 4K is using DebugMode Frameserver to X264. I am amazed how good 4K X264 files look at ~16 Mbps.

A warning about 4K H.264 files - some players like VLC or Quicktime choke up as they are not optimized for Level 5+. The key is DXVA accelerated players - I have tried it on a $350 AMD E-350 netbook and it plays just fine! Also works with VDPAU for Linux distros. Haven't found a reliable solution for Mac OS X though. I don't like VLC, at all, but here's hoping inbound VLC 2.0 clears up L5+ support. I know VLC 2.0 uses DXVA on Windows, hopefully there's some optimizations for the OS X version too.
 
x264: I like this codec. Using it as a 10 bit archival backup of several million frames of every take of more than one season of a very popular TV series. Almost indistinguishable from our telecines. Using command line version. Gets about 6 fps on an i7 .
 
There's an X264 lossless mode which scales up to 4K, 4:4:4 and 10-bit. It is pretty amazing - it gets you lossless images at a lower bitrate than ProRes 4444 (which is lossy, of course). That said, CRF12 images are almost indistinguishable for most scenes at a fraction the bitrate as lossless.
 
I did some h264 encoding tests recently, and the MainConcept encoding with Sorenson Squeeze blew my Compressor encodes out of the water. I suppose the multiple passes help quite a bit. Takes probably 4x as long as with Compressor though.
 
Is uploading prores422hq still the best quality option for youtube as per Jake Blackstone's suggestion in the encoding thread from January?

http://www.reduser.net/forum/showth...Video-Codecs-Resolutions-amp-Data-Rates/page2

http://www.youtube.com/watch?v=ynrGtPmgJ90

If you want to do a test to see what Youtube will do to your footage, you can re-encode the file you're about to upload to h.264 at around 4Megabits per second. That is what youtube will do to your video.

The less compressed of an image you feed into it, the better it will be. Youtube/Vimeo et. all will always be a third generation copy of your source material:

Source (1st generation) --> Intermediate uploaded to youtube(2nd generation) --> Final result (3rd generation)

The key is to make sure the 2nd generation file is as visually close to the source as possible. ProRes is a very solid way to deliver this, but files could exceed the upload limitation size of the site you're going to.

A very high bit-rate h.264 file will also be comparable to ProRes. Make sure you put it in a .mp4 container for maximum compatibility.


Stay away from delivering anything inside of a .mov container! At some point you will run into Quicktime Gamma shift. I try to avoid delivering .mov files to anything other than a total apple workflow if at all possible.
 
Back
Top