sipsorcery-org / sipsorcery

A WebRTC, SIP and VoIP library for C# and .NET. Designed for real-time communications apps.
https://sipsorcery-org.github.io/sipsorcery
Other
1.42k stars 431 forks source link

Getting distorted image after converting RawImage to System.Drawing.Bitmap #1049

Closed mail2mhossain closed 7 months ago

mail2mhossain commented 7 months ago

We are currently utilizing SipSorcery in conjunction with a Janus server to manage our communications.

When I am converting the RawImage of Publisher's Camera feed (Directly from SIPSorceryMedia.FFmpeg) got from event OnVideoSourceRawSampleFaster to System.Drawing.Bitmap image = new Bitmap(rawImage.Width, rawImage.Height, rawImage.Stride, System.Drawing.Imaging.PixelFormat.Format24bppRgb, rawImage.Sample), converted image is OK.

But when I am converting the RawImage of Subscriber's feed (From Janus Server) got from event OnVideoSinkDecodedSampleFaster to System.Drawing.Bitmap image = new Bitmap(rawImage.Width, rawImage.Height, rawImage.Stride, System.Drawing.Imaging.PixelFormat.Format24bppRgb, rawImage.Sample), converted image is distorted.

Please provide me some clue to solve the issue.

sipsorcery commented 7 months ago

Duplciate of https://github.com/sipsorcery-org/SIPSorceryMedia.FFmpeg/issues/69.