Open strarsis opened 3 months ago
You'd have to check with x264 folks what kind of acceleration it has for your arch. 30 fps sounds pretty good for software encoding on a potato-class device. There is no point in explicitly passing enable for that, stuff like that is enabled by default.
@BtbN: Well, before you posted the comment, I manually built ffmpeg
on that system, with NEON support explicitly enabled, and indeed, the performance was the same (30fps with ultrafast
, 3 to 4 fps with superfast
, one step below) as with this ffmpeg build.
My expectations with using ARM/NEON had been a bit higher. In fact, I have really hoped that even a 2-core ARM CPU with NEON extensions allows the realtime re-encoding of a 2K H.264 stream (its flaky data necessitating a re-encode). I think I avoided this workaround now by updating the firmware of the stream source and some changes to the protocol and video-copy settings used.
Not sure what specific device you got there, but even the latest Raspberry Pis will struggle with any kind of advanced software encoding. Those CPUs are incredibly low power and thus pretty dang slow.
In this case it is an Amazon EC2 t4g.nano
instance (Graviton ARM CPU):
https://aws.amazon.com/blogs/opensource/optimized-video-encoding-with-ffmpeg-on-aws-graviton-processors/
The graphs and such look great (notably under the section Live stream encoding), but now I think that nano
is a little too small of an SKU for this – or I missed something crucial.
The ffmpeg
binary from this repository was installed by following these instructions:
https://arthurpello.medium.com/how-to-install-ffmpeg-on-aws-arm-amazon-linux-2023-graviton-c4bc092260bf
The current
ffmpeg
build (from this repository) runs with 30fps on a relatively low-powered ARM Linux system, but withultrafast
preset. Any preset belowultrafast
results in much lower fps. How can I find out whether theffmpeg
build indeed uses thearm
processor hardware acceleration and NEON for H.264 re-encoding?Edit: Under
/proc/cpuinfo
asimd
is listed, which should be the same asneon
, just the older name for it.ffmpeg -buildconf
does not list--enable-neon
flag.