Open EgorBlagodarov opened 8 months ago
Hello Egor, you cannot take a rawh264iframe and write directly in a bitmap. there is an example SimpleRtspPlayer that you can use as reference on how to archive your needs. I think you need the RawFramesDecoding folder.
Hello! I am writing a program to conduct a video broadcast from the camera. I decided to transmit data via RTSP. Requests are sent to the server and responses begin to arrive, after receiving, I translate the Frame into a byte[] array and try to convert it to a bitmap, but it gives an error. Can you tell me how I can make a broadcast?
public static async void RTSPClient(CancellationToken token) { //параметры и запросы var serverUri = new Uri("rtsp://192.168.0.94:554/cam0_0"); var credentials = new NetworkCredential("root", "root"); var connectionParameters = new ConnectionParameters(serverUri, credentials); connectionParameters.RtpTransport = RtpTransportProtocol.TCP;
RtspClient rtspCl1 = new RtspClient(connectionParameters); try { await rtspCl1.ConnectAsync(token);
};
await rtspCl1.ReceiveAsync(token);
} catch (SocketException ex) { Console.WriteLine("Подключение не установлено"); Console.WriteLine("Код ошибки:"); Console.WriteLine(ex.Message);
} }