Hacker News new | ask | show | jobs
by qwerty456127 971 days ago
Aren't modern video codecs prohibitively computationally expensive for mediocre office-class PCs?
3 comments

That depends on what you mean by modern - AV1 is definitely a struggle, but VP9, H.265, H.264, and even VP8 are all much better than Theora in terms of quality and performance, and hardware supported decode goes back many years even on things like Intel integrated graphics hardware.
Not really, my laptop is intel 5000 series dual core, it can handle 720p AV1 video. I did get a few dropped frames, but I had to go into "Stats for nerds" to see that they dropped. When I switched to vp9, I still had some dropped frames anyway, so it's slow regardless

My laptop doesn't have a 1080p screen, but trying 1080p it could do some videos better than others.

in this one I only dropped 2 frames:

https://www.youtube.com/watch?v=m1jY2VLCRmY&list=PLAMlLc3Zgg...

> it can handle 720p AV1 video. I did get a few dropped frames

I'm sorry for being ambiguous. I meant encoding, not decoding. In my opinion an average PC should be able to encode at least some minutes of video in reasonable time.

Whatever, having to recourse to frame dropping (even in a negligible degree) means having 100% CPU or IO load already reached, doesn't it? 100% load on 720p playback sounds bizarre. I have been accustomed to any video playback taking just a few percents on any old computer with Intel graphics.

Encoding on a PC is an edge case, especially on software. Just hardware encode H264 at that point

> I have been accustomed to any video playback taking just a few percents on any old computer with Intel graphics.

it's using like 160% of a hyperthreaded core, so not even completely saturating a laptop from 2015 (8 years ago) - I don't know why it needs to drop frames though (single core too slow?)

dav1d can decode 4K video in realtime on a pretty normal office-class PC. The real issue for is mobile.
Mobile doesn't have 4K screens, any phone released in the last few years can handle 1080p or 1440p AV1

I mean ANY phone. My phone is $160 from 2019 and it can play 1440p AV1 on youtube (with a few frame drops, but nothing noticeable), even though it has a 720p screen. I'd have to get my OnePlus 3 (2016) to stutter in 1440p

note that the OnePlus 3 would stutter in h264 1440p as well, it's just old

It's not only about “handle”, it's about not eating through all of your battery before you're done watching the video. But no, “any” phone cannot reliably play 1080p AV1:

https://www.spiedigitallibrary.org/conference-proceedings-of...

“Overall AV1 real-time playback of 720p 30fps @ 2Mbps is feasible for low-end devices with 4 threads and 1080p 30fps @ 4Mbps is feasible for high-end and mid-range devices with 4 threads using Dav1d decoder.”

> it's about not eating through all of your battery before you're done watching the video

we're talking about hours of playtime before you run out of power, you can verify this on your own phone on youtube right now, go enable av1 and marvel at how YOUR phone can play these videos at 1080p

> Overall AV1 real-time playback of 720p 30fps @ 2Mbps is feasible for low-end devices with 4 threads and 1080p 30fps @ 4Mbps is feasible for high-end and mid-range devices with 4 threads using Dav1d decoder

Why only 4 threads? My phone from 2020 has 8 cores/8 threads and a 720p screen

https://www.gsmarena.com/oppo_a32-10454.php

So even if it doesn't handle some 1080p videos that I haven't tested, I should probably be watching them at 720p since that's all my phone can do.

> Why only 4 threads? My phone from 2020 has 8 cores/8 threads and a 720p screen

Of which half of them are small cores (Cortex-A53), which is pretty likely to throw a spanner in the works of the threading model. But hey, feel free to inform the dav1d authors that their dav1d paper benchmarked dav1d wrong.

I didn't say they did it wrong, I asked a question. It wasn't a rhetorical question.

Anyway, this point might be moot because dav1d has released several versions with further NEON optimizations after the paper

https://code.videolan.org/videolan/dav1d/-/tags/1.1.0

https://code.videolan.org/videolan/dav1d/-/releases/1.2.1

https://code.videolan.org/videolan/dav1d/-/releases/1.3.0

> Mobile doesn't have 4K screens . . .

The Sony Xperia 1 series does (along with a headphone jack, microSD card support, notification LED, a hardware camera button, no hole in the screen for the front camera, etc.).

That's a high end device that can chew through 4K AV1 video like no tomorrow