Question on release 1.12: How to enable MSDK on Windows?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Question on release 1.12: How to enable MSDK on Windows?

Martin Maurer
Hello,

first many thanks for the new release 1.12 of GStreamer.

In the release notes ( https://gstreamer.freedesktop.org/releases/1.12/ 
) there are the following entries:

In the highlights:

"new |msdk| plugin for Intel's Media SDK for hardware-accelerated video
encoding and decoding on Intel graphics hardware on Windows or Linux."

In new elements:

"msdk: new plugin for Intel's Media SDK for hardware-accelerated video
encoding and decoding on Intel graphics hardware on Windows or Linux.
This includes an H.264 encoder/decoder (|msdkh264dec|, |msdkh264enc|),
an H.265 encoder/decoder (|msdkh265dec|, |msdkh265enc|), an MJPEG
encoder/encoder (|msdkmjpegdec|, |msdkmjpegenc|), an MPEG-2 video
encoder (|msdkmpeg2enc|) and a VP8 encoder (|msdkvp8enc|)."

Can you describe how to enable it? It seems to be located in
gst-plugins-bad. I have seen in configure.ac the following lines:

dnl check for intel mediasdk
translit(dnm, m, l) AM_CONDITIONAL(USE_MSDK, true)
AG_GST_CHECK_FEATURE(MSDK, [Intel MediaSDK], msdk, [
   AC_ARG_WITH([msdk-prefix],
           AS_HELP_STRING([--with-msdk-prefix],
           [Use the provided prefix for detecting the Intel MediaSDK]),
           [AS_IF([test "x$with_msdk_prefix" != "x"],
                  [MSDK_PREFIX="$with_msdk_prefix"])],
           [AS_IF([test "x$MFX_HOME" != "x"],
                  [MSDK_PREFIX="$MFX_HOME"],
                  [MSDK_PREFIX="/opt/intel/media"])])
   MSDK_CFLAGS="-I$MSDK_PREFIX/include"
   MSDK_LIBS="-L$MSDK_PREFIX/lib/lin_x64 -lmfx -ldl"
   AC_SUBST(MSDK_CFLAGS)
   AC_SUBST(MSDK_LIBS)

   save_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$MSDK_CFLAGS $save_CPPFLAGS"
   AC_CHECK_HEADER(mfxdefs.h, HAVE_MFXDEFS_H="yes", HAVE_MFXDEFS_H="no")
   CPPFLAGS="$save_CPPFLAGS"

   save_LIBS="$LIBS"
   LIBS="$MSDK_LIBS $LIBS"
   AC_LANG_PUSH([C++])
   AC_CHECK_LIB(mfx,MFXInit,HAVE_MFX_LIB="yes",HAVE_MFX_LIB="no")
   AC_LANG_POP([C++])
   LIBS="$save_LIBS"

   PKG_CHECK_MODULES(LIBVA_DRM, libva-drm, HAVE_LIBVA_DRM="yes",
HAVE_LIBVA_DRM="no")

   if test "x$HAVE_MFXDEFS_H" = "xyes" \
       -a "x$HAVE_MFX_LIB" = "xyes" \
       -a "x$HAVE_LIBVA_DRM" = "xyes"; then
     HAVE_MSDK="yes"
   else
     HAVE_MSDK="no"
   fi
])
AM_CONDITIONAL(USE_MSDK_LIBVA,
     test "x$HAVE_MSDK" = "xyes" -a "x$HAVE_LIBVA_DRM" = "xyes")


So it seems I had to add --with-msdk-prefix and let it point to Intel
Media SDK,

which must be downloaded from Intel. I assume the Windows Version?

Where is the correct place to add --with-msdk-prefix? In the recipe of
the gst-plugins-bad?

There is the following line:

   MSDK_LIBS="-L$MSDK_PREFIX/lib/lin_x64 -lmfx -ldl"

It looks like it is Linux dependant due to "lin" in "lin_x64". Are there
always the Linux libraries used?

Shall/is "dl" available also on Windows?

It would be good to have a step-by-step instruction how to enable it.
Can perhaps someone who has already built it shed light on how to do it?

Many, many thanks!

Best regards,

Martin


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question on release 1.12: How to enable MSDK on Windows?

Scott D Phillips
Hi Martin,

On Fri, May 05, 2017 at 08:06:05AM +0200, Martin Maurer wrote:

> Hello,
>
> first many thanks for the new release 1.12 of GStreamer.
>
> In the release notes ( https://gstreamer.freedesktop.org/releases/1.12/ )
> there are the following entries:
>
> In the highlights:
>
> "new |msdk| plugin for Intel's Media SDK for hardware-accelerated video
> encoding and decoding on Intel graphics hardware on Windows or Linux."
>
> In new elements:
>
> "msdk: new plugin for Intel's Media SDK for hardware-accelerated video
> encoding and decoding on Intel graphics hardware on Windows or Linux. This
> includes an H.264 encoder/decoder (|msdkh264dec|, |msdkh264enc|), an H.265
> encoder/decoder (|msdkh265dec|, |msdkh265enc|), an MJPEG encoder/encoder
> (|msdkmjpegdec|, |msdkmjpegenc|), an MPEG-2 video encoder (|msdkmpeg2enc|)
> and a VP8 encoder (|msdkvp8enc|)."
>
> Can you describe how to enable it? It seems to be located in
> gst-plugins-bad. I have seen in configure.ac the following lines:

It looks like I totally forgot to add windows support in the autotools build.
Currently you can build it on windows with meson only, if you can use that. I
opened this bug for adding autotools build on windows:
https://bugzilla.gnome.org/show_bug.cgi?id=782230

> dnl check for intel mediasdk
> translit(dnm, m, l) AM_CONDITIONAL(USE_MSDK, true)
> AG_GST_CHECK_FEATURE(MSDK, [Intel MediaSDK], msdk, [
>   AC_ARG_WITH([msdk-prefix],
>           AS_HELP_STRING([--with-msdk-prefix],
>           [Use the provided prefix for detecting the Intel MediaSDK]),
>           [AS_IF([test "x$with_msdk_prefix" != "x"],
>                  [MSDK_PREFIX="$with_msdk_prefix"])],
>           [AS_IF([test "x$MFX_HOME" != "x"],
>                  [MSDK_PREFIX="$MFX_HOME"],
>                  [MSDK_PREFIX="/opt/intel/media"])])
>   MSDK_CFLAGS="-I$MSDK_PREFIX/include"
>   MSDK_LIBS="-L$MSDK_PREFIX/lib/lin_x64 -lmfx -ldl"
>   AC_SUBST(MSDK_CFLAGS)
>   AC_SUBST(MSDK_LIBS)
>
>   save_CPPFLAGS="$CPPFLAGS"
>   CPPFLAGS="$MSDK_CFLAGS $save_CPPFLAGS"
>   AC_CHECK_HEADER(mfxdefs.h, HAVE_MFXDEFS_H="yes", HAVE_MFXDEFS_H="no")
>   CPPFLAGS="$save_CPPFLAGS"
>
>   save_LIBS="$LIBS"
>   LIBS="$MSDK_LIBS $LIBS"
>   AC_LANG_PUSH([C++])
>   AC_CHECK_LIB(mfx,MFXInit,HAVE_MFX_LIB="yes",HAVE_MFX_LIB="no")
>   AC_LANG_POP([C++])
>   LIBS="$save_LIBS"
>
>   PKG_CHECK_MODULES(LIBVA_DRM, libva-drm, HAVE_LIBVA_DRM="yes",
> HAVE_LIBVA_DRM="no")
>
>   if test "x$HAVE_MFXDEFS_H" = "xyes" \
>       -a "x$HAVE_MFX_LIB" = "xyes" \
>       -a "x$HAVE_LIBVA_DRM" = "xyes"; then
>     HAVE_MSDK="yes"
>   else
>     HAVE_MSDK="no"
>   fi
> ])
> AM_CONDITIONAL(USE_MSDK_LIBVA,
>     test "x$HAVE_MSDK" = "xyes" -a "x$HAVE_LIBVA_DRM" = "xyes")
>
>
> So it seems I had to add --with-msdk-prefix and let it point to Intel Media
> SDK,
>
> which must be downloaded from Intel. I assume the Windows Version?
>
> Where is the correct place to add --with-msdk-prefix? In the recipe of the
> gst-plugins-bad?
>
> There is the following line:
>
>   MSDK_LIBS="-L$MSDK_PREFIX/lib/lin_x64 -lmfx -ldl"
>
> It looks like it is Linux dependant due to "lin" in "lin_x64". Are there
> always the Linux libraries used?
>
> Shall/is "dl" available also on Windows?
>
> It would be good to have a step-by-step instruction how to enable it. Can
> perhaps someone who has already built it shed light on how to do it?

The steps should be as simple as (1) Follow the Media Server Studio install
instructions, (2) build GStreamer. If that procedure isn't working then it's a
bug.

> Many, many thanks!
>
> Best regards,
>
> Martin
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question on release 1.12: How to enable MSDK on Windows?

Scott D Phillips
On Fri, May 05, 2017 at 05:10:02PM +0000, Scott D Phillips wrote:
> On Fri, May 05, 2017 at 08:06:05AM +0200, Martin Maurer wrote:

[...]

> > Can you describe how to enable it? It seems to be located in
> > gst-plugins-bad. I have seen in configure.ac the following
> > lines:
>
> It looks like I totally forgot to add windows support in the
> autotools build.  Currently you can build it on windows with
> meson only, if you can use that. I opened this bug for adding
> autotools build on windows:
> https://bugzilla.gnome.org/show_bug.cgi?id=782230

Posting here what I remembered and put in that bug, it's not that
I forgot autotools but building the msdk plugin requires MSVC
which isn't supported when building with autotools as I understand
it, so meson is the only way.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Question on release 1.12: How to enable MSDK on Windows?

Baby Octopus
Administrator
Is it possible to have msdk on Linux as well? I see the media SDK is available only for Yocto and not for Ubuntu & Centos

Any article which explains what all dependencies need to be installed to get MSDK working? That would be great
Reply | Threaded
Open this post in threaded view
|

Re: Question on release 1.12: How to enable MSDK on Windows?

Nicolas Dufresne-5
Le vendredi 05 mai 2017 à 23:30 -0700, Baby Octopus a écrit :
> Is it possible to have msdk on Linux as well? I see the media SDK is
> available only for Yocto and not for Ubuntu & Centos

MSDK support was officially landed in GStreamer few days ago, it might
take sometime. I have been told that there might be a comflict between
upstream libva and the MSDK forked one.

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Question on release 1.12: How to enable MSDK on Windows?

Scott D Phillips
In reply to this post by Baby Octopus
On Fri, May 05, 2017 at 11:30:37PM -0700, Baby Octopus wrote:
> Is it possible to have msdk on Linux as well? I see the media SDK is
> available only for Yocto and not for Ubuntu & Centos

For general linux support you will want to look at the Media Server Studio:

https://software.intel.com/en-us/intel-media-server-studio/details

> Any article which explains what all dependencies need to be installed to get
> MSDK working? That would be great

The getting started guide that comes with media server stdio lists the
installation steps. Once that is complete then a normal build of
gst-plugins-bad will include the msdk plugin.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel