3 Replies Latest reply on Jul 6, 2015 2:03 AM by pinform

    AMF in Media SDK 1.1 could not decode live H.264 streams.Why?

    brooks

      Hi, dear masters

           On top of the AMF sample pipelinePlayback in media sdk 1.1, I wrote some code to decode the realtime h.264 stream from another video server. Instead of AMFDataStreamFile, which is created during initialization of playback pipeline, I provided my own 'live source' data stream and inside it, I directed reading from file to live source from network. Accordig to my understanding to pipeline working mechanism, at the beginning of job, I blocked the on-demand reading for PPS/SPS, requested  by the pipeline and until the SPS/PPS is got, the reading call is freed to return back. After that, with synchronization skills, I ensured each successsive reading could retrieve the data from my network buffer,which is holding continuous feed h.264 data. That's basically the outline of my implementation.

         Now, I managed to playback the stream from IP camera successfully, but 2 problems are remarkable,

      a. The latency is big, about 2 or 3 seconds. For example, I suddenly move my hand in front of camera, only after 2 or 3 seconds, I could see this motion in my playback window. I do not see such a big latency with 3rd party tool, like onvif manager.

      b. The decoded picture's quaility is bad when motion is relatively far. I could see obvious blur blocks surrounding moving objects. When stopped for a whiles, the blur could dissappear.

       

        And I think, the worst poblem is that I could not get the real-time h.264 stream from video server,( mentioned above ), to be decoded. Always, the command line window shows the following errors,

       

      2015-05-31 10:32:23.859      534 [h264parser_util]   Error: ..\..\..\..\..\impl\components\VideoStreamParser\parsers\h264\h264_util.cpp(91):Assertion failed:false

      2015-05-31 10:32:23.877      534 [H264Parser]   Error: ..\..\..\..\..\impl\components\VideoStreamParser\parsers\h264\H264Parser.cpp(2947):GetDPBSize() undefined level_idc=0

       

      Something is wrong? But I am sure that SPS/PPS has been obtained by pipeline, by debugging.

      Could anyone do me a favor to analyze the reason?

       

      Thanks.

      Brooks Li.