SharpRTSP icon indicating copy to clipboard operation
SharpRTSP copied to clipboard

Connection Close with bigger frame size and Unity

Open Omgoor opened this issue 3 years ago • 3 comments

Hey,

my goal is to catch the camera stream from unity and sending the picture to my clients like Vlc or other applications. I managed to run the RtspCameraExample on Unity as Server and VLC as Receiver and now i try to send bigger stuff (for better stream quality). My first try is to increase the framesize (width and height), but it doesnt work well. When i try to connect the vlc with server again, i get a connection close msg. I 'm quite new with this streaming stuff, so I would greatly appreciate any help with this.

Omgoor avatar May 05 '22 20:05 Omgoor

I have same problem,

nguyenthaohut avatar Jun 22 '22 03:06 nguyenthaohut

The H264 encoder in the RtspCameraExample is not designed for real use. It is a really simple H264 encoder used to demonstrate that SharpRTSP can do. What you need do yo is use a proper H264 encoder, either calling the Hardware Accelerated video encoding via Microsoft APIs or licencing and using Libx264.

An alternative would be to implement MJPEG streaming but that requires an additional payload type being added to the source code.

On my own projects I use a different H264 encoding library but that is closed source.

RogerHardiman avatar Jun 22 '22 06:06 RogerHardiman

I try to use openH264 and i can encode image

nguyenthaohut avatar Jun 24 '22 10:06 nguyenthaohut