Hi, I have issue with encoding followed by decoding: the correct video file (h264/AVC format) was encoded using sample_encode, and encoding result was decoded by sample_decode using h264 codec. The decoded output was impossible to play (using VLC media player) or see its details in MediaInfo browser.
I tryed to repeate encoding-decoding workflow for the same file without audio codec, but result was the same(audio codec, was removed by ffmpeg with "failed for stream 0, codec copy" notice).
I tryed to use HW optimization for sample_encode.exe (-hw option) but application returned errors, what may be the possible reason for that ? Does -sw option utilizes Sandy Bridge technology for transcoding?
My system has i7-2600 CPU and 2 graphic cards Intel (disable onboard card) and Nvidia GT430 - main graphic card.
May be you have had experience with SW/HW transcoding acceleration factors relative to any reference CPU/GPU system ?
The way you are using the Media SDK samples it will unfortunately not work.
Media SDK operates on elementary streams (ES) and raw frame data. In your usage you are using media containers. Please refer to the Media SDK manual and Developer Guide for expanded details on how to use Media SDK and the samples.
You are feeding the encode sample an avi media container file. This will not work since the encoder requires RAW frame data input (encode sample expects input YUV data file). Decode sample expects ES input.
Some other notes:
- Common media players does not normally play back ES well
- You are using a discrete graphics card. By default this configuration will not work if you want to use HW acceleration. To make it work you will have to make some changes to the sample code and connect a secondary monitor associated with Intel processor graphics. There are more info on this in the manual.
Thanks a lot for you response, I'm very new for Intel Media SDK, after I've finished to read Media Developers Guide and tryed to run examples. Probably the correct workflow to run examples (in my case) should be like:
Hi Petter, You are very patient for my questions and I'm very grateful to you for that ! Probably (I hope so) this's last question: Intel Media SDK session may be initialized by HW or SW flag, when used HW flag, probably will be used graphic card capabilities for parallel computation. My question regarding to SW mode, does Media SDK function are optimized per CPU (for example if function is running on i7-2600 CPU, does will it utilize GPU capabilities of the CPU) or optimization is more universal, like to usage in SSE2/3 instructions for CPU, without to take into account capabilities of the current CPU ? Does optimization support older families of Intel CPUs?
If Media SDK is initialized with HW flag it means that Intel GPU fixed function HW will be used to accelerate codec. Note that HW acceleration is not available on all Intel platforms. This is where things may seem a bit confusing, since the recent Intel platforms such as the 2nd generation Intel core processors (also code named Sandy Bridge) have GPU and CPU integrated on the same silicon. When we refer to the GPU on such a platform we often refer to Intel Processor Graphics.
If Media SDK is initialized with SW flag it means that the codec workload will be executed on the CPU only. And yes, CPU codec execution is optimized for the specific CPU architecture.
And again, keep in mind that if you have a discrete graphics card installed, Media SDK HW acceleration will not work by default.