ffmpeg rtp over http
时间: 2023-10-01 20:04:56 浏览: 38
It is not possible to stream RTP over HTTP using only FFmpeg, as HTTP is a different protocol than RTP and requires a different approach to streaming. However, you can use a protocol like RTSP (Real Time Streaming Protocol) which uses RTP as its transport protocol and can be streamed over HTTP.
To stream RTP over RTSP using FFmpeg, you can use the following command:
```
ffmpeg -re -i input_file -c:v copy -c:a copy -f rtsp rtsp://localhost:8554/stream.sdp
```
This will stream the input file over RTSP using the SDP (Session Description Protocol) format. You can then access the stream using a RTSP client, such as VLC, by opening the URL `rtsp://localhost:8554/stream.sdp`.
To stream RTSP over HTTP, you can use a streaming server like Wowza, which supports RTSP-to-HTTP streaming. You can then use FFmpeg to stream RTP over RTSP to Wowza, which will handle the RTSP-to-HTTP conversion.
```
ffmpeg -re -i input_file -c:v copy -c:a copy -f rtsp rtsp://localhost:8554/stream.sdp
```
Then, configure Wowza to accept incoming RTSP streams and convert them to HTTP streams. You can then access the stream using a standard HTTP URL, such as `http://localhost:1935/live/stream/playlist.m3u8`.