Unanle to decode h.264 from Axis camera

Unanle to decode h.264 from Axis camera

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.

9 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

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

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.

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.

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

Allegati: 

AllegatoDimensione
Download c.h2649.33 MB

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.

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

Petter thank you, I will look at the example and try to make it work.

thanks for your time.

regards,

Soupalognon.

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

Accedere per lasciare un commento.