Quantcast
Channel: Intel® Software - Media
Viewing all 2185 articles
Browse latest View live

Audio Decoder/Encoder based on Intel Media SDK

$
0
0

Hi there,

 

I'm trying to implement an AAC Audio encoder based on Intel Media SDK. But when I try to initialize a session for it, I always get the following error: MFX_ERR_UNSUPPORTED.

My code looks like:

mfxIMPL mfxImpl = MFX_IMPL_SOFTWARE | MFX_IMPL_AUDIO;

mfxVersion mfxVersion = {MFX_AUDIO_VERSION_MINOR, MFX_AUDIO_VERSION_MAJOR};

 

MFXAudioSession mfxSession;

stStatus = mfxSession.Init(mfxImpl, &mfxVersion);

 

The stStatus is always MFX_ERR_UNSUPPORTED (-3).

 

I think the problem is I don't have the following dll installed on my system: libmfxaudiosw32.dll (and libmfxaudiosw64.dll). Where can I find it? Is it possible to encode audio with Intel Media SDK? What do I need to install?

 

Best Regards, Robbie.


QuickSync functionality broken with DCH driver (25.20.100.6444)

$
0
0

We noticed that our application is no longer able to use QuickSync hardware acceleration for customers that have upgraded to the new Intel DCH driver.

We have analyzed the problem I will describe the behavioral change in the QuickSync implementation by comparing:

  • The DCH driver: 25.20.100.6444 further referred to as 'DCH'
  • with the latest..
  • Non-DCH driver: 25.20.100.6373 further referred to as 'STD'

Differences:

Installed Versions:

  • DCH installs QuickSync/MSDK binaries of version 8.0.0.083
  • STD installs QuickSync/MSDK binaries of version 8.0.0.068

Installation Locations:

  • DCH installs all MSDK  libraries into %PROGRAMFILES%\Intel\Media SDK, %WINDIR%\System32 and %WINDIR%\SysWow64
  • STD installs MSDK  libraries only into %PROGRAMFILES%\Intel\Media SDK

=> Bug #1: DCH does not remove the installed files from %WINDIR%\System32 and %WINDIR%\SysWow64 during uninstallation (via Control Panel > Programs > Uninstall)

 

The actual showstopping bug is a change of behavior regarding device initialization (=> MFXInit)

For Windows there has always existed a direct correspondence between the mfxIml enum value and the D3D device's adapter number like follows:

mfxImplD3D             Device Adapter number

MFX_IMPL_HARDWARE      0

MFX_IMPL_HARDWARE2     1

MFX_IMPL_HARDWARE3     2

MFX_IMPL_HARDWARE4     3

 

With the MSDK libraries version 8.0.0.083 this is no longer true. I will illustrate the change of behavior with an example:

 

mfxImplD3D         Dev#  D3D Device Name            MFXInit (8.0.0.068)   MFXInit (8.0.0.083)

MFX_IMPL_HARDWARE  0     NVIDIA GeForce GTX 750 Ti  MFX_ERR_UNSUPPORTED   MFX_ERR_NONE

MFX_IMPL_HARDWARE2 1     NVIDIA GeForce GTX 750 Ti  MFX_ERR_UNSUPPORTED   MFX_ERR_UNSUPPORTED

MFX_IMPL_HARDWARE3 2     NVIDIA GeForce GTX 750 Ti  MFX_ERR_UNSUPPORTED   MFX_ERR_UNSUPPORTED

MFX_IMPL_HARDWARE4 3    Intel(R) HD Graphics 530    MFX_ERR_NONE          MFX_ERR_NONE**

 

** No error, but doesn't report the same encoding and decoding capabilities as with 68 and dev 0

 

This is obviously a bug. MFXInit succeeds, but as soon as an application tries to create a D3D surface on the GeForce device and tries to use that with QuickSync, everything will fail.

That problem is not only specific to our own application, it also affects the use of QuickSync with ffmpeg - which is officially supported and documented by Intel as usage scenario for QuickSync.

 

=> This is bug #2: 

Intel Transcoder failed : Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate

$
0
0

I want to reduce bandwidth usage by using Intel Transcoding.

I was given a tutorial or steps by ezserver support:

http://www.ezhometech.com/document/intel_ffmpeg.txt

After I search on google, it turned out that MediaServerStudioEssentials2018R1.tar.gz only supports Intel Generation 6.7 and 8.

https://software.intel.com/en-us/articles/intel-media-sdk-release-notes
https://software.intel.com/en-us/articles/driver-support-matrix-for-medi...

Now I have used intel generation 7 but it still failed.

I use CentOS 7.4.

This is the error result :

[root@iptv ezserver_ai]# ./ffmpeg -y -i http://maxptv.ddns.net:25461/movie/MA020/0706/1054.mp4 -vcodec h264_qsv -acodec copy -b:v 8000K out.mp4
ffmpeg version 3.2.12 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16)
  configuration: --enable-libmfx --enable-nonfree
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://maxptv.ddns.net:25461/movie/MA020/0706/1054.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : BAIXE OUTROS FILMES NO COMANDOTORRENTS.COM
    encoder         : Lavf57.82.100
  Duration: 01:35:50.82, start: 0.000000, bitrate: 1439 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x534 [SAR 801:800 DAR 12:5], 1049 kb/s, SAR 1:1 DAR 640:267, 24 fps, 24 tbr, 16k tbn, 48 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(por): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, fltp, 384 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Side data:
      audio service type: main
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
libva error: /opt/intel/mediasdk/lib64/iHD_drv_video.so init failed
libva info: va_openDriver() returns 18
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/renderD128 vaInitialize failed
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/renderD129 fd open failed
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/renderD130 fd open failed
libva info: VA-API version 1.0.0
open lib: No such file or directory
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
libva error: /opt/intel/mediasdk/lib64/iHD_drv_video.so init failed
libva info: va_openDriver() returns 18
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/card0 vaInitialize failed
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/card1 fd open failed
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/card2 fd open failed
[h264_qsv @ 0x2489f40] Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (copy)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Why? please help as soon as possible.

Please help me.

AttachmentSize
Downloadimage/pngScreenshot_1.png37.68 KB

does overlay_qsv in FFMPEG support alpha channel?

$
0
0

when I use overlay_qsv in ffmpeg to display logo, overlay_qsv not able to transparent background, no matter PNG, APNG , gif or DVB source picture subtitle, for picture subtitle, The best I can do is  adjust tranparent level on subitle layer by alpha value, is this is ffmpeg coding issue or intel hardware can't handle it? as all above content can work 100% fine with ffmpeg fitler overlay, I just don't know this was due to my config problem or what. please kindly advise

 

ffmpeg -hwaccel qsv -qsv_device 1 -c:v h264_qsv -re -i "test.ts" -loop 1 -i "Logo.png" ^
-filter_complex "[1:v]format=nv12,hwupload=extra_hw_frames=10[watermark]; ^
[0:v][watermark]overlay_qsv=x=30:y=30" -vcodec h264_qsv -q:v 20 -acodec copy -y test.mp4

ffmpeg -hwaccel qsv -qsv_device 1 -c:v h264_qsv -re -i "http://192.168.101.2:7522/upnp/channelstream/transcode/3713217898725769217.ts" -ignore_loop 0 -i "lg-wave-ball-preloader.gif" ^
-filter_complex "[0:v]deinterlace_qsv,scale_qsv=-1:720,vpp_qsv=denoise=20,fps=25[bg]; ^
[1:v]format=yuv420p,hwupload=extra_hw_frames=10,scale_qsv=-1:50[logo]; ^
[0:s:0]format=yuv420p,hwupload=extra_hw_frames=10,scale_qsv=-1:720[sub]; ^
[bg][logo]overlay_qsv=x=30:y=30[bg2] ; [bg2][sub]overlay_qsv=alpha=100" ^
-vcodec h264_qsv -look_ahead 0 -q:v 20 -acodec copy -y test.ts

 

Motion vectors , I-frame from vaapi decoder

$
0
0

Hi, wondering if it is possible to get the motion vectors and I-frames  along with the decoded frames for H.26x streams  in VAAPI/IGPU decoder ? 

Intel Quicksync error : libva error: /opt/intel/mediasdk/lib64/iHD_drv_video.so init failed

$
0
0

I want to reduce bandwidth usage by using Intel Transcoding.

I was given a tutorial or steps by ezserver support:

http://www.ezhometech.com/document/intel_ffmpeg.txt

After I search on google, it turned out that MediaServerStudioEssentials2018R1.tar.gz only supports Intel Generation 6.7 and 8.

https://software.intel.com/en-us/articles/intel-media-sdk-release-notes
https://software.intel.com/en-us/articles/driver-support-matrix-for-medi...

Now I have used intel generation 7 but it still failed.

I use CentOS 7.4.

This is the error result :

[root@iptv ezserver_ai]# ./ffmpeg -y -i http://maxptv.ddns.net:25461/movie/MA020/0706/1054.mp4 -vcodec h264_qsv -acodec copy -b:v 8000K out.mp4
ffmpeg version 3.2.12 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16)
  configuration: --enable-libmfx --enable-nonfree
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://maxptv.ddns.net:25461/movie/MA020/0706/1054.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : BAIXE OUTROS FILMES NO COMANDOTORRENTS.COM
    encoder         : Lavf57.82.100
  Duration: 01:35:50.82, start: 0.000000, bitrate: 1439 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x534 [SAR 801:800 DAR 12:5], 1049 kb/s, SAR 1:1 DAR 640:267, 24 fps, 24 tbr, 16k tbn, 48 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(por): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, fltp, 384 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Side data:
      audio service type: main
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
libva error: /opt/intel/mediasdk/lib64/iHD_drv_video.so init failed
libva info: va_openDriver() returns 18
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/renderD128 vaInitialize failed
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/renderD129 fd open failed
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/renderD130 fd open failed
libva info: VA-API version 1.0.0
open lib: No such file or directory
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_0
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
libva error: /opt/intel/mediasdk/lib64/iHD_drv_video.so init failed
libva info: va_openDriver() returns 18
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/card0 vaInitialize failed
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/card1 fd open failed
[h264_qsv @ 0x2489f40] mfx init: /dev/dri/card2 fd open failed
[h264_qsv @ 0x2489f40] Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (copy)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Why? please help as soon as possible.

Please help me.

AttachmentSize
Downloadimage/pngScreenshot_1.png37.68 KB

GPU memory leak with MSDK using D3D11 for rendering (sample_decode)

$
0
0

We're using Intel MSDK to decode H.264 video streams in our software, rendered with D3D11/DXGI. We discovered when stopping and starting streams we had a memory leak in GPU memory (observed primarily through ProcessExplorer/"System GPU memory"). We verified with DX debug layer that all objects were released correctly, and then we turned to checking the functionality in "sample_decode" to verify if the problems were in our implementation. 

Unfortunately (?) the memory issues can be seen even with sample_decode, with minor changes. The only changes done in code are:
- Added a for-loop to run the same decoder/render task 5 times instead of only 1 time.
- Ignoring the result of the RegisterClass call (to not abort since class already registered)
Code is attached, along with a compiled debug .exe.

* sample_decode based on "2018 R2" samples
* GPU memory issues seems to happen when rendering with D3D11
* Using D3D9 no memory leak could be observed
* Tested on multiple machines, but results below were running on a Skylake processor (HD 530)
 

D3D11 rendered
h264 -hw -d3d11 -r -async 4 -rgb4 -i c:\temp\bbb_sunflower_1080p_30fps_normal.mp4.264
=> GPU-memory increasing

D3D11 NOT rendered
h264 -hw -d3d11 -async 4 -rgb4 -i c:\temp\bbb_sunflower_1080p_30fps_normal.mp4.264
=> GPU-memory returns to 0 between each run

D3D9 rendered
h264 -hw -d3d -r -async 4 -rgb4 -i c:\temp\bbb_sunflower_1080p_30fps_normal.mp4.264
=> GPU-memory returns to 0 between each run

D3D11 software rendered
h264 -sw -d3d11 -r -async 4 -rgb4 -i c:\temp\bbb_sunflower_1080p_30fps_normal.mp4.264
=> GPU-memory increasing

 

See screenshots from Process Explorer below. 

D3D11 - rendering

D3D11 - not rendering

D3D9 - rendering

 

Could somebody from Intel look into this issue? Could it be something that may need to be handled differently in the code to mitigate this issue? Something not released correctly?  Obviously sample_decode is built to run once, but looking into how to handle opening/closing decoding streams with MSDK and D3D11 we would hope that the sample would at least initiate and close everything correctly anyway.

 

Best Regards,
Carl

AttachmentSize
Downloadapplication/zipsample_decode.zip14.16 MB

Media SDK or FFMpeg libav*

$
0
0

Would appreciate if anyone can throw some lights on pros and cons of using Media SDK  or  FFMpeg libav*   - performance, functionality, ease of use, portability etc.  Thanks in advance. 


To do multiple stream decoding,I should use D3D9,or D3D11?

$
0
0

my program do multiple video stream decoding,every stream create it's sole use decoder, and there are 2 platform for hardware accelerated decoder on windows : MFX_IMPL_VIA_D3D9 and MFX_IMPL_VIA_D3D11,so which one should I use? Is D3D11 better than D3D9?

Performance degradation after update from 2017R3 to 2018R1

$
0
0

Hi, 

We've encounter performance degradation after update from 2017R3 to 2018R1 Intel Media SDK community edition for Linux on Intel(R) Xeon(R) CPU E3-1585L v5 @ 3.00GHz

After update the overall performance decreases up to 25% and now our server can handle less streams then before update (we use only AVC as codec)

What we can see as difference, that on 2017R3 metrics_monitor shows us VIDEO2 module and load on it:

RENDER usage: 90.00,	VIDEO usage: 36.00,	VIDEO_E usage: 68.00	VIDEO2 usage: 45.00	GT Freq: 1100.00
RENDER usage: 79.00,	VIDEO usage: 21.00,	VIDEO_E usage: 53.00	VIDEO2 usage: 45.00	GT Freq: 1100.00
RENDER usage: 82.00,	VIDEO usage: 32.00,	VIDEO_E usage: 58.00	VIDEO2 usage: 43.00	GT Freq: 1100.00
RENDER usage: 92.00,	VIDEO usage: 26.00,	VIDEO_E usage: 72.00	VIDEO2 usage: 48.00	GT Freq: 1100.00
RENDER usage: 83.00,	VIDEO usage: 21.00,	VIDEO_E usage: 63.00	VIDEO2 usage: 49.00	GT Freq: 1100.00
RENDER usage: 79.00,	VIDEO usage: 24.00,	VIDEO_E usage: 61.00	VIDEO2 usage: 38.00	GT Freq: 1100.00

but after update, on 2018R1 we can't see VIDEO2 and RENDER module always 100% load:

RENDER usage: 100.00,	VIDEO usage: 49.00,	VIDEO_E usage: 73.00	GT Freq: 1100.00
RENDER usage: 100.00,	VIDEO usage: 41.00,	VIDEO_E usage: 70.00	GT Freq: 1100.00
RENDER usage: 100.00,	VIDEO usage: 47.00,	VIDEO_E usage: 73.00	GT Freq: 1100.00
RENDER usage: 100.00,	VIDEO usage: 47.00,	VIDEO_E usage: 71.00	GT Freq: 1100.00
RENDER usage: 100.00,	VIDEO usage: 45.00,	VIDEO_E usage: 75.00	GT Freq: 1100.00
RENDER usage: 99.00,	VIDEO usage: 42.00,	VIDEO_E usage: 74.00	GT Freq: 1050.00
RENDER usage: 100.00,	VIDEO usage: 38.00,	VIDEO_E usage: 71.00	GT Freq: 1050.00

Also you may notice that GT Freq has small fluctuations that we also don't observe on 2017R3

Dmesg initialization log seems the same for both SDK versions:

[Mon Dec 24 12:49:26 2018] [drm] Initialized drm 1.1.0 20060810
[Mon Dec 24 12:49:26 2018] [drm] Found 128MB of eLLC
[Mon Dec 24 12:49:26 2018] [drm] Memory usable by graphics device = 4096M
[Mon Dec 24 12:49:26 2018] [drm] Replacing VGA console driver
[Mon Dec 24 12:49:26 2018] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[Mon Dec 24 12:49:26 2018] [drm] Driver supports precise vblank timestamp query.
[Mon Dec 24 12:49:27 2018] [drm] failed to retrieve link info, disabling eDP
[Mon Dec 24 12:49:27 2018] [drm] RC6 disabled, disabling runtime PM support
[Mon Dec 24 12:49:27 2018] [drm] Initialized i915 1.6.0 20151010 for 0000:00:02.0 on minor 0
[Mon Dec 24 12:49:27 2018] [drm] Cannot find any crtc or sizes - going 1024x768
[Mon Dec 24 12:49:27 2018] i915 0000:00:02.0: fb1: inteldrmfb frame buffer device
[Mon Dec 24 12:49:28 2018] [drm] RC6 off
[Mon Dec 24 12:49:28 2018] [drm] The Ring/GT multiplier is 2

What can we do? How to debug this problem? Why that can be? 

Xeon vs i3 performance anomalies

$
0
0

Hi,

We have three platforms below all running the same configuration - stock CentOS 7.4 with Media Server Studio 2018 R2.

- Xeon E3-1585v5 (Supermicro X11SSH-GF-1585)
- Xeon E3-1285v4 (Supermicro X10SLH-F)
- Core i3-6100 (Supermicro X11SSH-LN4F)

We are experiencing some strange performance stats when comparing transcoding throughput.  All testing below has been completed using sample_multi_transcode with the following options:

$ sample_multi_transcode -i::h264 test_es.264 -async 4 -o::h264 out.264 -b target_bitrate

What we are finding is that performance with the 1285v5 with smaller frame sizes is much lower than we would have expected, and in most cases is beaten by the Broadwell Xeon and the Skylake i3.  Figures below are for a single instance of sample_multi_transcode.

240p
1585v5 = 1270 fps
1285v4 = 1614 fps
i3-6100 = 1560 fps

576p
1585v5 = 371 fps
1285v4 = 413 fps
i3-6100 = 381 fps

720p
1585v5 = 528 fps
1285v4 = 558 fps
i3-6100 = 466 fps

1080p
1585v5 = 312 fps
1285v4 = 328 fps
i3-6100 = 257 fps

2160p
1585v5 = 111 fps
1285v4 = 106 fps
i3-6100 = 79 fps

The only time the 1585v5 comes out on top (and not by much) is when processing UHD frames.  Running our own transcoding application which uses the SDK directly gives us very similar results, as does executing multiple transcoding jobs in parallel.  Given the larger number of EUs we were expecting to see a much higher level of performance across the board with the v5 Xeon than we seem to be achieving.  Are we missing something or is this expected behavior?

Thanks in advance,

Andrew
 

JPEG Resize Pipeline fails when next JPEG has different sizes

$
0
0

I know that the Media SDK is not intended for use with still JPEGs. But based on the "mediasdkjpeg-man.pdf" and the available samples I was able to create a working transcoder :

sts = _mfxDECODE->DecodeFrameAsync(&mfxIBS, &_decSurface, &outSurface, &syncDecode);
sts = _mfxVPP->RunFrameVPPAsync(outSurface, &_encSurface[0], NULL, &syncVpp);
sts = _mfxENCODE->EncodeFrameAsync(&encodeCtrl, &_encSurface[0], &mfxOBS, &syncEncode);
sts = _mfxSession.SyncOperation(syncEncode, MSDK_WAIT_INTERVAL);

As mfxVPP->Init takes quite long (~800 ms) I use Reset (...) for all the pipeline steps when processing the next image. As long as the image and resize dimensions stay equal everything works fast and pretty. If the dimensions are different I get an UNDEFINED BEHAVIOR error back from SyncOperation and no surface is delivered. The problem is caused by the VPP step. I tested DECODE and ENCODE, they are able to work with Reset and changed image dimensions. 

For my application this is absolutely a show-stopper. Is there a workarround ?

Here my session init sequnce. I get back version 1.27 :

initPar.Version.Major = 1;
initPar.Version.Minor = 0;
initPar.GPUCopy = 0;
initPar.Implementation = MFX_IMPL_SOFTWARE;

mfxStatus sts = _mfxSession.InitEx(initPar);
sts = _mfxSession.QueryVersion(&_mfxVersion);
sts = _mfxSession.QueryIMPL(&impl);                            
sts = _mfxSession.Init(impl, &_mfxVersion);
 

 

Windows Debug LIBs

$
0
0

Hi,

Is there any way Windows debug LIB files could be included in the Media SDK in the future?  Currently using 2018 R2 (and have used R1) and not having debug builds is a real pain with the linker kicking out errors unless I build everything as release.

 

Common Libraries for Intel Media SDK Sample c++17 support

$
0
0

Are there any plans to bring the Intel sample code which does encode and decode up to speed with c++17
Thanks

Live H264 decoding with DecodedOrder=1

$
0
0

Hello,

I would like to use the Media SDK + gstreamer plugin for h264 decode of live RTSP streams.

I am currently testing 2018 R2 release with gstreamer plugin on Windows + Skylake (HD 530)

I see a lot of dropped frames, and I see in the plugin code

DecodedOrder = 1

but this is deprecated. Does this still work ? Because I still see dropped frames when this parameters is set to 1.

 

Thanks

Aaron


Need some global orientation

$
0
0

Hi All,

After some time i got back to this corner of the internet and i'm missing the big picture more than ever. Maybe someon can enlighten me a bit.

I've an apollo lake hardware (E3950); i'd like to work with linux. Low power is an important issue due to bad cooling conditions on the target, so i suspect, i'll need the most hardware acceleration possible: i'd like do decode >=2 channels of h264/5 1080p60 video and put them to the video outputs (hdmi,dp; audio as well).

What do i need? Is Media Server Studio supporting the E3950? Or should i use the MediaSDK for embedded Linux? Is this still maintained? Looks like it's over 1 year old with no new revision?

iirc, there were/are different types of video-drivers for linux (the "really really" free, which i might compile e.g. when i'm following instructions in the BLFS-Book and the "not so free" one from some rpm/tarball from any SDK or similar sources here. In addition, they might need other software like libva, etc. which also seems to be available in different flavours free / free of charge / not so free... a.k.a "professional"...

But still i'm not done - i'll need further software like eg. gstreamer or ffmpeg for the decoding/demuxing - i found some doc. here:

https://software.intel.com/en-us/articles/generic-linux-installation-of-...

working with gstreamer 1.10.4; which seems to be pretty outdated - also i do not know if all this will work on my apollo lake...Also, where the results from the mentioned gitub:

https://github.com/01org/gstreamer-media-SDK

somehow merged into later gstreamer versions? If not, am i forced to use 1.10.4?

So any help / pointers to relevant, actual documentation, giving me a better picture of availability/version of the different SDKs+ helper software would be very much appreciated.

Cheers,

WK

 

WIndows on Skylake: Monitor Hardware Decoder for H264

$
0
0

Hello,

I would like to monitor the load on the Media FF module when using hardware decoder for H264 on Skylake.

I am running windows 10 1607 LTSB.  Is there a software tool for this?

 

Thanks,

Aaron

ffmpeg libmfx not found

$
0
0

Hi,

I'm trying to use hardware acceleration with ffmpeg on a Ubuntu server and when I'm trying to configure ffmpeg before compile, i got this error :

ERROR: libmfx not found

I'm running Ubuntu 18.10 and a i7 6700K CPU.

I follow those two procedures :

https://www.intel.com/content/www/us/en/cloud-computing/quicksync-video-ffmpeg-install-valid.html

https://software.intel.com/en-us/articles/build-and-debug-open-source-media-stack

Here are the key command and results that make me think that libmfx is ok :

$ pkg-config --list-all| grep mfx
libmfx                libmfx - Intel Media Server Studio SDK

 

$ pkg-config --modversion libmfx
16.5

 

$ pkg-config --libs libmfx
-L/opt/intel/mediasdk/lib/lin_x64 -lmfx -lva -lstdc++ -ldl -lva-drm -ldrm Cflags: -I/opt/intel/mediasdk/include -I/usr/include/libdrm

 

$ cat /usr/lib/pkgconfig/libmfx.pc 
prefix=/opt/intel/mediasdk
exec_prefix=${prefix}
libdir=${prefix}/lib/lin_x64
includedir=${prefix}/include
Name: libmfx
Description: Intel Media Server Studio SDK
Version: 16.5
Libs: -L${libdir} -lmfx -lva -lstdc++ -ldl -lva-drm -ldrm Cflags: -I${includedir} -I/usr/include/libdrm

 

I got the last ffmpeg sources through git and try to configure :

$ ./configure --enable-nonfree --enable-libmfx
ERROR: libmfx not found

 

I got this error in ffbuild/config.log :

check_pkg_config libmfx libmfx mfx/mfxvideo.h MFXInit
test_pkg_config libmfx libmfx mfx/mfxvideo.h MFXInit
pkg-config --exists --print-errors libmfx
check_func_headers mfx/mfxvideo.h MFXInit -L/opt/intel/mediasdk/lib/lin_x64 -lmfx -lva -lstdc++ -ldl -lva-drm -ldrm Cflags: -I/opt/intel/mediasdk/include -I/usr/include/libdrm
test_ld cc -L/opt/intel/mediasdk/lib/lin_x64 -lmfx -lva -lstdc++ -ldl -lva-drm -ldrm Cflags: -I/opt/intel/mediasdk/include -I/usr/include/libdrm
test_cc -L/opt/intel/mediasdk/lib/lin_x64 Cflags: -I/opt/intel/mediasdk/include -I/usr/include/libdrm
BEGIN /tmp/ffconf.gJsgAWPJ/test.c
    1   #include <mfx/mfxvideo.h>
    2   #include <stdint.h>
    3   long check_MFXInit(void) { return (long) MFXInit; }
    4   int main(void) { int ret = 0;
    5    ret |= ((intptr_t)check_MFXInit) & 0xFFFF;
    6   return ret; }
END /tmp/ffconf.gJsgAWPJ/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c11 -fomit-frame-pointer -fPIC -pthread -L/opt/intel/mediasdk/lib/lin_x64 Cflags: -I/opt/intel/mediasdk/include -I/usr/include/libdrm -c -o /tmp/ffconf.gJsgAWPJ/test.o /tmp/ffconf.gJsgAWPJ/test.c
gcc: error: Cflags:: No such file or directory
require libmfx mfx/mfxvideo.h MFXInit -llibmfx
check_lib libmfx mfx/mfxvideo.h MFXInit -llibmfx
check_func_headers mfx/mfxvideo.h MFXInit -llibmfx
test_ld cc -llibmfx
test_cc
BEGIN /tmp/ffconf.gJsgAWPJ/test.c
    1   #include <mfx/mfxvideo.h>
    2   #include <stdint.h>
    3   long check_MFXInit(void) { return (long) MFXInit; }
    4   int main(void) { int ret = 0;
    5    ret |= ((intptr_t)check_MFXInit) & 0xFFFF;
    6   return ret; }
END /tmp/ffconf.gJsgAWPJ/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c11 -fomit-frame-pointer -fPIC -pthread -c -o /tmp/ffconf.gJsgAWPJ/test.o /tmp/ffconf.gJsgAWPJ/test.c
gcc -Wl,--as-needed -Wl,-z,noexecstack -o /tmp/ffconf.gJsgAWPJ/test /tmp/ffconf.gJsgAWPJ/test.o -llibmfx
/usr/bin/ld: cannot find -llibmfx
collect2: error: ld returned 1 exit status
ERROR: libmfx not found

 

Well, I don't understand where could be the issue so any help and/or support will be warmly appreciated.

 

Cheers

VP8 encoding support on windows?

$
0
0

Hello Experts!, 

I am working on a project which follows following steps: input feed is taken from camera, encoding (vp8 encoder used) is done, transferring over web, decoding feed (vp8 decoder used) and stream it on a web browser. 

I wish to use hardware accelerated vp8 encoder and decoder for this purpose along with gstreamer-1.0 framework. As a result, I installed Intel media SDK 2018 R2.

Can anyone please help me to know whether media SDK supports hardware acceleration for VP8 encoder on windows?

Hardware Specifications:
1) MIO-2360N-S2A1E
2) Intel Pentium N4200 CPU (Kaby Lake)
    -4c/4t @1.1GHz-2.5GHz
    -Intel HD Graphics 505 (Apollo Lake) - 18 execution units
3) 8GB RAM

 

Thanks and Regards,
Saurabh Bora

Building Media SDK for Ubuntu 18.04.1 Server

$
0
0

Hi,

I've been trying to install the Media SDK on a Ubuntu 18.04.1 machine without any luck.

uname -a

Linux 4.15.0-44-generic #47-Ubuntu SMP Mon Jan 14 11:26:59 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

cat /proc/cpuinfo

Intel(R) Xeon(R) CPU E3-1225 v5 @ 3.30GHz

So without touching the machine after a fresh install I SSH to it and run my script. The script is divided into two phases with a reboot after the first script.(the scripts are included in the zip file )->

#!/bin/bash
set -e

#Ensure the platform is up to date
sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

#Install baseline dependencies first (inclusive of OpenCL headers+)
sudo apt-get -y install autoconf automake build-essential libass-dev libtool pkg-config texinfo zlib1g-dev libva-dev cmake mercurial libdrm-dev libvorbis-dev libogg-dev git libx11-dev libperl-dev libpciaccess-dev libpciaccess0 xorg-dev intel-gpu-tools opencl-headers libwayland-dev xutils-dev ocl-icd-*

#Add the Oibaf PPA, needed to install the latest development headers for libva:
sudo add-apt-repository ppa:oibaf/graphics-drivers -y
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade

#To address linker problems down the line with Ubuntu 18.04LTS:
#https://forum.openframeworks.cc/t/ubuntu-unable-to-compile-missing-glx-mesa/29367/2
if [ -f /usr/lib/x86_64-linux-gnu/libGLX_mesa.so ]; then
   sudo rm /usr/lib/x86_64-linux-gnu/libGLX_mesa.so
fi
sudo ln -s /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0 /usr/lib/x86_64-linux-gnu/libGLX_mesa.so

#Setup build environment:
mkdir -p ~/vaapi

#installing the latest build of libdrm
echo "**************************************"
echo "*** Building and installing libdrm ***"
echo "**************************************"

cd ~/vaapi
git clone https://anongit.freedesktop.org/git/mesa/drm.git libdrm
cd libdrm
./autogen.sh --prefix=/usr --enable-udev
time make -j$(nproc) VERBOSE=1
sudo make -j$(nproc) install
sudo ldconfig -vvvv

#installing the latest build of libdrm
echo "**************************************"
echo "*** Building and installing libva ***"
echo "**************************************"

cd ~/vaapi
git clone https://github.com/01org/libva
cd libva
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
time make -j$(nproc) VERBOSE=1
sudo make -j$(nproc) install
sudo ldconfig -vvvv

#installing the latest build of gmmlib
echo "**************************************"
echo "*** Building and installing gmmlib ***"
echo "**************************************"

mkdir -p ~/vaapi/workspace
cd ~/vaapi/workspace
git clone https://github.com/intel/gmmlib
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE= Release ../gmmlib
make -j$(nproc)
sudo make -j$(nproc) install 

#installing the latest build of Intel Media driver
echo "***************************************************"
echo "*** Building and installing Intel Media driver: ***"
echo "***************************************************"

cd ~/vaapi/workspace
git clone https://github.com/intel/media-driver
cd media-driver
git submodule init
git pull
mkdir -p ~/vaapi/workspace/build_media
cd ~/vaapi/workspace/build_media
cmake ../media-driver \
-DMEDIA_VERSION="2.0.0" \
-DBS_DIR_GMMLIB=$PWD/../gmmlib/Source/GmmLib/ \
-DBS_DIR_COMMON=$PWD/../gmmlib/Source/Common/ \
-DBS_DIR_INC=$PWD/../gmmlib/Source/inc/ \
-DBS_DIR_MEDIA=$PWD/../media-driver \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib/x86_64-linux-gnu \
-DINSTALL_DRIVER_SYSCONF=OFF \
-DLIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri
time make -j$(nproc) VERBOSE=1
sudo make -j$(nproc) install VERBOSE=1

#Add yourself to the video group:
sudo usermod -a -G video $USER

#export environment variables
#
# TODO: If LIBVA_DRIVERS_PATH or LIBVA_DRIVER_NAME exists.. then replace
#

if [[ -z "${LIBVA_DRIVERS_PATH}" ]]; then
  sudo sh -c "echo 'LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri'>> /etc/environment"
fi
if [[ -z "${LIBVA_DRIVER_NAME}" ]]; then
  sudo sh -c "echo 'LIBVA_DRIVER_NAME=iHD'>> /etc/environment"
fi


#installing the latest build of libva-utils
echo "*******************************************"
echo "*** Building and installing libva-utils ***"
echo "*******************************************"

cd ~/vaapi
git clone https://github.com/intel/libva-utils
cd libva-utils
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
time make -j$(nproc) VERBOSE=1
sudo make -j$(nproc) install

#reboot
echo 
echo "Reboot system by typing -> sudo reboot now ***"
echo 

Then after the reboot this script is executed ->

#!/bin/bash
set -e

#Build Media SDK 
sudo echo #to avoid the break at sudo make install
cd ~/vaapi
git clone https://github.com/Intel-Media-SDK/MediaSDK msdk
cd msdk
mkdir build && cd build
cmake -DENABLE_OPENCL=OFF ..
make
sudo make install


Everything compiles and installs however when trying to decode using the included sample decoder.. I get this Error->

LD_LIBRARY_PATH=/opt/intel/mediasdk/lib /opt/intel/mediasdk/share/mfx/samples/sample_decode h264 -i myVideo2.nal -o out.yuv

 

[ERROR], sts=MFX_ERR_MEMORY_ALLOC(-4), CreateAllocator, CreateHWDevice failed at /home/netinsight/vaapi/msdk/samples/sample_decode/src/pipeline_decode.cpp:1282

 

[ERROR], sts=MFX_ERR_MEMORY_ALLOC(-4), Init, CreateAllocator failed at /home/netinsight/vaapi/msdk/samples/sample_decode/src/pipeline_decode.cpp:425

 

[ERROR], sts=MFX_ERR_MEMORY_ALLOC(-4), main, Pipeline.Init failed at /home/netinsight/vaapi/msdk/samples/sample_decode/src/sample_decode.cpp:676

So obviously the Media SDK is not working as expected. Has anyone successfully installed the Media SDK on a Ubuntu 18.04.1? What am I doing wrong?

 

Thanks for any assistance.

 

/Anders

AttachmentSize
Downloadapplication/zipbuild_msdk.zip2.46 KB
Viewing all 2185 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>