[FFmpeg-devel] [RFC] QSV support clarifications

Gwenole Beauchesne gb.devel at gmail.com
Tue Oct 13 10:45:42 CEST 2015


2015-10-12 20:10 GMT+02:00 Stefano Sabatini <stefasab at gmail.com>:
> Hi all,
> I wanted to test QSV encoding and decoding, which is included since
> several months in FFmpeg, and have a few questions.
> 1. QSV encoding and decoding depends on libmfx, but no references are
> present in the code to the library, so I have to suppose that the
> required library is this one:
> https://github.com/lu-zero/mfx_dispatch

Luca's repo is indeed what allows it to build effortlessly, while also
supplying a DSO for libmfx.
It is also possible to build against the Intel supplied headers but a
correct pkg-config file is indeed missing, and additional configury
would be needed in the FFmpeg part to use the libs.private portions of
it. i.e. in case we are stuck to a static library.

FFmpeg should also provide an explicit link to libva-drm, since it
uses it in the MFX specific parts.

> While at it, do you know what's the point of the mfx_dispatch
> component (why adding the intel media library path to flags is not
> enough)?

Probably to select between the SW and HW implementations. :)

> 2. The mfx_dispatch library compiles fine on my system, but then I
> wonder how it is supposed to reference the Intel Media library:
> https://software.intel.com/en-us/intel-media-server-studio

IIRC, there is an installation script in the Media Server Studio.
However, I didn't use it but rather used the "Generic" variant and
installed everything into a dedicated subdirectory.

> ...
> I'm able to compile FFmpeg with --enable-libmfx after installing
> the mfx_dispatch library, and run this command:
> ffmpeg -i test.mp4 -c:v h264_qsv -y test.out.mp4
> but then it fails with:
> Error initializing an internal MFX session
> Running strace on the command it results that it's looking for the
> libmfxsw64.so library and failing:
> open("/lib/x86_64-linux-gnu/libmfxsw64.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> open("/usr/lib/x86_64-linux-gnu/libmfxsw64.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> open("/lib/libmfxsw64.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> open("/usr/lib/libmfxsw64.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> munmap(0x7f9a55072000, 155122)          = 0
> If I update the LD_LIBRARY_PATH to point to the intel media library in
> /opt/intel/mediasdk it will find the library and then hang.
> I had some hard time finding relevant information on the Internet, so
> I ask if you can help to clarify these points.
> I'll happily provide a few benchmarks and update documentation
> accordingly if I manage to make it work.
> --
> FFmpeg = Fancy and Forgiving Mean Problematic Excellent Gymnast
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Gwenole Beauchesne
Intel Corporation SAS / 2 rue de Paris, 92196 Meudon Cedex, France
Registration Number (RCS): Nanterre B 302 456 199

More information about the ffmpeg-devel mailing list