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

sample_encode double free or corruption

$
0
0

Hi
I install MediaServerStudioEssentials2017 on Fedora23 OS and Intel(R) Core(TM) i5-6500 CPU.
I rebuild kernel-4.4.9-300.fc23.src.rpm with intel-kernel-patches.
When I run H.265 encoder sample "./sample_encode h265 -i ./Wulong_320x240.yuv -o ./aa.265 -w 320 -h 240",
it show error message::

plugin_loader.h :170 [INFO] Plugin was loaded from GUID: { 0x6f, 0xad, 0xc7, 0x91, 0xa0, 0xc2, 0xeb, 0x47, 0x9a, 0xb6, 0xdc, 0xd5, 0xea, 0x9d, 0xa3, 0x47 } (Intel (R) Media SDK HW plugin for HEVC ENCODE)
libva info: VA-API version 0.99.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_0_32
libva info: va_openDriver() returns 0
*** Error in `./sample_encode': double free or corruption (!prev): 0x000055cb090d77b0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x77de5)[0x7f5504372de5]
/lib64/libc.so.6(+0x8022a)[0x7f550437b22a]
/lib64/libc.so.6(cfree+0x4c)[0x7f550437e78c]
/opt/intel/mediasdk/lib64/iHD_drv_video.so(+0x254e71)[0x7f54fc867e71]
/opt/intel/mediasdk/lib64/iHD_drv_video.so(+0x251968)[0x7f54fc864968]
/opt/intel/mediasdk/lib64/iHD_drv_video.so(+0x251929)[0x7f54fc864929]
/opt/intel/mediasdk/lib64/iHD_drv_video.so(+0x24be34)[0x7f54fc85ee34]
/opt/intel/mediasdk/lib64/iHD_drv_video.so(+0x231ca0)[0x7f54fc844ca0]
/opt/intel/mediasdk/lib64/iHD_drv_video.so(+0x2c3ed5)[0x7f54fc8d6ed5]
/lib64/libva.so.1(vaCreateContext+0xc4)[0x7f5503403ca4]
//opt/intel/mediasdk/plugins/libmfx_hevce_hw64.so(+0x1cf54)[0x7f54ff1d2f54]
//opt/intel/mediasdk/plugins/libmfx_hevce_hw64.so(+0x1b046)[0x7f54ff1d1046]
//opt/intel/mediasdk/plugins/libmfx_hevce_hw64.so(+0x21381)[0x7f54ff1d7381]
//opt/intel/mediasdk/plugins/libmfx_hevce_hw64.so(+0x22b8b)[0x7f54ff1d8b8b]
/opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.19(MFXVideoENCODE_Init+0xd4)[0x7f550365e1e4]
./sample_encode(_ZN17CEncodingPipeline18ResetMFXComponentsEP12sInputParams+0xb8)[0x55cb08aa41c8]
./sample_encode(_ZN17CEncodingPipeline4InitEP12sInputParams+0x3ca)[0x55cb08aa580a]
./sample_encode(main+0xb0)[0x55cb08aa1830]
/lib64/libc.so.6(__libc_start_main+0xf0)[0x7f550431b580]
./sample_encode(+0x18b99)[0x55cb08aa1b99]
======= Memory map: ========
55cb08a89000-55cb08adb000 r-xp 00000000 08:02 5555247                    /home/mojo/Project/mediastreamer/MediaSamples_Linux_2017/samples/_bin/x64/sample_encode
55cb08cda000-55cb08cdd000 r--p 00051000 08:02 5555247                    /home/mojo/Project/mediastreamer/MediaSamples_Linux_2017/samples/_bin/x64/sample_encode
55cb08cdd000-55cb08cde000 rw-p 00054000 08:02 5555247                    /home/mojo/Project/mediastreamer/MediaSamples_Linux_2017/samples/_bin/x64/sample_encode
55cb08f13000-55cb090f6000 rw-p 00000000 00:00 0                          [heap]
7f54f4000000-7f54f4021000 rw-p 00000000 00:00 0
7f54f4021000-7f54f8000000 ---p 00000000 00:00 0
7f54fb45e000-7f54fb463000 r-xp 00000000 08:03 396753                     /usr/lib64/libXfixes.so.3.1.0
7f54fb463000-7f54fb662000 ---p 00005000 08:03 396753                     /usr/lib64/libXfixes.so.3.1.0
7f54fb662000-7f54fb663000 r--p 00004000 08:03 396753                     /usr/lib64/libXfixes.so.3.1.0
7f54fb663000-7f54fb664000 rw-p 00005000 08:03 396753                     /usr/lib64/libXfixes.so.3.1.0
7f54fb664000-7f54fb675000 r-xp 00000000 08:03 396741                     /usr/lib64/libXext.so.6.4.0
7f54fb675000-7f54fb874000 ---p 00011000 08:03 396741                     /usr/lib64/libXext.so.6.4.0
7f54fb874000-7f54fb875000 r--p 00010000 08:03 396741                     /usr/lib64/libXext.so.6.4.0
7f54fb875000-7f54fb876000 rw-p 00011000 08:03 396741                     /usr/lib64/libXext.so.6.4.0
7f54fb876000-7f54fb87d000 r-xp 00000000 08:03 418909                     /usr/lib64/libva-x11.so.1.9900.0
7f54fb87d000-7f54fba7d000 ---p 00007000 08:03 418909                     /usr/lib64/libva-x11.so.1.9900.0
7f54fba7d000-7f54fba7e000 rw-p 00007000 08:03 418909                     /usr/lib64/libva-x11.so.1.9900.0
7f54fba7e000-7f54fba80000 r-xp 00000000 08:03 396683                     /usr/lib64/libXau.so.6.0.0
7f54fba80000-7f54fbc80000 ---p 00002000 08:03 396683                     /usr/lib64/libXau.so.6.0.0
7f54fbc80000-7f54fbc81000 r--p 00002000 08:03 396683                     /usr/lib64/libXau.so.6.0.0
7f54fbc81000-7f54fbc82000 rw-p 00000000 00:00 0
7f54fbc82000-7f54fbca3000 r-xp 00000000 08:03 396735                     /usr/lib64/libxcb.so.1.1.0
7f54fbca3000-7f54fbea2000 ---p 00021000 08:03 396735                     /usr/lib64/libxcb.so.1.1.0
7f54fbea2000-7f54fbea3000 r--p 00020000 08:03 396735                     /usr/lib64/libxcb.so.1.1.0
7f54fbea3000-7f54fbea4000 rw-p 00021000 08:03 396735                     /usr/lib64/libxcb.so.1.1.0
7f54fbea4000-7f54fbfde000 r-xp 00000000 08:03 396739                     /usr/lib64/libX11.so.6.3.0
7f54fbfde000-7f54fc1dd000 ---p 0013a000 08:03 396739                     /usr/lib64/libX11.so.6.3.0
7f54fc1dd000-7f54fc1e0000 r--p 00139000 08:03 396739                     /usr/lib64/libX11.so.6.3.0
7f54fc1e0000-7f54fc1e4000 rw-p 0013c000 08:03 396739                     /usr/lib64/libX11.so.6.3.0
7f54fc1e4000-7f54fc1ed000 r-xp 00000000 08:03 397422                     /usr/lib64/libpciaccess.so.0.11.1
7f54fc1ed000-7f54fc3ec000 ---p 00009000 08:03 397422                     /usr/lib64/libpciaccess.so.0.11.1
7f54fc3ec000-7f54fc3ed000 r--p 00008000 08:03 397422                     /usr/lib64/libpciaccess.so.0.11.1
7f54fc3ed000-7f54fc3ee000 rw-p 00000000 00:00 0
7f54fc3ee000-7f54fc412000 r-xp 00000000 08:03 465491                     /usr/lib64/libdrm_intel.so.1.0.0
7f54fc412000-7f54fc612000 ---p 00024000 08:03 465491                     /usr/lib64/libdrm_intel.so.1.0.0
7f54fc612000-7f54fc613000 rw-p 00024000 08:03 465491                     /usr/lib64/libdrm_intel.so.1.0.0
7f54fc613000-7f54fe94b000 r-xp 00000000 08:03 2758546                    /opt/intel/mediasdk/lib64/iHD_drv_video.so
7f54fe94b000-7f54feb4a000 ---p 02338000 08:03 2758546                    /opt/intel/mediasdk/lib64/iHD_drv_video.so
7f54feb4a000-7f54feb4d000 r--p 02337000 08:03 2758546                    /opt/intel/mediasdk/lib64/iHD_drv_video.so
7f54feb4d000-7f54feb95000 rw-p 0233a000 08:03 2758546                    /opt/intel/mediasdk/lib64/iHD_drv_video.so
7f54feb95000-7f54feb9c000 rw-p 00000000 00:00 0
7f54feb9c000-7f54feba3000 r-xp 00000000 08:03 420855                     /usr/lib64/librt-2.22.so
7f54feba3000-7f54feda2000 ---p 00007000 08:03 420855                     /usr/lib64/librt-2.22.so
7f54feda2000-7f54feda3000 r--p 00006000 08:03 420855                     /usr/lib64/librt-2.22.so
7f54feda3000-7f54feda4000 rw-p 00007000 08:03 420855                     /usr/lib64/librt-2.22.so
7f54feda4000-7f54fedb3000 r-xp 00000000 08:03 402134                     /usr/lib64/libdrm.so.2.4.0
7f54fedb3000-7f54fefb3000 ---p 0000f000 08:03 402134                     /usr/lib64/libdrm.so.2.4.0
7f54fefb3000-7f54fefb4000 rw-p 0000f000 08:03 402134                     /usr/lib64/libdrm.so.2.4.0
7f54fefb4000-7f54fefb6000 r-xp 00000000 08:03 465543                     /usr/lib64/libva-drm.so.1.9900.0
7f54fefb6000-7f54ff1b5000 ---p 00002000 08:03 465543                     /usr/lib64/libva-drm.so.1.9900.0
7f54ff1b5000-7f54ff1b6000 rw-p 00001000 08:03 465543                     /usr/lib64/libva-drm.so.1.9900.0
7f54ff1b6000-7f54ff1f2000 r-xp 00000000 08:03 2758618                    /opt/intel/mediasdk/plugins/libmfx_hevce_hw64.so
7f54ff1f2000-7f54ff3f2000 ---p 0003c000 08:03 2758618                    /opt/intel/mediasdk/plugins/libmfx_hevce_hw64.so
7f54ff3f2000-7f54ff3f3000 r--p 0003c000 08:03 2758618                    /opt/intel/mediasdk/plugins/libmfx_hevce_hw64.so
7f54ff3f3000-7f54ff3f5000 rw-p 0003d000 08:03 2758618                    /opt/intel/mediasdk/plugins/libmfx_hevce_hw64.so
7f54ff3f5000-7f54ff3f7000 rw-p 00000000 00:00 0
7f54ff3f7000-7f54ff3f8000 ---p 00000000 00:00 0
7f54ff3f8000-7f54ffbf8000 rw-p 00000000 00:00 0
7f54ffbf8000-7f54ffbf9000 ---p 00000000 00:00 0
7f54ffbf9000-7f55003f9000 rw-p 00000000 00:00 0
7f55003f9000-7f55003fa000 ---p 00000000 00:00 0
7f55003fa000-7f5500bfa000 rw-p 00000000 00:00 0
7f5500bfa000-7f5500bfb000 ---p 00000000 00:00 0
7f5500bfb000-7f55013fb000 rw-p 00000000 00:00 0
7f55013fb000-7f55013fc000 ---p 00000000 00:00 0
7f55013fc000-7f5501bfc000 rw-p 00000000 00:00 0                          [stack:4623]
7f5501bfc000-7f5501bfd000 ---p 00000000 00:00 0
7f5501bfd000-7f55023fd000 rw-p 00000000 00:00 0                          [stack:4622]
7f55023fd000-7f55023fe000 ---p 00000000 00:00 0
7f55023fe000-7f5502bfe000 rw-p 00000000 00:00 0                          [stack:4621]
7f5502bfe000-7f5502bff000 ---p 00000000 00:00 0
7f5502bff000-7f55033ff000 rw-p 00000000 00:00 0                          [stack:4617]
7f55033ff000-7f550341c000 r-xp 00000000 08:03 412305                     /usr/lib64/libva.so.1.9900.0
7f550341c000-7f550361c000 ---p 0001d000 08:03 412305                     /usr/lib64/libva.so.1.9900.0
7f550361c000-7f550361d000 rw-p 0001d000 08:03 412305                     /usr/lib64/libva.so.1.9900.0
7f550361d000-7f55040c4000 r-xp 00000000 08:03 2758547                    /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.19
7f55040c4000-7f55042c4000 ---p 00aa7000 08:03 2758547                    /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.19
7f55042c4000-7f55042d6000 r--p 00aa7000 08:03 2758547                    /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.19
7f55042d6000-7f55042e9000 rw-p 00ab9000 08:03 2758547                    /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.19
7f55042e9000-7f55042fb000 rw-p 00000000 00:00 0
7f55042fb000-7f55044b2000 r-xp 00000000 08:03 396172                     /usr/lib64/libc-2.22.so
7f55044b2000-7f55046b2000 ---p 001b7000 08:03 396172                     /usr/lib64/libc-2.22.so
7f55046b2000-7f55046b6000 r--p 001b7000 08:03 396172                     /usr/lib64/libc-2.22.so
7f55046b6000-7f55046b8000 rw-p 001bb000 08:03 396172                     /usr/lib64/libc-2.22.so
7f55046b8000-7f55046bc000 rw-p 00000000 00:00 0
7f55046bc000-7f55046d2000 r-xp 00000000 08:03 396169                     /usr/lib64/libgcc_s-5.3.1-20160406.so.1
7f55046d2000-7f55048d1000 ---p 00016000 08:03 396169                     /usr/lib64/libgcc_s-5.3.1-20160406.so.1
7f55048d1000-7f55048d2000 r--p 00015000 08:03 396169                     /usr/lib64/libgcc_s-5.3.1-20160406.so.1
7f55048d2000-7f55048d3000 rw-p 00016000 08:03 396169                     /usr/lib64/libgcc_s-5.3.1-20160406.so.1
7f55048d3000-7f55049d4000 r-xp 00000000 08:03 413965                     /usr/lib64/libm-2.22.so
7f55049d4000-7f5504bd3000 ---p 00101000 08:03 413965                     /usr/lib64/libm-2.22.so
7f5504bd3000-7f5504bd4000 r--p 00100000 08:03 413965                     /usr/lib64/libm-2.22.so
7f5504bd4000-7f5504bd5000 rw-p 00101000 08:03 413965                     /usr/lib64/libm-2.22.so
7f5504bd5000-7f5504d47000 r-xp 00000000 08:03 393236                     /usr/lib64/libstdc++.so.6.0.21
7f5504d47000-7f5504f47000 ---p 00172000 08:03 393236                     /usr/lib64/libstdc++.so.6.0.21
7f5504f47000-7f5504f51000 r--p 00172000 08:03 393236                     /usr/lib64/libstdc++.so.6.0.21
7f5504f51000-7f5504f53000 rw-p 0017c000 08:03 393236                     /usr/lib64/libstdc++.so.6.0.21
7f5504f53000-7f5504f57000 rw-p 00000000 00:00 0
7f5504f57000-7f5504f6f000 r-xp 00000000 08:03 396198                     /usr/lib64/libpthread-2.22.so
7f5504f6f000-7f550516e000 ---p 00018000 08:03 396198                     /usr/lib64/libpthread-2.22.so
7f550516e000-7f5505170000 r--p 00017000 08:03 396198                     /usr/lib64/libpthread-2.22.so
7f5505170000-7f5505171000 rw-p 00019000 08:03 396198                     /usr/lib64/libpthread-2.22.so
7f5505171000-7f5505175000 rw-p 00000000 00:00 0
7f5505175000-7f5505178000 r-xp 00000000 08:03 413950                     /usr/lib64/libdl-2.22.so
7f5505178000-7f5505377000 ---p 00003000 08:03 413950                     /usr/lib64/libdl-2.22.so
7f5505377000-7f5505378000 r--p 00002000 08:03 413950                     /usr/lib64/libdl-2.22.so
7f5505378000-7f5505379000 rw-p 00003000 08:03 413950                     /usr/lib64/libdl-2.22.so
7f5505379000-7f550539a000 r-xp 00000000 08:03 445151                     /usr/lib64/ld-2.22.so
7f55053cf000-7f5505550000 rw-p 00000000 00:00 0
7f550556c000-7f5505597000 rw-p 00000000 00:00 0
7f5505597000-7f5505598000 rw-s 00000000 00:05 178349                     /drm mm object (deleted)
7f5505598000-7f5505599000 rw-p 00000000 00:00 0
7f5505599000-7f550559a000 r--p 00020000 08:03 445151                     /usr/lib64/ld-2.22.so
7f550559a000-7f550559b000 rw-p 00021000 08:03 445151                     /usr/lib64/ld-2.22.so
7f550559b000-7f550559c000 rw-p 00000000 00:00 0
7ffe5dbe7000-7ffe5dc09000 rw-p 00000000 00:00 0                          [stack]
7ffe5dcba000-7ffe5dcbc000 r--p 00000000 00:00 0                          [vvar]
7ffe5dcbc000-7ffe5dcbe000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
  (core dumped)

How cna I slove this problem ?
Thanks


Specifying basic SPS/PPS on encoder breaks under HW on different machines

$
0
0

Hello All,

Background: we would like to match a specific SPS/PPS setup so we can subclip videos and insert them into other videos without breaking the decoder.

However, we've been having an issue with specifying an encoding SPS PPS.

To help reproduce this issue, we have attached a slightly modified CPP source code (simple_transcode.cpp) from one of your media sdk tutorials, the simple_transcode. Also we attach sample video to work with (high-tos-1920x800-6400kbps-5s.m2ts), and some screenshots(1.jpg,2.jpg) of the behavior.

On line 181 we specify a simple AVC constrained baseline sps / pps set.

In software (-sw):

sts = mfxENC.Init(&mfxEncParams); 

MFX_ERR_NONE

Upon retrieving the encoder parameters to check the actual encoder sps/pps settings we get a different result:

input sps/pps
00012742C028D907865B11000301000330F1832480
000128CB83CB20
encoder sps/pps
00012742C028D907865B11000301000330DA183248
000128CB83CB20

OK so without an error result, however there is still a different setting to the specified SPS. Why does it adjust these parameters?

With hardware (-hw)

sts = mfxENC.Init(&mfxEncParams); 

MFX_WRN_INCOMPATIBLE_VIDEO_PARAM

The input sps and encoder sps are identical. However, the output movie is broken on 3 different test setups.
All machines have Intel Media Server Studio 2016 R1 installed.

Machine 1:
Windows 10
i7-3615QM
Intel(R) HD Graphics 4000 v10.18.10.4358
1.11    HW      Yes             X       X
1.17    SW      Yes             X       X

With command line options:

-hw -b 900 -f 48/2 high-tos-1920x800-6400kbps-5s.m2ts transrate-900kbps-hw.m2ts

Color is shifted towards red (1.jpg)

-hw -b 2500 -f 48/2 high-tos-1920x800-6400kbps-5s.m2ts transrate-900kbps-hw.m2ts

Color is shifted towards green (2.jpg)

On some bitrates it "looks" correct

Machine 2:
Windows 10
i5-6400
Intel(R) HD Graphics 53 v21.20.16.4534
1.17    SW      Yes             X       X
1.19    HW      Yes             X       X

With -hw

Playback randomly breaks on any bitrate

Machine 3:
Linux with patched kernel from Intel Media Server Studio 2016 R1
i7-5557U
hardware/software 1.17

With

-hw -b 900 -f 48/2 high-tos-1920x800-6400kbps-5s.m2ts transrate-900kbps-hw.m2ts

Same color shift towards red/green on different bitrates

The big question is, why is this so broken on different machines? The great thing is that with software at least the output is identical on all machines, except it chooses a different encoder SPS/PPS so we cannot insert this into another video stream.
I know there are limitations to the hardware / software encoders, however when it is configured without errors and returns the identical SPS/PPS, the video is completely broken.

Thanks for your help,

Sytse

 

Thread Topic: 

Bug Report

IDR frames not generated in software mode!!!!

$
0
0

Hi,

i am encoding H264.

I set m_mfxEncParams.mfx.EncodedOrder = 1; to specify gop structure via mfxEncodeCtrl.

With m_ctrl.FrameType = MFX_FRAMETYPE_I | MFX_FRAMETYPE_IDR | MFX_FRAMETYPE_REF; I force the IDR frame generation on every 4th frame in the call to EncodeFrameAsync(&m_ctrl,surface...)

This works fine when operating in HW-mode. But (the same code) in software mode, the encoder does NOT insert the requested IDR. IDR will generated here on every 64th frame.

This is a BUG!!!

As a work around i tried to reset the encoder every 4th frame to restart with a new GOP.

m_mfxResetOptions.StartNewSequence = MFX_CODINGOPTION_ON;

m_EncExtParams.clear();

m_EncExtParams.push_back(reinterpret_cast<mfxExtBuffer*>(&m_mfxResetOptions));
m_mfxEncParams.ExtParam = &m_EncExtParams.front();
m_mfxEncParams.NumExtParam = (mfxU16)m_EncExtParams.size();
sts = m_pmfxENC->Reset(&m_mfxEncParams);

But this returns MFX_ERROR_INVALID_VIDEO_PARAM!

This happens only when operating with MFX_IMPL_SOFTWARE! Hardware mode has no bugs and is working as expected!!!

Can you fix this fast? Or post a work around?

 

 

 

 

Linux Intel Media Server Studio on Apollo Lake

$
0
0

Hi
I would like to use Linux Intel Media Server Studio on an Intel® Celeron® Processor J3455 CPU.
Do Intel's Media Server Studio support Lake Apollo ?

Thread Topic: 

Question

IntelMediStudio Sample_decode failed

$
0
0

i correct run the sample in the MediaSamples_Linux_2017.now i try to rebuild sample_decode in qtCreator,but i get fllowing  error message:

./decode h265 -i ~/test_stream.265 -o yuv.yuv
plugin_loader.h :170 [INFO] Plugin was loaded from GUID: { 0x33, 0xa6, 0x1c, 0x0b, 0x4c, 0x27, 0x45, 0x4c, 0xa8, 0xd8, 0x5d, 0xde, 0x75, 0x7c, 0x6f, 0x8e } (Intel (R) Media SDK HW plugin for HEVC DECODE)
pretending that stream is 30fps one
pretending that aspect ratio is 1:1

Return on error: error code -3,    ../../Desktop/MediaSamples_Linux_2017/samples/sample_decode/src/pipeline_decode.cpp    924

Return on error: error code -3,    ../../Desktop/MediaSamples_Linux_2017/samples/sample_decode/src/pipeline_decode.cpp    396

Return on error: error code 1,    ../decode/main.cpp    627

plugin_loader.h :196 [INFO] MFXBaseUSER_UnLoad(session=0x0x16261e0), sts=0

my Project file is:

QT -= core
QT -= gui

CONFIG += c++11

TARGET = decode
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += \
    ../../Desktop/MediaSamples_Linux_2017/samples/sample_decode/src/pipeline_decode.cpp \
    sample_decode.cpp

CMAKE_SOURCE_DIR =
INCLUDEPATH += /home/centos/Desktop/MediaSamples_Linux_2017/samples/sample_common/include
INCLUDEPATH += /home/centos/Desktop/MediaSamples_Linux_2017/samples/sample_misc/wayland/include
INCLUDEPATH += /home/centos/Desktop/MediaSamples_Linux_2017/samples/sample_decode/include

unix: LIBS += -L$$PWD/../../../../opt/intel/mediasdk/lib/lin_x64/ -lmfx -ldl -lva-x11

INCLUDEPATH += $$PWD/../../../../opt/intel/mediasdk/include
DEPENDPATH += $$PWD/../../../../opt/intel/mediasdk/lib/lin_x64

unix: PRE_TARGETDEPS += $$PWD/../../../../opt/intel/mediasdk/lib/lin_x64/libmfx.a

unix: LIBS += -L$$PWD/../../Desktop/MediaSamples_Linux_2017/samples/__lib/ -lsample_common

INCLUDEPATH += $$PWD/../../Desktop/MediaSamples_Linux_2017/samples/__lib
DEPENDPATH += $$PWD/../../Desktop/MediaSamples_Linux_2017/samples/__lib

unix: PRE_TARGETDEPS += $$PWD/../../Desktop/MediaSamples_Linux_2017/samples/__lib/libsample_common.a

how to solve this problem?

Thank's for any advice.

sorry for my Englisth, it's not my mother language.

 

os: CentOS 7.2.1511

HardWare: Intel NUC 6i7kyk

SDK Version: MediaServerStudioEssentials2017.tar.gz

Zone: 

Thread Topic: 

Help Me

sample_decode won't decode h264 header

$
0
0

Hello everybody,

I've recently started to work on a h264 streaming decoder and renderer. As I'm quite a beginner in those fields,I downloaded the Intel Media SDK code samples to figure out how it basically works. The sample_decode project seemed to be the perfect sample for me. However, when I try to use it, it keep looping infinitely in the InitMfxParams method found in pipeline_decode.cpp

After some debugging and investigations, I found out that the header decoding is failing.

On line 626, this always return MFX_ERR_MORE_DATA, which causes the endless loop.

  sts = m_pmfxDEC->DecodeHeader(&m_mfxBS, &m_mfxVideoParams);

I am using the following args : h264 -i s.mp4 -low_latency -r

With "s.mp4" being a h264 video file found here : http://www.h264info.com/clips.html

I am developing on Windows 10, VS2015. HD Graphics 530 with the latest drivers.

Do you have any idea of what's going wrong?

Thanks

 

Zone: 

Thread Topic: 

Help Me

Media SDK on Ubuntu 16.04 failure: missing igfx_registry.txt?

$
0
0

 Installation follows the pattern described in this thread:https://software.intel.com/en-us/forums/intel-media-sdk/topic/691360

Outputs from all tests etc (below). look very encouraging. But running the multi_transcode example fails with error code -3. strace reveals a failure to find igfx_registry.txt? What have I missed here?

-----------------elided strace---------------------

open("/opt/intel/opencl/libdrm_intel.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libdrm_intel.so", O_RDONLY|O_CLOEXEC) = 6
read(6, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2200\0\0\0\0\0\0"..., 832) = 832
fstat(6, {st_mode=S_IFREG|0755, st_size=445016, ...}) = 0
close(6)                                = 0
ioctl(3, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0x76, 0x10), 0x7ffe767de990) = -1 EINVAL (Invalid argument)
open("/etc/igfx_registry.txt", O_RDONLY) = -1 ENOENT (No such file or directory)
write(1, "\n", 1
)                       = 1
write(1, "Return on error: error code -3,\t"..., 167Return on error: error code -3,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK4/git/mdp_msdk-samples/samples/sample_multi_transcode/src/pipeline_transcode.cpp    2924

) = 167
write(1, "\n", 1
)                       = 1
write(1, "Return on error: error code -3,\t"..., 170Return on error: error code -3,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK4/git/mdp_msdk-samples/samples/sample_multi_transcode/src/sample_multi_transcode.cpp    307

-------------------------snip---------------------------------

jevans@nuci5:~/Intel$ uname -a
Linux nuci5 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

jevans@nuci5:~/Intel$ vainfo
libva info: VA-API version 0.99.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_0_32
libva info: va_openDriver() returns 0
jevans@nuci5:~/Intel$ vainfo | tee
libva info: VA-API version 0.99.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_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.99 (libva 1.67.0.pre1)
vainfo: Driver version: 16.5.55964-ubit
vainfo: Supported profile and entrypoints
      VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:    <unknown entrypoint>
      VAProfileH264ConstrainedBaseline:    <unknown entrypoint>
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointEncSlice
      VAProfileH264Main               :    <unknown entrypoint>
      VAProfileH264Main               :    <unknown entrypoint>
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointEncSlice
      VAProfileH264High               :    <unknown entrypoint>
      VAProfileH264High               :    <unknown entrypoint>
      VAProfileMPEG2Simple            :    VAEntrypointEncSlice
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointEncSlice
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD
      VAProfileVC1Main                :    VAEntrypointVLD
      VAProfileVC1Simple              :    VAEntrypointVLD
      VAProfileJPEGBaseline           :    VAEntrypointVLD
      VAProfileJPEGBaseline           :    VAEntrypointEncPicture
      VAProfileVP8Version0_3          :    VAEntrypointEncSlice
      VAProfileVP8Version0_3          :    VAEntrypointVLD
      VAProfileVP8Version0_3          :    <unknown entrypoint>
      VAProfileVP9Profile0            :    <unknown entrypoint>
      <unknown profile>               :    VAEntrypointVideoProc
      VAProfileNone                   :    VAEntrypointVideoProc
      VAProfileNone                   :    <unknown entrypoint>
jevans@nuci5:~/Intel$ 

jevans@nuci5:~/Intel$ python sys_analyzer_linux.py 
--------------------------
Hardware readiness checks:
--------------------------
 [ OK ] Processor name: Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
--------------------------
OS readiness checks:
--------------------------
 [ OK ] GPU visible to OS
--------------------------
Intel(R) Media Server Studio Install:
--------------------------
 [ OK ] user in video group
 [ OK ] libva.so.1 found
 [ OK ] vainfo reports valid codec entry points
 [ OK ] /dev/dri/renderD128 connects to Intel i915

--------------------------
Media SDK Plugins available:
(for more info see /opt/intel/mediasdk/plugins/plugins.cfg)
--------------------------
    H264LA Encoder     = 588f1185d47b42968dea377bb5d0dcb4
    VP8 Decoder     = f622394d8d87452f878c51f2fc9b4131
    HEVC Decoder     = 33a61c0b4c27454ca8d85dde757c6f8e
    HEVC Encoder     = 6fadc791a0c2eb479ab6dcd5ea9da347
--------------------------
Component Smoke Tests:
--------------------------
 [ OK ] Media SDK HW API level:1.19
 [ OK ] Media SDK SW API level:1.19
 [ OK ] OpenCL check:platform:Intel(R) OpenCL GPU OK CPU OK
jevans@nuci5:~/Intel$ 

jevans@nuci5:~/Intel$ /opt/intel/mediasdk/samples/sample_multi_transcode  -i::h264 ~/Intel/test_stream.264 -o::h264 ~/Intel/out.h264 -hw -la
Multi Transcoding Sample Version 7.0.16053497

libva info: VA-API version 0.99.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_0_32
libva info: va_openDriver() returns 0
Pipeline surfaces number (DecPool): 59

Return on error: error code -3,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK4/git/mdp_msdk-samples/samples/sample_multi_transcode/src/pipeline_transcode.cpp2924

Return on error: error code -3,    /home/lab_msdk/buildAgentDir/buildAgent_MediaSDK4/git/mdp_msdk-samples/samples/sample_multi_transcode/src/sample_multi_transcode.cpp    307

 

setting LA_ICQ and CQP parameters within ffmpeg?

$
0
0

I'm attempting to benchmark (or just play around with) some of the different ratecontrol methods in the h264_qsv encoder.  I'm able to use the minrate/maxrate/b:v parameters to change the final bitrate for modes that take those parameters, but I have not been able to determine which set of command line options actually impact the CQP/LA_ICQ/ICQ rate control selection?

If I use:

-global_quality 5 -c:v h264_qsv  -look_ahead 1 -look_ahead_depth 100

I get LA_ICQ as the rate control method, but I cannot find any parameter that will change the actual rate control/quality that is used.  On my machine, this mode *invariably* results in an exceptionally high bitrate (hundreds of megabits / second!!!).  Changing the value of global_quality makes no difference.

If I set -look_ahead 0, the RateControlMethod changes to "ICQ" and the value of "global_quality" adjusts the bitrate (similar to -crf XX in the libx264 encoder)

If I use -global_quality 10 -c:v h264_qsv -qscale 20 -look_ahead 0  this results in CQP being selected as the rate control method, but again I can't figure out what parameters to pass via the command line to actually modify the quality/bitrate that the encoder chooses to use.

 

[lwobker:/dtop]$ ffmpeg -y -v verbose -i input.mp4 -global_quality 50 -c:v h264_qsv -look_ahead 1 -look_ahead_depth 10 output-global_qual3-crf20.mp4 ffmpeg version N-81045-g450cf40 Copyright (c) 2000-2016 the FFmpeg developers

  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 50.100 / 57. 50.100
  libavformat    57. 42.100 / 57. 42.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100

 

 

[lwobker:/dtop]$ ffmpeg -hide_banner -y -v verbose -i input.mp4 -t 15 -global_quality 10 -c:v h264_qsv -q:v 20 -look_ahead 0  output.mp4
[h264 @ 00000000024f4b60] Reinit context to 1920x1088, pix_fmt: yuvj420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.42.100
  Duration: 00:00:15.02, start: 0.000000, bitrate: 10144 kb/s
    Stream #0:0(eng): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuvj420p(pc), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 10138 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      timecode        : 16:11:08:04
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
    Metadata:
      handler_name    : TimeCodeHandler
      timecode        : 16:11:08:04
[graph 0 input from stream 0:0 @ 00000000024e2620] w:1920 h:1080 pixfmt:yuvj420p tb:1/60000 fr:60000/1001 sar:1/1 sws_param:flags=2
[auto-inserted scaler 0 @ 0000000000d29d20] w:iw h:ih flags:'bicubic' interl:0
[format @ 0000000000d29560] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[swscaler @ 0000000002517200] deprecated pixel format used, make sure you did set range correctly
[auto-inserted scaler 0 @ 0000000000d29d20] w:1920 h:1080 fmt:yuvj420p sar:1/1 -> w:1920 h:1080 fmt:nv12 sar:1/1 flags:0x4
[h264_qsv @ 0000000000d2e340] Initialized an internal MFX session using hardware accelerated implementation
[h264_qsv @ 0000000000d2e340] Using the constant quantization parameter (CQP) ratecontrol method
[h264_qsv @ 0000000000d2e340] profile: high; level: 42
[h264_qsv @ 0000000000d2e340] GopPicSize: 250; GopRefDist: 4; GopOptFlag: closed ; IdrInterval: 0
[h264_qsv @ 0000000000d2e340] TargetUsage: 4; RateControlMethod: CQP
[h264_qsv @ 0000000000d2e340] QPI: 0; QPP: 0; QPB: 1
[h264_qsv @ 0000000000d2e340] NumSlice: 1; NumRefFrame: 2
[h264_qsv @ 0000000000d2e340] RateDistortionOpt: OFF
[h264_qsv @ 0000000000d2e340] RecoveryPointSEI: OFF IntRefType: 0; IntRefCycleSize: 0; IntRefQPDelta: 0
[h264_qsv @ 0000000000d2e340] MaxFrameSize: 783360; MaxSliceSize: 0;
[h264_qsv @ 0000000000d2e340] BitrateLimit: ON; MBBRC: OFF; ExtBRC: unknown
[h264_qsv @ 0000000000d2e340] Trellis: auto
[h264_qsv @ 0000000000d2e340] RepeatPPS: ON; NumMbPerSlice: 0; LookAheadDS: unknown
[h264_qsv @ 0000000000d2e340] AdaptiveI: unknown; AdaptiveB: unknown; BRefType: off
[h264_qsv @ 0000000000d2e340] MinQPI: 0; MaxQPI: 0; MinQPP: 0; MaxQPP: 0; MinQPB: 0; MaxQPB: 0
[h264_qsv @ 0000000000d2e340] Entropy coding: CABAC; MaxDecFrameBuffering: 2
[h264_qsv @ 0000000000d2e340] NalHrdConformance: OFF; SingleSeiNalUnit: ON; VuiVclHrdParameters: OFF VuiNalHrdParameters: OFF
[mp4 @ 00000000025d09e0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.42.100
    Stream #0:0(eng): Video: h264 (h264_qsv), 1 reference frame ([33][0][0][0] / 0x0021), nv12, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 0.02 fps, 60k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      timecode        : 16:11:08:04
      encoder         : Lavc57.50.100 h264_qsv
    Side data:
      cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
Press [q] to stop, [?] for help
[h264 @ 000000000252ae60] Reinit context to 1920x1088, pix_fmt: yuvj420p
No more output streams to write to, finishing.e=00:00:14.73 bitrate=317220.2kbits/s speed=1.38x
frame=  900 fps= 84 q=-0.0 Lsize=  581823kB time=00:00:14.98 bitrate=318142.0kbits/s speed=1.39x
video:581810kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.002283%
Input file #0 (input.mp4):
  Input stream #0:0 (video): 900 packets read (19028307 bytes); 900 frames decoded;
  Input stream #0:1 (data): 1 packets read (4 bytes);
  Total: 901 packets (19028311 bytes) demuxed
Output file #0 (output.mp4):
  Output stream #0:0 (video): 900 frames encoded; 900 packets muxed (595772946 bytes);
  Total: 900 packets (595772946 bytes) muxed

 

Thread Topic: 

Question

Intel Xeon server hangs & reboots during ffmpeg tool installation

$
0
0

I have enabled QSV with reference of the streambuilder's enabling-iqsv documentation (http://streambuilder.pro/docs/requirements/enabling-iqsv/).

I have installed ffmpeg with `--enable-nonfree --enable-libmfx` configurations, configuration command was successfully done.Then, I invoke `make` and our server gets hanged in few seconds and it will gets rebooted automatically. its seems that it would be compilation issue.

MACHINE DETAILS : 

Server : Intel(R) Xeon(R) CPU E3-1285 v4 3.50GHz w/ Supermicro X10SLH-F

Kernel : Linux 3.10.0-229.1.2.44985.MSSr7.el7.centos.x86_64 #1 SMP Wed Nov 9 16:26:25 PST 2016 x86_64 x86_64 x86_64 GNU/Linux

./configure --prefix="/usr/ffmpeg" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --pkg-config-flags="--static" --enable-nonfree --enable-libmfx

make 

--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2068, si_status=0, si_utime=0, si_stime=0} ---

rt_sigreturn()                          = 2068

rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0

rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

stat("libavcodec/intrax8dsp.o", {st_mode=S_IFREG|0644, st_size=82840, ...}) = 0

stat("libavcodec/ituh263dec.o", 0x7ffff86affb0) = -1 ENOENT (No such file or directory)

stat("libavcodec/ituh263dec.c", {st_mode=S_IFREG|0644, st_size=38617, ...}) = 0

rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0

vfork()                                 = 2072

rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

wait4(-1, CC libavcodec/ituh263dec.o

 

Zone: 

Thread Topic: 

Help Me

Decode init is failing in Join session.

$
0
0

I am trying to implement 1:N transcode application using opaque memory. I am creating and joining two sdk session.

After joining session, decode_init() function is giving -16 error. This implementation is working perfectly when using system memory as IO_PATTERN..

Attached is the tracer log of the init function.

Here is the implementation.

IMSDKVars* DecodeInit(){

    IMSDKVars *decodevars = (IMSDKVars*)malloc(sizeof(IMSDKVars));

    mfxIMPL impl = MFX_IMPL_AUTO_ANY;
    mfxVersion ver = { {17, 1} };
    decodevars->sts = MFXInit(impl, &ver, &decodevars->session);

    decodevars->sts = MFXInit(impl, &ver, &decodevars->session2);
    decodevars->sts = MFXJoinSession(decodevars->session,decodevars->session2);

    memset(&decodevars->mfxParams, 0, sizeof(decodevars->mfxParams));
    decodevars->mfxParams.mfx.CodecId = MFX_CODEC_AVC;
    decodevars->mfxParams.IOPattern = MFX_IOPATTERN_OUT_OPAQUE_MEMORY;
    decodevars->mfxParams.mfx.FrameInfo.Width = 3840;
    decodevars->mfxParams.mfx.FrameInfo.Height = 2160;
    decodevars->mfxParams.mfx.FrameInfo.CropX = 0;
    decodevars->mfxParams.mfx.FrameInfo.CropY = 0;
    decodevars->mfxParams.mfx.FrameInfo.CropW = 3840;
    decodevars->mfxParams.mfx.FrameInfo.CropH = 2160;
    decodevars->mfxParams.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
    decodevars->mfxParams.AsyncDepth = 4;

    mfxFrameAllocRequest DecRequest;
    memset(&DecRequest, 0, sizeof(DecRequest));
    decodevars->sts = MFXVideoDECODE_QueryIOSurf(decodevars->session, &decodevars->mfxParams, &DecRequest);

    decodevars->numSurfaces = DecRequest.NumFrameSuggested;

    decodevars->pmfxSurfaces = (mfxFrameSurface1**)malloc(sizeof(mfxFrameSurface1*)*decodevars->numSurfaces);
    for (int i = 0; i < decodevars->numSurfaces; i++) {
        decodevars->pmfxSurfaces[i] = (mfxFrameSurface1*)malloc(sizeof(mfxFrameSurface1));
        memset(decodevars->pmfxSurfaces[i], 0, sizeof(mfxFrameSurface1));
        memcpy(&(decodevars->pmfxSurfaces[i]->Info), &(DecRequest.Info), sizeof(mfxFrameInfo));
    }

    memset(&decodevars->extOpaqueAlloc, 0, sizeof(decodevars->extOpaqueAlloc));
    decodevars->extOpaqueAlloc.Header.BufferId = MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION;
    decodevars->extOpaqueAlloc.Header.BufferSz = sizeof(mfxExtOpaqueSurfaceAlloc);
    mfxExtBuffer* pExtParamsDec = (mfxExtBuffer*) & decodevars->extOpaqueAlloc;

    decodevars->extOpaqueAlloc.Out.Surfaces = decodevars->pmfxSurfaces;
    decodevars->extOpaqueAlloc.Out.NumSurface = decodevars->numSurfaces;
    decodevars->extOpaqueAlloc.Out.Type = DecRequest.Type;

    decodevars->mfxParams.ExtParam = &pExtParamsDec;
    decodevars->mfxParams.NumExtParam = 1;

    decodevars->sts = MFXVideoDECODE_Init(decodevars->session, &decodevars->mfxParams);

    return decodevars;
}

.Downloadapplication/octet-streamDownload

MFXAudioDECODE->DecodeFrameAsync keeps returning MFX_ERR_MORE_DATA

$
0
0

Hi,

I'm trying to decode audio data encoded by MFXAudioENCODE->EncodeFrameAsync but MFXAudioDECODE->DecodeFrameAsync just keep returning MFX_ERR_MORE_DATA.

This is my code:

HRESULT AudioDecoder::Decode(BYTE *data/*data encoded by encoder(bitstream.data)*/, INT64 dataLength/*data length(bitstream.datalength)*/, UINT64 timestamp/*timestamp(bitstream.datalength)*/)
{//This method will be called wheen encoded data generated. Audio data is being captured and encoded in realtime
    mfxStatus res;
    mfxAudioFrame frame;
    mfxBitstream bitstream;
    memset(&frame, 0, sizeof(mfxAudioFrame));
    memset(&bitstream, 0, sizeof(mfxBitstream));    
    bitstream.MaxLength = dataLength;
    bitstream.DecodeTimeStamp = timestamp;
    bitstream.TimeStamp = timestamp;
    bitstream.Data = data;
    frame.TimeStamp = timestamp;
    /*
    I tried to write the data into a file named xxx.acc in here and it can played by player.
    General
    Complete name                            : C:\xxx.aac
    Format                                   : ADTS
    Format/Info                              : Audio Data Transport Stream
    File size                                : 206 KiB
    Overall bit rate mode                    : Variable

    Audio
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format version                           : Version 2
    Format profile                           : LC
    Bit rate mode                            : Variable
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 46.875 FPS (1024 spf)
    Compression mode                         : Lossy
    Stream size                              : 206 KiB (100%)
    */
    res = m_mFXAudioDECODE->DecodeFrameAsync(&bitstream, &frame, &m_syncpoint);//This function just keep returning MFX_ERR_MORE_DATA
    if (res) {
        if (res == MFX_ERR_MORE_DATA) {
            printf("Error: The function requires more data to generate any output{MFX_ERR_MORE_DATA[0x%08X(%d)]}.\n", res, res);
        }
        else if (res == MFX_ERR_MORE_BITSTREAM) {
            printf("Error: The function requires more bitstream buffers to store output{MFX_ERR_MORE_BITSTREAM[0x%08X(%d)]}.\n", res, res);
        }
        else if (res == MFX_ERR_NOT_ENOUGH_BUFFER) {
            printf("Error: The output bitstream buffer size is insufficient{MFX_ERR_NOT_ENOUGH_BUFFER[0x%08X(%d)]}.\n", res, res);
            /*
            ...
            */
        }
        else {
            printf("Error: cannot decode audio frame[0x%08X(%d)].\n", res, res);
            /*
            ...
            */
        }
    }
    res = m_mFXSession.SyncOperation(m_syncpoint, INFINITE);
    if (res) {
        printf("Error: cannot sync operations[0x%08X(%d)].\n", res, res);
        /*
        ...
        */
    }
    /*
    ...
    */
    return S_OK;
}

What's wrong with my code?
Thank you.

Thread Topic: 

Help Me

QSV encode hangs early in transcode process

$
0
0

This has also been crossposted at the FFMPEG forum as it's not clear whether this is an Intel issue or an FFMPEG issue.

http://ffmpeg.gusari.org/viewtopic.php?f=11&t=3253

 

 

Environment: cygwin/Windows10
CPU: Core i7-5600U
FFMPEG Build: using the Nov 10 2016 snapshot build from Zeranoe: ffmpeg version N-82324-g872b358 
Intel SDK build: 7.0.0.358 (aka "Media SDK 2016 R2")

Problem description: when transcoding an MP4 file using the h264_qsv encoder, the encode process *sometimes* hangs and never completes. Specifically:
- the ffmpeg-generated progress indicator stops incrementing, generally between one and four seconds into the encode. 
- Windows reports 100% utilization on the CPU core where the ffmpeg.exe process is running. 
- I left the process running for over an hour at one point to (almost) guarantee that it wasn't just some strange performance issue - it never completes.
- Process manager reports zero increment of read or write bytes from that process, implying to me there's an infinite loop somewhere.
- The issue is reproduceable, but is NOT guaranteed to occur on every encode. I'd estimate that roughly 1/3 of the time the encode hangs, and the rest of the time it completes successfully.
- I've attempted to vary settings to try and correlate the failure/hang with particular configs/parameters but have not been able to isolate anything. I've specifically used different input files from both Sony and GoPro sources (all I have available), different ratecontrol methods, different global_quality settings, different input seek offsets, different durations, different audio codecs (including discarding audio entirely). 
- The problem ONLY occurs when using the h264_qsv codec, I haven't seen it using libx264.

At this point I'm not sure how else to troubleshoot this, would appreciate input and/or suggestions. It's unclear to me where in the Intel<-->ffmpeg interface this might lie or how to determine that: it's entirely possible this is a QSV problem.

ffmpeg output (the program hangs indefinitely at the last line, but is NOT consistent at exactly how many frames it processes before hanging... I've seen anywhere from zero frames up to a couple hundred. If it gets past the first five seconds or so it always completes.)
 

ffmpeg version N-82324-g872b358 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 36.100 / 55. 36.100
  libavcodec     57. 66.101 / 57. 66.101
  libavformat    57. 57.100 / 57. 57.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 66.100 /  6. 66.100
  libswscale      4.  3.100 /  4.  3.100
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
[mpegts @ 0000000000612660] parser not found for codec hdmv_pgs_subtitle, packets or times may be invalid.
    Last message repeated 1 times
[h264 @ 0000000000614ca0] Reinit context to 1920x1088, pix_fmt: yuv420p
[NULL @ 0000000000614ca0] Ignoring NAL type 9 in extradata
    Last message repeated 8 times
Input #0, mpegts, from '00021.MTS':
  Duration: 00:04:36.13, start: 1.040000, bitrate: 22468 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High), 1 reference frame (HDMV / 0x564D4448), yuv420p(top first, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
[graph 0 input from stream 0:0 @ 0000000000612580] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:1/1 sws_param:flags=2
[auto-inserted scaler 0 @ 0000000000f56f00] w:iw h:ih flags:'bicubic' interl:0
[format @ 000000000061b0c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[auto-inserted scaler 0 @ 0000000000f56f00] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1920 h:1080 fmt:nv12 sar:1/1 flags:0x4
[h264 @ 0000000003211e00] Ignoring NAL type 9 in extradata
[h264_qsv @ 00000000028800a0] Initialized an internal MFX session using hardware accelerated implementation
[h264_qsv @ 00000000028800a0] Using the VBR with lookahead (LA) ratecontrol method
[h264_qsv @ 00000000028800a0] profile: high; level: 40
[h264_qsv @ 00000000028800a0] GopPicSize: 250; GopRefDist: 4; GopOptFlag: closed ; IdrInterval: 0
[h264_qsv @ 00000000028800a0] TargetUsage: 4; RateControlMethod: LA
[h264_qsv @ 00000000028800a0] TargetKbps: 1000; LookAheadDepth: 40
[h264_qsv @ 00000000028800a0] NumSlice: 1; NumRefFrame: 2
[h264_qsv @ 00000000028800a0] RateDistortionOpt: OFF
[h264_qsv @ 00000000028800a0] RecoveryPointSEI: OFF IntRefType: 0; IntRefCycleSize: 0; IntRefQPDelta: 0
[h264_qsv @ 00000000028800a0] MaxFrameSize: 783360; MaxSliceSize: 0;
[h264_qsv @ 00000000028800a0] BitrateLimit: ON; MBBRC: OFF; ExtBRC: unknown
[h264_qsv @ 00000000028800a0] Trellis: auto
[h264_qsv @ 00000000028800a0] RepeatPPS: ON; NumMbPerSlice: 0; LookAheadDS: unknown
[h264_qsv @ 00000000028800a0] AdaptiveI: unknown; AdaptiveB: unknown; BRefType: off
[h264_qsv @ 00000000028800a0] MinQPI: 0; MaxQPI: 0; MinQPP: 0; MaxQPP: 0; MinQPB: 0; MaxQPB: 0
[h264_qsv @ 00000000028800a0] Entropy coding: CABAC; MaxDecFrameBuffering: 2
[h264_qsv @ 00000000028800a0] NalHrdConformance: OFF; SingleSeiNalUnit: ON; VuiVclHrdParameters: OFF VuiNalHrdParameters: OFF
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf57.57.100
    Stream #0:0: Video: h264 (h264_qsv), 1 reference frame ([33][0][0][0] / 0x0021), nv12(left), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.66.101 h264_qsv
    Side data:
      cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
Press [q] to stop, [?] for help
[NULL @ 0000000000614ca0] Ignoring NAL type 9 in extradata
[h264 @ 0000000003211e00] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 00000000031abd40] reference picture missing during reorder
[h264 @ 00000000031abd40] Missing reference picture, default is 2147483647
*** 3 dup!
frame=   30 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=3 drop=0 speed=   0x
 

[lwobker:/dtop]$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 61
model name      : Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
stepping        : 4
cpu MHz         : 2594.000
cache size      : 256 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 20
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt aes xsave osxsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

 

 

 

 

 

Can't install Core-i3 graphics driver on Windows Server 2008

$
0
0

Hi,

We failed to set up H.264 hardware accelerated environment on platform as follows:

CPU: Intel Core i3-2120

GPU: Intel HD Graphics 2000

OS:   Microsoft Windows Server 2008 R2 64-bit

What we tried incluede:

(1) searching by “Downloads for Intel® Core i3-2120 Processor” https://downloadcenter.intel.com/download/21414/Intel-HD-Graphics-Driver... , i.e. Intel® HD Graphics Driver for Windows Vista* 64 (exe) Version: 15.22.54.64.2622 (Latest) Date: 1/21/2012

(2) GraphicsDriverWin64, included in Intel Media Server Studio 2015 install package.

Both version of graphics driver failed during installation:(

Could you please help on this ASAP? we need to fix out where to get proper graphics driver for i3-2120 on Windows Server 2008!

thanks

Charles

Hybrid HEVC decode

$
0
0

Hi all,

in our application we are successfully using the full HW accelerared HEVC decoding available on Skylake (works great even for multiple 4K HEVC streams). We are using the Media SDK and are adding the MFX_PLUGINID_HEVCD_HW plugin into the pipeline. I read that on pre-Skylake platforms a hybrid model can be used to decode HEVC.

1. Is the hybrid model also implemented in the driver or are any additional components needed?

2. Do we need to modify our app in any way to support the hybrid model?

3. Is the hybrid model supported on 3.X generation as well (or only on 4.X and 5.X)?

I know there is a SW HEVC plugin available in the Intel Media Server Studio, but this might not be what we want. I think that the hybrid model is a different approach than the SW plugin, right?

I am sure many of you guys are using the hybrid model, thanks in advance for your answers.

Alex

frame_cropping_flag not set

$
0
0

Hi,

I am trying to convert a video to 1920x1080 using VPP.

The scaling kind of works but it looks like it does not crop correctly. Even with CropH set to 1080, the resulting h264 stream has frame_cropping_flag set to 0.

Is it an expected behavior? Is there something else to do ?

Thanks,

Gilles


What's the difference between the driver in MSS package and download center package?

$
0
0

Hi,

For example, let's talk about Windows. If I download a Media Server Studio 2016 and install it, I can see a GraphicsDriverWin64 driver package in the destination folder, among other docs and DLLs.

On the other side, as we know we usually download Intel graphics driver by selecting some conditions in https://downloadcenter.intel.com/.

So, would someone please tell me: what's the difference between the above two options?

Particularly, I have never succeeded in installing the 1st, i.e. the driver packaging with Media Server Studio installer...and I'm curious why.

thanks a lot!

Charles

 

Zone: 

Thread Topic: 

Question

When to support QVBR in MSS on Linux?

$
0
0

Hi,

I used QVBR Bitrate Control Method in MSS 2017 on Windows, and it worked very well.

But my project is on Linux, so I tried to use it on CentOS, but it failed.

I checked the document of MSS on Linux, QVBR is not supported.

When can I use QVBR on Linux?

 

Best wishes,

Gao

Media SDK Vs Media Server Studio on Windows Server 2012

$
0
0

I'm currently using Media SDK 7.0.0.311 (software processing) to transcode 24 streams to H264 on a Windows Server 2012 machine using a Xeon E5-2667 v3. I'm finding that performance is great for ~ 20 hours & the CPU usage is quite low (~30%) & then something changes and the encoder suddenly starts doing a lot more processing and the CPU jumps up to ~95%. Are there any known issues with the H264 encoder after it's been running for a while? I just discovered that Media SDK isn't supported for Windows Server 2012 and using Media Server Studio is advised. Could this be related?

Any ideas are welcome.

Thread Topic: 

Question

MPEG2 Encoding and Decoding features/capabilities

$
0
0

Hi,

I was analysing MPEG2 encoder of Intel Media SDK for our application on several parameter/features required. I could not get answers for all my queries. Is MPEG2 encoder and decoder Datasheet available? 

I have following questions on MPEG2 encoder and decoder on IMSDK

1.Does it support YUV422 encoding and Decoding?

2.Does it 10bit encoding and Decoding?

3.Does it support passing userdata(similar to SEI) and VUI information?

4.Does it supports force IDR insertion?

5.What is the max bitrate MPEG2 can encode? can MPEG2 supports upto 100mbps?

6. What is the max bitrate decoder can support? can it support upto 120mbps?

7. Does MPEG2 encoder supports "Intra frames Only Profile" ?

8. Does MPEG2 decoder support "input stream error handling"?

9. Does MPEG2 decoder support high profile?

Regards,

durgesh

MFXVideoENCODE_Query with mfxExtCodingOptions on Hardware Implementation

$
0
0

Hello,

I would like to query encoder capabilities for mfxExtCodingOption, mfxExtCodingOption2 and mfxExtCodingOption3. I use query mode 1 by attaching mfxExtCodingOption(2,3) structures to out parameter and use NULL for input parameter. When I made query in sofware implementation, everything works as expected. I get MFX_ERR_NONE result for mfxExtCodingOption and mfxExtCodingOption2 and I get "1" for supported and "0" for not supported options on mfxExtCodingOption structures. However, when I run same code with hardware implementation, although I get MFX_ERR_NONE result for mfxExtCodingOption, mfxExtCodingOption2 and mfxExtCodingOption3, all options on mfxExtCodingOption structures are "0". 

I set only codec option on out parameter(params.mfx.CodecId = MFX_CODEC_AVC).

Is it a bug? or should I need to do some extra steps to query on hardware implementation?

SDK Ver: Intel Media SDK 2016 R2

Tested:

  •  Intel(R) HD Graphics 4600    10.18.14.4414    Win 7
  •  Intel(R) HD Graphics 530      20.19.15.4501    Win 8.1

 

Zone: 

Thread Topic: 

Question
Viewing all 2185 articles
Browse latest View live


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