BogdanovKirill / RtspClientSharp

Pure C# RTSP client for .NET Standard without external dependencies and with true async nature. I welcome contributions.
MIT License
694 stars 284 forks source link

All frame are !RawJpegFrame #123

Open lemorlenny opened 2 years ago

lemorlenny commented 2 years ago

Hi, My goal is to save timed screenshot from rtsp stream camera.

I tried your MjpegSnapShotsMaker and SimpleRtspPlayer, I test many rtsp stream.

For example in VLC this : rtsp://rtsp.stream/pattern works well.

But when I try the example MjpegSnapShotsMaker I see that after the frame is received in the code:

(Program.cs - Line 62)

rtspClient.FrameReceived += (sender, frame) => { if (!(frame is RawJpegFrame)) return;

RawJpegFrame is always false.

I honestly don't understand how this property works so I will be grateful to anyone who can send me some suggestions.

I play with VS2019 .NET 4.6.1 in W10

alexgurenko commented 2 years ago

Camera streams can be MJPEG or H264. I think you are getting H264 format frames. Check it out in debug.

Try https://github.com/inzi/rtspcapture/tree/Working/RTSPSnapshotMaker for your target

kimhegg commented 2 years ago

Same problem for me. Have you found a solution that works @lemorlenny ?

SavoInfostream commented 2 years ago

All of my frames are of type Audio, while in VLC the rtsp source shows video as well.