At a Loss with Video Compression? Here Are Some Encoding Basics and Artifact Removal Tutorials
While H.265 has been approved as the next-gen lossy delivery codec, we’re still watching a vast amount of video in H.264. In fact, even when H.265 sooner or later takes its place, videomakers will still be dealing with many of the same basic compression principles at work. Knowing all the variables of a delivery encoding job can help optimize bit efficiency, ensure the highest possible quality of media, and reduce the visibility of artifacting such as banding. Read on for a look at what drives the quality-to-compression ratio of your lossy-encoded delivery video, and how you can even ‘trick’ it in some cases.
Credit for these finds goes to DVXuser MattDavis, responding to a thread started by another user worried his Vimeo compressions artifacts (specifically banding) stem from the Canon C100. While it doesn’t appear that the camera is necessarily underperforming in its own encoding of underexposure, the discussion does shed some light on some qualities of footage that can have trouble translating well to H.264. Here’s the video of DVXuser draculr’s concern:
This raises a question that faces video uploaders to YouTube, Vimeo, or any major video hosting/sharing service: how much of the lossy conversion do we leave to the site, versus how much quality we manually take away ourselves beforehand? Almost invariably, such video services are chewing up and spitting out several encoding passes of your media, for those ubiquitous “HD on/of” or “360p/480p/720p…” options. Each service has its own processes, so a 1:1 match in quality can be difficult to arrive upon, but you can certainly encode for optimization. This tutorial by Jan Ozer of Streaming Learning Center goes into some of the basics for ensuring maximum control over your encodings:
Obviously due to the age of the video, some of the details are a bit out of date — again, the principles are the key things to take away from this presentation. For those interested, here’s a more recent (1 hour+) presentation Jan gave at NYU expanding on this topic, and taking it through to the monetization stage:
Or, for those specifically concerned with banding problems at the encoding stage, Nick Campbell has put together an After Effects tutorial (on GreyscaleGorilla) demonstrating some preemptive correction techniques, several of which emulate dithering:
The nature of compressions such as H.264 and H.265 means a continued tug-of-war with the artifacts demonstrated above, but a deeper understanding of compression may ease the struggle that uploaders face. These issues also carry over into the topic of resolution escalation, where it’s sometimes easy to forget that larger spatial dimensions (like 4K) matter progressively less at delivery if co-opted by increased compression visibility. Not every high-efficiency codec will use the same techniques as the H.264 family (REDRAY, for instance, will not), but in the meantime, knowing your encoding can only help!
- Original DVXuser Thread
- Video tutorial: Understanding the critical H.264 encoding options — Streaming Learning Center
- Jan Ozer — Vimeo Channel
- How to Remove Banding Artifacts in After Effects — GreyscaleGorilla
- Nick Campbell — Vimeo Channel
- The Future of Encoding is Almost Here: HEVC (H.265) is Coming to 1 Billion Devices
- Think Your Encoding Job is Tough? Every Netflix 'Watch Instantly' Video is Encoded over 100 Times
- Vimeo Respects the Specs: Better Audio Quality Encoding, Frame Rate Guidelines Update