News for hackers. Stuff that matters.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by crazygringo on Wednesday December 21, 2022 @08:58PM (#34088791)
That's a gigantic savings, but not surprising since film grain (or noise generally) is the worst thing to compress. It's hard to think of any other single "feature" improvement that could result in such massive gains.

I've always found it funny that the "HBO" branded intro to all their shows is produced of pure visual static. ([1] for anyone unfamiliar.) They literally couldn't have picked something worse to encode for streaming.

https://www.youtube.com/watch?v=O08PQRA6MLo

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by Scaevolus on Wednesday December 21, 2022 @09:31PM (#34088985)
At least the HBO logo decaying from analog noise to digital noise with compression artifacts makes sense.

I'm also amused when they drop confetti and the screen turns into blocky slush.

Another surprisingly hard to encode scene is water. Wave motion and shimmering is almost impossible to handle efficiently.

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by eru on Wednesday December 21, 2022 @10:20PM (#34089347)
I guess unless your codec handles water physics.

Which is not quite as absurd as it sounds. Have a look at the reflections in https://www.youtube.com/watch?v=udPY5rQVoW0

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by matt-attack on Wednesday December 21, 2022 @11:15PM (#34089723)
Similarly whenever I take photos in the forest they come out looking like complete garbage. It occurred to me it’s the image compression completely falling apart. Color gets totally desaturated too.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by kqr on Thursday December 22, 2022 @01:44AM (#34090549)
It's also that a forest is incredibly three-dimensional and layered, which contributes a lot to how you experience it. A photograph shows only a 2D projection of this, obviously.

Capturing depth in a satisfying way in a photograph is a skill that can be learned, but often it's impossible. (The skill is really about learning to see the small set of perspectives that do translate meaningfully to a 2D projection.)

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by bayindirh on Thursday December 22, 2022 @02:39AM (#34090852)
> Capturing depth in a satisfying way in a photograph is a skill that can be learned, but often it's impossible.

My photography teacher told us "If you can't see the same thing (that you see with your eyes) via the viewfinder, don't take that photo". It took me a decade to completely understand what she meant.

One day it clicked at a very mundane moment, but it was pure enlightenment.

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by kqr on Thursday December 22, 2022 @03:41AM (#34091169)
But even the viewfinder is forgiving in this respect, because parallax allow you to sense depth through small perturbations of the position of the camera! So eventually, you will learn to imagine in your head what a scene looks like when projected onto a sheet of still paper.

(Bonus: the parallax effect can be exploited to convey depth also on a print, actually. A comparatively long exposure time will, depending on light levels, emphasise or de-emphasise motion closer to the camera in motion blur effects, that vary in size and intensity depending on the two things above.)

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by getcrunk on Thursday December 22, 2022 @03:24AM (#34091077)
Try avif?
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by TaylorAlexander on Thursday December 22, 2022 @12:59AM (#34090311)
I shot beautiful 4k telephoto video of hummingbirds cleaning themselves in a fast running stream and YouTube is totally unable to display the content at a satisfactory level. It’s such a bummer it was such a cool shot and I can’t really share it!
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by tgsovlerkhgsel on Thursday December 22, 2022 @03:59AM (#34091257)
Can you upscale it to 8k (not sure if Youtube supports it)?

I'm often watching videos at a resolution larger than my screen can display just to get the extra bitrate.

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by TaylorAlexander on Thursday December 22, 2022 @01:14PM (#34096480)
I can try! Thanks for the suggestion.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by whalesalad on Wednesday December 21, 2022 @09:32PM (#34088990)
The static intro has been HBO's thing for a long time, before digital transmission was a thing.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by genghisjahn on Wednesday December 21, 2022 @10:55PM (#34089600)
I remember watching this one from 1983 so many times...

https://www.youtube.com/watch?v=GjYDBLnHE1Y

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by thwarted on Thursday December 22, 2022 @01:14AM (#34090380)
Here's a making-of video for that.

https://www.youtube.com/watch?v=agS6ZXBrcng

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by hinkley on Thursday December 22, 2022 @01:23AM (#34090434)
I remember watching this video so many times as well.

Every time a movie came up 10 minutes short of the hour or half hour, they padded it with tiny documentaries and previews for other movies.

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by vegetablepotpie on Thursday December 22, 2022 @08:04AM (#34092832)
Was surprised to see that the HBO logo was not computer animated. It was literally a block of polished metal.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by cobertos on Thursday December 22, 2022 @08:15AM (#34092914)
Wow, the starburst is just a moire effect with transparencies? What a neat practical effect.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by fbnlsr on Thursday December 22, 2022 @07:06AM (#34092526)
This made me want to watch Justice's DVNO music video so bad: https://www.youtube.com/watch?v=GiDsLRQg_g4
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by yarg on Wednesday December 21, 2022 @09:49PM (#34089119)
Not with modern codecs, but there's probably a random seed somewhere that'll get you close enough.

Noise detection could be useful, if you can get noise that's close enough, it'd be a more than adequate substitute.

It'd also be useful for rain, which video codecs also struggle with.

Another thing is, a lot of modern video was generated, and composited - why not have that reflected in the codec?

You could directly encode the elements as understanded by the process used to generate them, rather than attempting to reconstitute things from a stream of bitmaps.

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by eru on Wednesday December 21, 2022 @10:20PM (#34089352)
> You could directly encode the elements as understanded by the process used to generate them, rather than attempting to reconstitute things from a stream of bitmaps.

You might like Gan Theft Auto: https://www.youtube.com/watch?v=udPY5rQVoW0

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by seanp2k2 on Wednesday December 21, 2022 @10:25PM (#34089394)
They could have bundled it into the app to save hella bandwidth, or done something similar to Samsung's awful generator that comes on when you select an input without a signal.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by whalesalad on Wednesday December 21, 2022 @10:03PM (#34089228)
was just thinking of this - like vectors vs bitmaps - wonder when we will see video transmission enter that arena
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by upbeat_general on Wednesday December 21, 2022 @11:05PM (#34089659)
My guess is because there’s a lot of ways of making things digitally and it’d need to be a really complex codec.

On the other hand, deep-learning based compression with autoencoders or something similar is pretty promising, since it can learn the constituent elements in a more general way, independent of what program was used to create it.

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by zbobet2012 on Wednesday December 21, 2022 @11:58PM (#34089996)
The process described uses a feature of AV1 to generate film grain based on parameters. Or exactly what you proposed.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by rkagerer on Wednesday December 21, 2022 @10:34PM (#34089461)
It's 2022 and I watched an ad in order to watch static...
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by jeffrallen on Thursday December 22, 2022 @02:06AM (#34090675)
4k static at that.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by throwaway742 on Thursday December 22, 2022 @02:08AM (#34090680)
Imagine watching ads in 2022.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by Caspy7 on Thursday December 22, 2022 @03:52AM (#34091225)
Goodly amount of static here - unclear to me how much of it is added and how much is original.

https://www.my80stv.com/

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by prvc on Wednesday December 21, 2022 @11:15PM (#34089722)
They could encode just the intro with bespoke settings and concatenate that to the bitstream of their other content if they really cared about making it look good.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by sixstringtheory on Thursday December 22, 2022 @12:41AM (#34090220)
I wonder how much savings they’d get by extracting things like that HBO intro or series intro songs and keeping a cached copy on the device, instead of downloading it with each episode? Or maybe they already do that?
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by dsr_ on Thursday December 22, 2022 @08:30AM (#34093000)
Let's estimate.

First, set up the scenario. You're going to binge-watch an HBO Max series that is 10 x 1 hour episodes. Each episode has the HBO static card (7s), a 1m45s intro sequence, and a 2m30s trailing credits sequence where the first 30s is episode-dependent but the last 2m is constant across the series.

This is a best-reasonable-case scenario, since we know that people do sometimes binge-watch a series like this. We can construct unreasonable scenarios which would do better (10 minute loop of an aquarium played for 24 hours) but they would be unreasonable. More often, I think, people tend to watch one movie or one episode of a show and then switch to something else or leave.

The receiving device needs to have 3m51s of storage available for reuse across episodes. That's not unreasonable. At a 4K streaming rate of 10GB per hour (Youtube 4K uses more than this, Netflix uses less) that would be 260MB or so.

That number does sound unreasonable, though. A typical streaming device has between 1 and 4GB of RAM available -- an Amazon FireStick 4K has 2GB, various modern Roku devices have 1 to 2 GB -- and eating a quarter of that speculatively does not make sense to me.

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by waltbosz on Thursday December 22, 2022 @01:26AM (#34090453)
Did anyone else notice that when HBO adapted that snow intro to wide screen, it looks like they just cloned an existing chunk of snow onto the left and right borders.

Maybe it's just an illusion. But I swear I can see the seams where the widescreen pixels start

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by fshbbdssbbgdd on Thursday December 22, 2022 @08:13AM (#34092890)
That’s one way to make it compress better.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by renonce on Thursday December 22, 2022 @10:18AM (#34094145)
Are modern digital video formats good at compressing chunks of pixels far apart in the video screen? It's not like zlib where identifying duplicated chunks is part of compression.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by Tuna-Fish on Thursday December 22, 2022 @02:27PM (#34097384)
The formats absolutely have the capability, but it's an another question if the encoder is capable of noticing the duplication.

(Modern video formats are not deterministic in that the same source always encodes to the same output for the same format. They are more like programming languages that they provide as set of tools you can use to compress various different kinds of redundancy out, but it's the job of the encoder to find that redundancy. For example, one of the tools typically available is to provide a source image to an off-screen buffer, and then when rendering the screen, occasionally provide offset/length pairs into that buffer instead of pixels. This could be used for efficiently encoding the duplicated noise.)

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by pdntspa on Thursday December 22, 2022 @02:23AM (#34090755)
I was recently compressing some Blu-Ray rips to H.265 and made the rather funny discovery that H.264 in its film profile with some additional NR can achieve better bitrates, a faster encode, and a smaller filesize at equivalent quality levels than H.265, for sources with heavy film grain.

For some reason ffmpeg's H.265 implementation doesn't have a film profile, I wonder why?

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by ahartmetz on Thursday December 22, 2022 @03:17AM (#34091034)
You are probably talking about the x264 and x265 encoders? The former was created by some obsessed people, the latter by employees. x264 goes above and beyond being a "good implementation". It is also less tuned according to "objective" (actually terrible) metrics than most codecs. Simplistic "objective" metrics encourage blurry images and sometimes odd spatial and temporal distributions of blurriness.

It would be nice to have a fantastic implementation of an h.265 encoder like x264, but alas.

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by extraduder_ire on Thursday December 22, 2022 @10:31AM (#34094303)
My favourite novel things about x264 are probably the tuning preset called "touhou", literally for better encoding things that look like a bullet hell game, and that the highest quality preset is called "placebo".
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by pdntspa on Thursday December 22, 2022 @10:57AM (#34094670)
I can't edit the post now but you are correct. I thought the profiles were inherent to the spec, and I seem to be mixing up profiles and tunings, but it sounds like they're just implementation details in x264/x265

Still, it was really interesting that

  ffmpeg -i bluray:[filename] -c:v libx264 -crf 22 -tune film -preset slow -nr 500
produced a smaller file with higher visual quality than

  ffmpeg -i bluray:[filename] -c:v libx265 -crf 25 -preset slow
for highly grainy inputs
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by tgsovlerkhgsel on Thursday December 22, 2022 @04:00AM (#34091263)
At some point I was wondering whether some shows add film grain at least partially to make piracy more annoying.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by lozenge on Thursday December 22, 2022 @05:16AM (#34091845)
I suspect nobody involved in the production process is watching their shows at the bitrates that they will actually reach customers with.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by renox on Thursday December 22, 2022 @07:18AM (#34092596)
Which is why there was the GoT horrible dark artefacts battle scene..
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by BuildTheRobots on Thursday December 22, 2022 @05:22AM (#34091880)
I always wondered if this was a deliberate pre-show test of the transmission channel's compression.

I remember noticing as a kid that some channels on cable TV were noticeably worse quality (far more blocky iirc, looked very MPEG artifacty) than the analogue broadcast equivalent and that others looked very different between even cable and satellite tv (iirc More4 was one of the more obvious ones, looked OK on Sky but awful on NTL).

The HBO static intro screen was worst case for compression but gave a pretty good indication of the quality (of the bitrate/compression) of the rest of the show; which worked for broadcast, recordings or downloads. Probably not deliberate, but actually kinda useful.

Re:Netflix: 30% bitrate saving using Film Grain Synthesis by edb_123 on Thursday December 22, 2022 @08:42AM (#34093106)
I always used to think of it as a clever way to ramp up the bitrate right before the actual content started.
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by hyperbovine on Thursday December 22, 2022 @08:08AM (#34092848)
Assuming they really cared, they wouldn't bother encoding it, they would embed it in the binary of their app. The Shannon entropy of this clip is zero, it occurs with probability one in every show, hence it is infinitely compressible :-)
Re:Netflix: 30% bitrate saving using Film Grain Synthesis by xattt on Thursday December 22, 2022 @08:15AM (#34092910)
You would assume that an updated version of the HBO intro would go from a seriously degraded version of the video to a perfect picture.

Update it every decade or so to reflect artefacts of whatever in-house codec they use at the time. The ramp-up would be a creative exercise for the techies working in the studio.