Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Unanle to decode h.264 from Axis camera

soupalognon
Beginner
1,097 Views

Hello, I`m currently writing a h.264 decoder for an Axis camera with H.264 frames, I wonder if there are procedures for performing this decoding. Right now nothing works.

Here's what I do:
1) I prefix 00 00 00 01 before sending to the decoder
2) each IFrame I add the SPS and PPS obtained by sprop-parameter-sets

The decoder can never decode, I always received the return code -10 (Decode more Data)

Do I have to generate SEI messages? If Yes, I need to find the documentation so I can implement it, Where can i find it?

Thank you all

Soupalognon.
0 Kudos
9 Replies
Petter_L_Intel
Employee
1,097 Views
Hi Soupalognon,

As far as I know we have not studied the H.264 output from that device so it's hard to tell what may be going on. I would imagine that the device should create a proper H.264 elementary stream that follows standard, but that does not seem to be the case as you describe it.

Is the stream output from the encoder processed correctly by other stream analysis tools such as Elecard StreamEye?

So, when you feed leading stream data into DecodeHeader() it always returns "-10"?

SEI message(s) are not required to decode the stream header or to decode the stream frames.

In any case, if you can, please provide a pure stream dump from the device so that we can investigate it from our side.

Regards,
Petter
0 Kudos
soupalognon
Beginner
1,097 Views
Thanks Peter for your response.


When i received the axis h.264 frames, i pass it to directshow using the Microsoft DVD-DTV filter and this filter can decode the frames, so i guest the axis H.264 is OK.

is the stream output from the encoder processed correctly by other stream analysis tools such as Elecard StreamEye?
- Well i don't know Elecard StreamEye, tomorrow i will take a look on it.

So, when you feed leading stream data into DecodeHeader() it always returns "-10"?
- Yes

SEI message(s) are not required to decode the stream header or to decode the stream frames.
- Well the Microsoft decoder need it because without it the output was garble.

In any case, if you can, please provide a pure stream dump from the device so that we can investigate it from our side.
- i will do that tomorrow

Thanks for your time.

regards,

Soupalognon.
0 Kudos
soupalognon
Beginner
1,097 Views
The Elecard StreamEye work fine, it decode the video.

can someone explain to me how to send a file ? i select Add Files, but how to make it available to this post ?


Thanks

Soupalognon.


0 Kudos
soupalognon
Beginner
1,097 Views
Yes i found how to attach a file :-)

This file is a few seconds samples from my Axis camera.

this is exactly the same data that I send to Intel decoder.

regards,

Soupalognon
0 Kudos
soupalognon
Beginner
1,097 Views
small update:

So, when you feed leading stream data into DecodeHeader() it always returns "-10"?
- The decode Header is OK, the problem is when i use DecodeFrameAsync.


Here what i do exactly

1) Initialize MFXVideoSession with version 3,1
2) Call QueryIMPL to determine if Hard of Soft decoding
3) Call the DecodeHeader for each frame until no error is returned
4) Call decoder->Init
5) Allocate surface

When the header is decoded
6) Get a free surface
7) call DecodeFrameAsync (always return -10)

this is where i'm trying to fix.

thanks

Soupalognon.

0 Kudos
Petter_L_Intel
Employee
1,097 Views
Hi,

I tried the provided H264 stream and it works fine using both Media SDK SW and HW decoder.

I used the sample_decode sample, which is able to process and display the stream without issues. I see no issues with either DecodeHeader (successfully processes the SPS/PPS at the start of the stream) or DecodeFrameAsync (asks for some additional surfaces before delivering processing frame).

Please take a look at the sample decoder implementation as a reference.

Does it work in SW decode mode for you? If it is, maybe the issue is due to using a very old Intel graphics driver?

Regards,
Petter
0 Kudos
soupalognon
Beginner
1,097 Views
Petter thank you, I will look at the example and try to make it work.

thanks for your time.

regards,

Soupalognon.
0 Kudos
Vassili_Yakovlev
Beginner
1,097 Views
Hi, I do recording and playing of RTP stream from different cameras. As my experience: Axis doesn't send any information together with the bit stream. So in order to make proper stream which any decoder can decode I use to add SPS and PPS units before each IDR frame (key frame in other words), please be sure that you add also 00 00 00 01 before SPS and before PPS. regards
0 Kudos
Paul_W_2
Beginner
1,097 Views

Hi sorry to bring this old post up. I may have the same problem as these guys. Can i ask how do i generate a SPS and PPS nal unit from an axis camera so that i can send it before the IDR frame. If anyone can tell me, it would be a great help.

0 Kudos
Reply