3 ms·
Isn't that largely dependent on hardware acceleration from CPU manufacturers? Or is ffmpeg always software encoding?
by zionic 6y ago
Isn't that largely dependent on hardware acceleration from CPU manufacturers? Or is ffmpeg always software encoding?
- oefrha 6y agoFFmpeg isn’t “always software encoding”, that statement doesn’t make much sense since FFmpeg/libavcodec is more of an interface and you can add support for any external encoder/decoder, hardware accelerated or not. However, FFmpeg’s builtin encoders and the most popular external encoders including x264 and x265 are all software encoders. There are hardware accelerated encoders from GPU vendors, e.g. the nvenc encoder for H.264 and H.265 is available for use on Nvidia GPUs if your FFmpeg is compiled against CUDA SDK. It’s a lot faster than x264 and x265 on comparable settings but results are usually a bit worse. You were probably thinking about hardware decoding though.
- donatj 6y agoI'm curious why hardware encoding is generally worse? All my experiments with it (h264/h265) have lead to significantly lower quality output to the point that I've avoided it for any final outputs, but I always assumed I was doing something wrong.
- oefrha 6y agoI’ve written various applications on top of FFmpeg but never looked into encoder technicalities, so I don’t know if and why GPU encoding has fundamental limitations. I heard nvenc has vastly improved on RTX cards; I’m still rocking an old GPU so can’t verify that, but presumably that means there’s no fundamental weakness and GPU encoding is just playing catch up?
- tomku 6y agoHardware encoding cares about consistent real-time output above all else, with power usage as the runner-up. It can focus on that because software encoders are just flat-out better for use cases involving quality - they have access to more flexible/accurate math, they don't necessarily have a real-time/low-latency constraint, they can be updated when new encoding tricks are discovered, they can be massively more complex without ballooning the cost of a device, etc. They're complementary options rather than competing. Each does something well, and it sounds like you want the thing that software encoding does.
- sudosysgen 6y agoffmpeg supports CPU, CPU-Accelerated and GPU-accelerated encoding and decoding.