harlanc / xiu

A simple,high performance and secure live media server in pure Rust (RTMP[cluster]/RTSP/WebRTC[whip/whep]/HTTP-FLV/HLS).🦀
https://www.rustxiu.com
MIT License
1.6k stars 168 forks source link

push with ffmpeg and pull from server #108

Closed NacerFaraj closed 1 month ago

NacerFaraj commented 3 months ago

I need to use ffmpeg to read packets from IP cameras and publish it using a media server. I read packets with RTSP, and have to publish it with RTSP. For example, I want to write packets to rtsp://localhost:8554/[camera-ip], and read it form that point.

Is there any manual to read and understand how to publish to xiu media server? using mediamtx it is very clear and straightforward. I want to examine the performance of xiu as well.

harlanc commented 3 months ago

@NacerFaraj

Using ffmpeg to pull RTSP stream of ip camera and push to other RTSP server(like xiu), you can use the following command:

ffmpeg -i rtsp://camera_ip:port/stream_name -c:v copy -c:a copy  rtsp://xiu_server_ip:port/stream_name

I'm not very familiar with the steps of mediamtx on how to transfer RTSP stream..

NacerFaraj commented 3 months ago

Thank you. The instruction is the same with the one provided in mediamtx.