是否可以从一台服务器提取RTMP流并将其广播到另一台服务器?

时间:2011-10-23 21:04:32

标签: ffmpeg rtmp

我基本上需要从一个Wowza媒体服务器提取流并使用FFMPEG将其发布到Red5或Flash Media Server实例。有命令这样做吗?我基本上是在找这样的东西:

while [ true ]; do 
    ffmpeg -i rtmp://localhost:2000/vod/streamName.flv rtmp://localhost:1935/live/streamName
done

目前这可能来自FFMPEG吗?我记得读过这样的东西,但我不记得究竟是怎么做的。

2 个答案:

答案 0 :(得分:5)

是。示例(从本地服务器拉出,发布到本地服务器):

 $ ffmpeg -analyzeduration 0 -i "rtmp://localhost/live/b live=1" -f flv rtmp://localhost:1936/live/c

analyzeuration是为了让它更快地开始。如果需要,您还可以在其中添加其他参数以“重新编码”等。

答案 1 :(得分:0)

尝试以这种方式输入: $ffmpeg -i "[InputSourceAddress]" -f [Outputfileformat] "[OutputSourceAddress]" 输入源地址可以是rtmp或rtsp / m3u8 / etc。