- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am using IPP6.1.2.41 and ipp-samples_p_6.1.4.059
I can successfully decode H264 inside mp4 format, now I am trying to decode H264 stream comming from a network camera. I have implemented a network data reader. I get SPS/PPS from SDP, convert from base64, add 000001 to beginning of each and add it to m_pDecSpecInfo as media data.
I get data from RTP bit stream strip RTP and (if present) fragmented header so that pure NALU stream is there, then add 000001 start code to each NALU. Decoder is set to m_decParams.info.stream_subtype = UMC::UNDEF_VIDEO_SUBTYPE so that pure H264 NALU stream be accepted.
Decoder gets initialized with OK and GetInfo returns correct video data (width, height and fps) so SPS/PPS should have been correctly decoded. However, the output of the GetFrame is either a Grey screen or some corrupted image. I attached the bitstream (out1.h264), it starts with 000001SPS000001PPS000001...
Same stream can be played without problem in VLC (vlc.exe out1.h264 --demux=h264).
I appreciate if you can take a look at the provided stream and let me know if there is any problem with it.
I also have made necessary changes to AVSync to recognize this pure H264 stream and use H264Splitter to show the video. Using SimplePlayer I see exactly the same output. To do that I use 0x00000167 to detect SystemStreamType, and use H264Splitter and then add SPS/PPS to m_pDecSpecInfo. I can provide you with the changes if you want (umc_h264_spl.cpp, umc_h264_spl.h, umc_splitter.cpp, umc_splitters.h and codec_pipeline.cpp).
I am using IPP6.1.2.41 and ipp-samples_p_6.1.4.059
I can successfully decode H264 inside mp4 format, now I am trying to decode H264 stream comming from a network camera. I have implemented a network data reader. I get SPS/PPS from SDP, convert from base64, add 000001 to beginning of each and add it to m_pDecSpecInfo as media data.
I get data from RTP bit stream strip RTP and (if present) fragmented header so that pure NALU stream is there, then add 000001 start code to each NALU. Decoder is set to m_decParams.info.stream_subtype = UMC::UNDEF_VIDEO_SUBTYPE so that pure H264 NALU stream be accepted.
Decoder gets initialized with OK and GetInfo returns correct video data (width, height and fps) so SPS/PPS should have been correctly decoded. However, the output of the GetFrame is either a Grey screen or some corrupted image. I attached the bitstream (out1.h264), it starts with 000001SPS000001PPS000001...
Same stream can be played without problem in VLC (vlc.exe out1.h264 --demux=h264).
I appreciate if you can take a look at the provided stream and let me know if there is any problem with it.
I also have made necessary changes to AVSync to recognize this pure H264 stream and use H264Splitter to show the video. Using SimplePlayer I see exactly the same output. To do that I use 0x00000167 to detect SystemStreamType, and use H264Splitter and then add SPS/PPS to m_pDecSpecInfo. I can provide you with the changes if you want (umc_h264_spl.cpp, umc_h264_spl.h, umc_splitter.cpp, umc_splitters.h and codec_pipeline.cpp).
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok I guess I found the problem!
First, the bits nri and forbidden_zero were not saved correctly which caused the greyish output. Although I thought the decoder will ignore those bits. As soon as I fixed this, simple_player can play raw H264 correctly.
Second, each GetFrame must not supply more than one NALU. I was stuffing both SPS and PPS packets in one MediaData and pass it to GetFrame. It seemed OK to me because m_pDecSpecInfo also included both SPS and PPS.
I will post here in case I face new problems.
BTW, I attached my changes to for whoever is interested in reading raw H264 files, the file must start with 0x00000167 (i.e. 0x000001SPS) then comes PPS and finally 0x000001NALU0x000001NALU...
First, the bits nri and forbidden_zero were not saved correctly which caused the greyish output. Although I thought the decoder will ignore those bits. As soon as I fixed this, simple_player can play raw H264 correctly.
Second, each GetFrame must not supply more than one NALU. I was stuffing both SPS and PPS packets in one MediaData and pass it to GetFrame. It seemed OK to me because m_pDecSpecInfo also included both SPS and PPS.
I will post here in case I face new problems.
BTW, I attached my changes to for whoever is interested in reading raw H264 files, the file must start with 0x00000167 (i.e. 0x000001SPS) then comes PPS and finally 0x000001NALU0x000001NALU...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Dashesy,
Glad you found the solution, and thanks for posting it for others to see.
Paul
Glad you found the solution, and thanks for posting it for others to see.
Paul
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page