My project is to stream encoded h264 live over the network. It works well with hardware encoding. The decoder is able to receive the mid stream encoded h264 and search for the sequence header which provides all the necessary information like width and height. However, when i switch to software encoding, the same receiving end is not able to receive from the mid stream the sequence header. Looks like the sequence header is only written at the beginning of the encoded stream. Does anyone know how to fix this problem so that sequence header can be found in mid stream of software encoding?
Using windows 8.1 64 bit. intel media sdk pro. i7-4910MQ
Thanks a lot!
Thanks for replying. What i did was that i encoded a YUV file into two h264 files using sample_encode. One HW and one SW encoding. Then i modified sample_decode project's sample_utils.cpp to remove the first few bytes of the h264 in the CSmplBitstreamReader::Init(const msdk_char *strFileName):
MSDK_CHECK_POINTER(m_fSource, MFX_ERR_NULL_PTR); unsigned char* temp = new unsigned char[854*352]; fread(temp, 1, 854*352, m_fSource); delete temp; m_bInited = true; return MFX_ERR_NONE;
It plays back ok with HW encoded h264 file, but not for SW encoded H264 file. Please advise. Thanks!
The video file i used would be the big buck bunny 854*480p
Thanks for sending the changes, I followed the same steps and use the same input but didn't see the issue on 4th generation system. Can you please send the reproducer(use sample_decode and make changes according to your application) and the input so that we don't miss any details and debug this issue.Can you also please send the o/p of media sdk tracer and system analyzer tool present in the <installed folder>\mediasdk\tools.
Hi sorry for the slow response.
As I am running the application on a separate network, i am unable to provide you with the codes. But what i noticed is that running the sample_encoder.exe using HW and SW produces two files of different sizes. Why is this the case?
Also, i have looked into the output of SDK tracer, Basically the difference is that when decoding the SW encoded h264 file, it is unable to complete MFXVideoDECODE_DecodeHeader(9.03487 msec, status=MFX_ERR_MORE_DATA) - where as the HW encoded h264 file is able to after 1 failed attempt.
To add on, the sw media sdk version using is 1.9 whereas the hw media sdk version using is 1.7. Is this the cause?
My sys analyzer output crashes when it reraches Installed Media SDK packages (be patient...processing takes some time): The scan shows that it supports all HW and SW except HW v1.8. It does not show v1.9 scans
You will see a slight variation in the filesize since the implementations are different. According to the error you are seeing the application should enter it to next if statement where if status is error more data, it should read the next frame to fill in the surface.
if (MFX_ERR_MORE_DATA == sts)
if (m_mfxBS.MaxLength == m_mfxBS.DataLength)
sts = ExtendMfxBitstream(&m_mfxBS, m_mfxBS.MaxLength * 2);
MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, sts);
// read a portion of data
sts = m_FileReader->ReadNextFrame(&m_mfxBS);
You can rollback to 1.7 version for sw encoding and check, the latest and greatest version we have 1.16. I would advice you to use the latest Media SDK(part of Media Server Studio or Intel INDE) version with latest API because there might be a fix of your issues on latest APIs.
Can you please send the o/p of the the tool before it crashes, we have got the crash part covered as a bug, It will be fixed in the next release? I am interested in the Graphic device and system info part.
I understand the MFX_ERR_MORE_DATA error. The sample decode application does read the next frame to fill the surface, however it just could not find the header and skipped pass all the frames till the end of file.
I installed the new Intel INDE PRO but i still got 1.9 sw only. How do i use 1.16 version? Must i set the minimum version to at least 1.16 when i create the session? Currently the minimum version i set is 1.0 to create the session.
I have also confirmed this weird behavior with my colleague and he too finds the same problem on his computer where he cannot start the decoder mid stream of a SW encoded stream.
PS. I will be away for the whole of next week. I will try to get back to you on any discussion after that. Thanks!
I tried to set the minimum version to 1.16 but failed to get a session. It returned unsupported. Even when i reduced the version to 1.10 it still returned unsupported. According to my analyser, it only shows versions up to 1.7. I have downloaded the latest inde pro version w_inde_2015.2.027. Please advise how do i make use of the newest 1.16 version.
Could you check if there is any update notice in Intel Software Manager? There should have one notice for INDE Media SDK for Windows 18.104.22.1688. Please click Update to install the latest Media SDK at version 1.16. Thanks.