Open CraziFuzzy opened 7 years ago
If we can build them easily and FFmpeg can fall back on software when the hardware is missing, that is fine. Check pull #388, for example, this is one being investigated for ARM at the moment.
Hmmm. I'll have to investigate that. I don't believe ffmpeg ever will fallback to using a codec that is not specified. nvenc_h264, h264_qsv, and h264 are all completely separate encoders. It would probably be up to the application to make sure it's requesting the right encoder.
If they show up as additional encoders, yeah, doesn't sound like that would cause any issues.
Yeah, as far as I know, they are pretty independent from the existing software codecs. What I don't know is how difficult it would be to build, I have always used pre-built binaries, on both windows and linux. I don't know if it's as simple as enabling an additional switch, or if other 3rd party libraries need to be included as well. The first source of info I know of on it is here: https://trac.ffmpeg.org/wiki/HWAccelIntro Might make more sense to you than I.
Ok, let's keep this issue open so others can check this out as well and weigh in. Thanks for the link!
FYI, support for Intel QSV as been merged with pull https://github.com/bytedeco/javacpp-presets/pull/485.
MMAL and OpenMAX acceleration has also been merged with pull #388 for ARM platforms. Is there any other supported APIs worth adding?
I committed Nvidia NVENC as well. As far as I know, there is no other hardware codecs in ffmpeg. I think this issue can be closed.
There are a couple of others like OpenCL, but I remember having issues with that one previously...
As for OpenCL, it's currently only used for filtering, encoding/decoding is not supported for now. https://trac.ffmpeg.org/wiki/HWAccelIntro
And official ffmpeg seems not to be built with --enable-opencl
for windows platform.
Apparently I can't help this.
On Windows 7 64 bit, JavaCV 1.4, on Skylake (with switchable graphics, I've a AMD GPU as well), I get following:
40 [h264_qsv @ 00000000219bbde0] Initialized an internal MFX session using hardware accelerated implementation Could not open codec: Internal bug, should not have happened
Any ideas how to debug this? This happens both trying mpeg2_qsv and h264_qsv.
Edit: Same on a computer with only Intel graphics.
@mifritscher Please ask upstream about bugs in libmfx: https://github.com/lu-zero/mfx_dispatch/issues
Also, maybe try again with the new cmake-based build on git master if you can.
Is there a technical or licensing reason that would prevent enabling the various hardware accelerated codecs in the ffmpeg.jar?