Live data from Hacker News

Rav1e: An experimental AV1 video encoder, designed to be fast and safe

github.com

31–40 of 76 posts

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#31
post #14
post #5

> ~5 fps encoding @ 480p How does this compare with the reference encoder?

The readme didn't specify the --release flag in the cargo run command, this should make a pretty big difference

I sent a PR; as they merged, they mentioned their test scripts use it...

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#32
post #19

Earlier quoted context omitted.

Yes, it's just that everyone is focusing on size/bandwidth optimization for now. Once they nail down the actual format, projects will start work on making it fast.

I believe the possibility of "making it fast" is taken in account in the existing design, to avoid designing a format which can't be cheaply optimised & hardware-implemented.

Right, the encoder is given a lot more options, which leads to a combinatorial explosion when searching for an optimal encoding. Once the options that actually pay off are identified, encoders will be able to tune their heuristics and narrow down the search space.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#33
post #30
post #21

Earlier quoted context omitted.

Yes, but not only Rust, rather any memory safe system programming language all the way back to ESPOL in 1961. In those languages you have "Logic errors" to debug, in C and its direct descendants you have "Logic errors" + "UB errors" + "Memory corruption errors" to debug. Also having the use of unsafe explicit in the type system, means that it is relatively easy to track down where such issues might occur, whereas in…

> Yes, but not only Rust, rather any memory safe system programming language all the way back to ESPOL in 1961. Yes, but now we're discussing only those that practically matter to more than 5 people today.

I bet Unisys MCP deployments still matter to more than 5 people.

Plus the point was to talk about safe systems programming languages in general.

Or should we ignore history just because UNIX won on the server?

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#34
post #29
post #6

Earlier quoted context omitted.

I always wondered if in practice it really checks out, is rust code really safer? Did the bugs just shift to different ones? Is there anyone who wrote about that already?

> I always wondered if in practice it really checks out, is rust code really safer? Did the bugs just shift to different ones? Bugs don't magically "shift". If you eliminate a class of bugs, it's gone (e.g. memory bugs). Whether you can still have other bugs (e.g. logic bugs) that's irrelevant, you could still have those in C as well.

Or, the way you eliminated one class opens up or makes more likely a different class. Maybe avoiding pointers makes it more likely to introduce logic bugs. It could also make some algorithm too slow, which one could call a performance bug.

I don't think it's particular likely, but there are always trade-offs.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#35
post #29

Earlier quoted context omitted.

> I always wondered if in practice it really checks out, is rust code really safer? Did the bugs just shift to different ones? Bugs don't magically "shift". If you eliminate a class of bugs, it's gone (e.g. memory bugs). Whether you can still have other bugs (e.g. logic bugs) that's irrelevant, you could still have those in C as well.

Or, the way you eliminated one class opens up or makes more likely a different class. Maybe avoiding pointers makes it more likely to introduce logic bugs. It could also make some algorithm too slow, which one could call a performance bug. I don't think it's particular likely, but there are always trade-offs.

As proven by Ada, Modula-2 and a few other systems languages, you don't need to scatter pointer arithmetic all over your code to achieve the same machine language output.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#36

Will AV1, or even VP9 for that matter, ever be suitable for realtime encoding, or is that just not their target market?

Yes, of course. Anything else would be DOA. On a general note: there really seems to be an extremely inaccurate narrative regarding AV1 and speed taking hold. I can't understand why it isn't easier understood that a reference implementation is about accuracy only, completely ignoring performance considerations. Not in the usual "we'll now try to make it faster", but as in "this is never meant to be used in production…

> As but one example: media encoding is pretty close to being "embarrassingly parallel" in principle

Which part? 90% of what you're doing is context or inter-frame dependent. Video encoders that live on graphics cards today use dedicated ASIC hardware.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#37
post #36

Earlier quoted context omitted.

Yes, of course. Anything else would be DOA. On a general note: there really seems to be an extremely inaccurate narrative regarding AV1 and speed taking hold. I can't understand why it isn't easier understood that a reference implementation is about accuracy only, completely ignoring performance considerations. Not in the usual "we'll now try to make it faster", but as in "this is never meant to be used in production…

> As but one example: media encoding is pretty close to being "embarrassingly parallel" in principle Which part? 90% of what you're doing is context or inter-frame dependent. Video encoders that live on graphics cards today use dedicated ASIC hardware.

You can divide the video into chunks and encode the chunks in parallel. This is what Netflix does:

https://medium.com/netflix-techblog/high-quality-video-encod...

https://medium.com/netflix-techblog/dynamic-optimizer-a-perc...

Works well when you're doing video at the scale of Netflix, but not necessarily much help to the individual user who just wants to encode a video.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#38
Just curious, what's the memory footprint on the encoder in real life?

Do different video encoders, for the same codec, and input produce different outputs, or is the algorithm specified in a way where it produces the same results for two given inputs, no matter what?

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#39
post #38

Just curious, what's the memory footprint on the encoder in real life? Do different video encoders, for the same codec, and input produce different outputs, or is the algorithm specified in a way where it produces the same results for two given inputs, no matter what?

Virtually all of the consumed memory is from the reference frames, so it depends on how big your video is. AV1 supports up to 8 reference frames, though if you're memory constrained you could use less.

Different encoders produce different outputs, the algorithm isn't specified.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#40
post #36

Earlier quoted context omitted.

> As but one example: media encoding is pretty close to being "embarrassingly parallel" in principle Which part? 90% of what you're doing is context or inter-frame dependent. Video encoders that live on graphics cards today use dedicated ASIC hardware.

You can divide the video into chunks and encode the chunks in parallel. This is what Netflix does: https://medium.com/netflix-techblog/high-quality-video-encod... https://medium.com/netflix-techblog/dynamic-optimizer-a-perc... Works well when you're doing video at the scale of Netflix, but not necessarily much help to the individual user who just wants to encode a video.

> You can divide the video into chunks and encode the chunks in parallel.

What about live encoding?

Post reply on HN