News for hackers. Stuff that matters.
Re:How Facebook encodes videos by yaur on Sunday April 25, 2021 @10:50PM (#26938767)
This used to be true but modern NVIDIA cards beat x264 on both quality and energy cost.
Re:How Facebook encodes videos by izacus on Monday April 26, 2021 @02:40AM (#26939905)
Any links for this? Since my experience shows that Ampere encoding blocks still aren't close to x264 / slow preset when it comes to saving bandwith and delivering quality.

Even with power savings it was usually more economically efficient to run encodes on a large (12+ core) machine than to deal with limited amount of nvenc slots on GPUs.

Re:How Facebook encodes videos by astrange on Monday April 26, 2021 @01:28AM (#26939486)
I believe it, and of course it's going to be better on energy cost. Is that because it supports newer codecs though, or is it on H.264?
Re:How Facebook encodes videos by Wowfunhappy on Monday April 26, 2021 @12:56AM (#26939346)
They do?! Even on the slow presets?
Re:How Facebook encodes videos by paulmd on Monday April 26, 2021 @01:25AM (#26939468)
NVENC beats x264 medium. Not quite up to the level of the "slow" presets yet but you have to throw a huge amount of hardware at it to match them let alone beat them. Basically the number I came up with a few weeks ago from playing around with x264 settings on ffmpeg was between 6 and 12 cores to keep up with NVENC at 720p and 1080p, depending on framerate and the quality preset.
Re:How Facebook encodes videos by ksec on Monday April 26, 2021 @02:01AM (#26939683)
What sort of bitrate are we talking about? I haven't tried using NVENC for years and last time I check it was clearly missing many details that x264 tries to preserve.

NVENC is good at cleaning the noise and fast encoding. ( Or basically Game Streaming ). Which isn't something you want to do if you want to do movies encoding.

Re:How Facebook encodes videos by paulmd on Monday April 26, 2021 @12:20PM (#26944337)
Re:How Facebook encodes videos by Wowfunhappy on Monday April 26, 2021 @01:13PM (#26945090)
> but you have to throw a huge amount of hardware at it to match them let alone beat them.

Sure, and I think hardware encoders are great when you need speed, certainly for real-time video. But in other cases, well, the medium preset sucks. I always encode videos at `veryslow`, and there's just no way to get close to that with a gpu.

Re:How Facebook encodes videos by BlueTemplar on Monday April 26, 2021 @09:00PM (#26950426)
How come ? This looks like to be easily parallelised, so GPUs should wipe the floor with CPUs ?
Re:How Facebook encodes videos by astrange on Tuesday April 27, 2021 @01:50AM (#26952473)
Video encoding isn't GPU-parallelizable. It's a good fit for either CPU+SIMD or custom ASICs. It's just a kind of compression, which means it's based on unpredictable if-statements, which is just what GPUs don't do.

You can mass parallelize it by encoding different clips on different CPUs, this is more optimal because it has less communication overhead.

Re:How Facebook encodes videos by Wowfunhappy on Monday April 26, 2021 @09:20PM (#26950613)
No idea, maybe it will change some day. But right now, if you want the best quality at the smallest filesize, nothing seems to come close to the best software encoders. Maybe x264 and x265 are just really good.
Re:How Facebook encodes videos by astrange on Tuesday April 27, 2021 @01:49AM (#26952462)
They're unusually good because 1. encoding research wasn't done on a business schedule 2. isn't done according to objective metrics (the main ones used, SSIM/PSNR, suck and you have to use human raters) 3. more varied and weirder testcases (some pirated movies, some video game screen recording, more anime).

There's a lot of other free video encoding tools, like avisynth plugins, that are just better than all professional tools. I'm not sure why this is, maybe customers aren't sophisticated enough.

Re:How Facebook encodes videos by BlueTemplar on Tuesday April 27, 2021 @04:15AM (#26953360)
What about AV1 ?