OpenIPC / smolrtsp

A lightweight real-time streaming library for IP cameras
https://openipc.github.io/smolrtsp/
MIT License
204 stars 44 forks source link

Server in example folder support live streaming of video or .mp4 files? #23

Closed tuananh-lab closed 8 months ago

tuananh-lab commented 8 months ago

Let me ask if the RTSP server in the example folder supports live streaming of videos or .mp4 files or does it require G.711 or H.264 encoded files to be able to play videos. I tried inserting a sample video into the project along with the path declaration but VLC still plays the video that is fixed in this project? Please give me a solution. Thank you.

widgetii commented 8 months ago

Library supports only RTSP protocol, encoding should be handled by hardware or implemented by different software libraries

tuananh-lab commented 8 months ago

Library supports only RTSP protocol, encoding should be handled by hardware or implemented by different software libraries

I want the server input to be video and audio frames from the camera, then the server will process and send it to the client via RTSP and the client can watch the video. I'm a newbie so I don't have much experience. Is this project right? Is this a good start? Can it be improved to meet my needs? Thank you very much.

widgetii commented 8 months ago

If you can write such code by yourself when it suits your needs

hirrolot commented 8 months ago

@tuananh-lab, this library only supports the RTSP protocol (plus some auxiliary ones such as RTP and SDP). RTSP was designed to permit a wide range of multimedia formats, including MP4. The best place to start is the RTSP RFC, and then trying to adopt SmolRTSP to suit your requirements.

tuananh-lab commented 8 months ago

If you can write such code by yourself when it suits your needs

I have successfully run the sample video, I see that this project supports RTSP commands such as: OPTION,DESCRIBE,SETUP,PLAY,TEARDOWN. I want to add the PAUSE option, can it be deployed? in addition to my server.c file Do I need to edit anywhere else?

tuananh-lab commented 7 months ago

If you can write such code by yourself when it suits your needs

I'm trying to add PAUSE function to the server in the example but when I edit the controller.c and controller.h files it always gives me the error SmolRTSP_VTABLE has no pause element but I can't find a VTABLE structure in the project to edit .Give me the solution.