4 ms·
Existing encoders have suported this for ages using multipass. In the first pass of multipass encoding, the input data from the source clip is analyzed and stor
by out0fpaper 6y ago
Existing encoders have suported this for ages using multipass. In the first pass of multipass encoding, the input data from the source clip is analyzed and stored in a log file. In the second pass, the collected data from the first pass is used to achieve the best encoding quality. In video encoding, two-pass encoding is usually controlled by the average bitrate setting or by the bitrate range setting (minimal and maximal allowed bitrate) or by the target video file size setting.
The best way to understand why this is used is to think of a movie — when there are shots that are totally, absolutely black, like scene changes, normal 1-pass CBR encoding uses the exact same amount of data to that part as it uses for complex action scene. But by using VBR and multipass, encoder “knows” that this piece is OK with lower bitrate and that bitrate can be then used for more complex scenes, thus creating better quality for those scenes that require more bitrate.
- bscphil 6y agoMy point is that if Netflix thinks they can do better, it would be great to see their code contributed to the public, since they're using an open source program to do all their encodes. Also, you're making a slight mistake. About a decade ago (?), x264 was changed so that even 2-pass mode is really just using CRF under the hood. It's not "achieving the best quality", it's just figuring out what quantizers you need to hit your average bitrate target exactly. Some more information about that here: https://trac.ffmpeg.org/wiki/Encode/H.264 https://trac.ffmpeg.org/wiki/Encode/H.264 > normal 1-pass CBR encoding You may be confusing constant bitrate (which no one should ever use) with CRF (constant rate factor), which varies the bitrate from frame to frame and scene to scene, without having to do a 2 pass encode.
- dmurray 6y ago> My point is that if Netflix thinks they can do better, it would be great to see their code contributed to the public, since they're using an open source program to do all their encodes. This really is their core business and somewhere they can have a competitive edge, though. Even if you think it's unethical or that it might make business sense to contribute back to the upstream projects, you can see why they might want to keep some of that secret sauce in-house.
- bscphil 6y agoFair enough, I'm not arguing that they're obligated to or anything, I just think it would be nice. I do suspect that catalogue matters much more at this point than any tiny competitive advantage they get through better encoding. And they've certainly been willing to share advances (like VMAF) in the past - that's why this tech blog exists, after all!
- ponker 6y agoBandwidth is a huge cost for these services and if they share encoding techniques then their competitors can cut prices at the margins.
- ksec 6y ago>since they're using an open source program to do all their encodes. Is that still the case? They switched from x265 to beamr for HEVC. Not sure if they are still on x264 on recent encodes.