Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.
2927 Discussions

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


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); 


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

input sps/pps
encoder sps/pps

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); 


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
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
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
hardware/software 1.17


-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,



0 Kudos
1 Reply


Nobody has ideas? This is quite easy to test, can anyone confirm the bug?