RtspClientSharp icon indicating copy to clipboard operation
RtspClientSharp copied to clipboard

Support ps(program stream) frame parse from rtp payload over tcp/udp

Open pedoc opened this issue 7 years ago • 2 comments

RT,thanks

pedoc avatar Sep 12 '18 09:09 pedoc

Could you explain better? Do you mean metadata stream ?

BogdanovKirill avatar Sep 12 '18 13:09 BogdanovKirill

@BogdanovKirill thanks for you reply. when rtp payload is PS(MPEG2 Program Stream) type,raw H264 data needs to be unpacked from PS payload.at this point, the current project will not work properly. but.i'm trying parse PS and send raw h264 data to RtpStream,not working. example code: image image and add handler image

occasionally can trigger OnFrameGenerated event,but decode frame not working,code :

   if (!(rawFrame is RawH264IFrame rawVideoFrame))
                return;
           // rawVideoFrame.CleanSpsPpsSegment();
            FFmpegVideoDecoder decoder = GetDecoderForFrame(rawVideoFrame);
            if (!decoder.TryDecode(rawVideoFrame, out DecodedVideoFrameParameters decodedFrameParameters))
                return;

decoder.TryCode return error code -3. i confirm that the data format is raw h264 and the pixel format is YUV420p(parse from ffmpeg).

attchment:

rtp&h264 dump.zip

pedoc avatar Sep 14 '18 04:09 pedoc