master-of-zen / Av1an

Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding
GNU General Public License v3.0
1.46k stars 151 forks source link

Bare minimum CPU required? #605

Open ls-milkyway opened 2 years ago

ls-milkyway commented 2 years ago

Project document does not mention bare minimum CPU required based on SSE, SSE2, SSE3, SSE4.1, SSE4.2, SSSE3, AVX, AVX2, AVX-512, IMCI instruction sets? Plz include cores & it's effect on encoding time.

silverbacknet commented 2 years ago

If you just want any form of SIMD at all, SSE2. All of the encoders seem to support that, and none have MMX or SSE (aside from x264, if it still does). However, they also all support purely non-SIMD mode, if you need, and most have some level of NEON or Altivec as well.

But also figure the minimum x64 CPU to get even halfway decent performance anyway would be AVX-capable anyway. SVT-AV1 used to have an AVX2 minimum, the only one that high, but that was phased out in 2021.

ls-milkyway commented 2 years ago

But also figure the minimum x64 CPU to get even halfway decent performance anyway would be AVX-capable anyway. SVT-AV1 used to have an AVX2 minimum, the only one that high, but that was phased out in 2021.

The irony is ...most of the AV1 encoding projects do not mention this in their read-me files...long time back I remember trying to encode on my old laptop....after wasting lot of time ...only found that CPU needs AVX2 to encode?

shssoichiro commented 2 years ago

I don't know about SVT, but rav1e and aomenc at least will dynamically enable the instruction sets that your machine supports. Every mainstream encoder I've seen has worked the same way. If there are any higher requirements, it's likely to be from whoever compiled the binary.

In theory, av1an, rav1e, and aomenc should be able to compile and run on any i686 CPU. Of course, the performance if you tried to encode on a Pentium Pro would be atrocious. But, in theory you should be able to do it.

redzic commented 2 years ago

@ls-milkyway Av1an itself does not really have minimum cpu requirements, the only thing is that our Windows binary assumes sse2 but you can compile Av1an with -C target-feature=-sse2 if you don't have sse2 for whatever reason. SIMD is used in some places for Av1an but it uses runtime cpu detection for dispatching those function calls, so there is no specific instruction set that is absolutely required.

ls-milkyway commented 2 years ago

Of course, the performance if you tried to encode on a Pentium Pro would be atrocious. @redzic Yeah.....making you believe that process is sort of hung.....I mean not everyone is able to compile projects...just casually found about AV1 compression/performance ratio...so thought of giving it a try......it took so long to start...5 to 10 minutes it was showing CPU utilization 0.....then later found that Windows 10 is the minimum requirement (don't remember if this was true for Av1an ...but there was an av1 project) ......but lack of clear documentation is certainly causing casual encoders to switch to different encoding methods.

silverbacknet commented 2 years ago

I think you need to specify your hardware and environment, but it sounds like it's probably not particularly capable of encoding anything in a reasonable time. That's not "casual encoders," that's just asking far too much from your own resources.

ls-milkyway commented 2 years ago

That's not "casual encoders," that's just asking far too much from your own resources.

I mean casual encoders (sometimes professional encoders) who are not techie enough to understand/find why it is taking too long for a process to start or complete... without proper documentation....AV1 (best in compression is to quality ratio) has limited users (blame it on it's adaption or it's limited device compatibility)....further no proper documentation is causing encoders to use alternatives like VP9, X265 etc. Even SVT-AV1 has read-me with system-requirement section.