'How to broadcast a live stream via FFMPEG?

I'm very new to ffmpeg. Consider http://example.com/live is a remote stream source. I want to get the stream from that source and then broadcast it as MPEG-TS, HLS and RTMP to my users. I know ffmpeg can send data to a rtmp/udp/tcp server. But the whole process is ambiguous to me.

Long story short, how can I get the stream from remote source and then broadcast it as MPEG-TS, HLS and RTMP?

Thanks.



Solution 1:[1]

You could use a media server to covert protocols and serve players, please read this post, to which push by ffmpeg:

ffmpeg -i http://xxx -c copy -f flv rtmp://server/live/xxx

Note that RTMP does not work for H5 player, HTTP-FLV or WebRTC is a optional for low latency live streaming, or HLS/DASH for normal latency, please read this post.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Winlin