I try to integrate the Intel Media SDK in our software and want buy a license for it. But it didn't work in the test with the trial version of Media SDK 2016. I setup the Intel Media SDK. The samples work an the devices are accessable. Also the compilation with ffmpeg work. But if we change the codec to h264_qsv instead of h264 no picture will be shown, also no error comment on stderr was shown.
The first problem was the init. No passed packet makes an successfull init. The result ist every time the same: MFX_ERR_MORE_DATA. I changed the init of ffmpeg to manually set the format. Now the init was successful but, now MFXVideoDecode_DecodeFrameAsync always return's -> MFX_ERR_MORE_DATA.
I use the trial Media SDK 2016 with the preferred CentOS linux and the latest source of FFMpeg 2.8.
Hi Martin and David,
It seems like an input stream format is incompatible for Media SDK. Media SDK works with start code prefixed (Annex B) input format. You can convert your input bitstream to Annex B format and try to use h264_qsv again.
Best wishes, Anna
After i parsing the rtp stream an annex b stream was passed to the decoder, with normal h264 decoder of ffmpeg it works. The buffer we put to the deocder contains always the whole frame.
Yes, absolutely, Annex is a bitstream format. More information about it are available at the h.264 standard.
Now I don't confident is it FFmpeg or Media SDK problem. I need some time for investigations. I'll come back with an answer a bit later.
No, Mpeg2 has only one input bitstream format.
I found the Problem. After parsing the RTP i had to add codec extra data (found in sdp definition) after nal type 5. If h264 stream was parsed by ffmpeg it was added, but the h264_qsv codec don't add it, because it use the intel specific parsing method. Adding the extra data transcode the stream to a real annex b format.
This link helps me to work out the solution:
Dear Anna B,
I followed the steps mentioned in the getting started guide for installing the Intel media server studio SDK.
Can you please list down the steps which you are followed to install Media SDK with Centos linux,
I am trying to use intel hw accelerators with latest source of FFMPEG 3.0 version.but unable to use intel hw accelerators,
I mentioned all the system specifications and issues in above mail thread given to Anna B..
Right now i am getting errors like :
[user@localhost ffmpeg-3.0]$ ./ffmpeg -i /home/xyz/tractor.264 -vcodec h264_qsv /home/xyz/out1.yuv
ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
configuration: --enable-libmfx --enable-nonfree
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
[h264 @ 0x23a6380] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, h264, from '/home/xyz/tractor.264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p, 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc
[h264_qsv @ 0x245d4c0] mfx init: /dev/dri/renderD128 fd open failed
[h264_qsv @ 0x245d4c0] mfx init: /dev/dri/renderD129 fd open failed
[h264_qsv @ 0x245d4c0] mfx init: /dev/dri/renderD130 fd open failed
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
[h264_qsv @ 0x245d4c0] mfx init: /dev/dri/card0 vaInitialize failed
[h264_qsv @ 0x245d4c0] mfx init: /dev/dri/card1 fd open failed
[h264_qsv @ 0x245d4c0] mfx init: /dev/dri/card2 fd open failed
[h264_qsv @ 0x245d4c0] Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode.
Output #0, rawvideo, to '/home/xyz/out1.yuv':
Stream #0:0: Video: h264, none, q=2-31, 128 kb/s, 25 fps
encoder : Lavc57.24.102 h264_qsv
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
i installed the media sdk on the steps in following manual
I compiled it with latest git version of ffmpeg 2.8 branch.
git clone -b release/2.8 https://github.com/FFmpeg/FFmpeg.git