Is it possible to pull a RTMP stream from one server and broadcast it to another?

二次信任 提交于 2019-11-30 17:56:46

问题


I essentially have a situation where I need to pull a stream from one Wowza media server and publish it to a Red5 or Flash Media Server instance with FFMPEG. Is there a command to do this? I'm essentially looking for something like this:

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

Is this currently possible from FFMPEG? I remembered reading something like this, but I can't remember how exactly to do it.


回答1:


Yes. An example (pulling from a local server, publishing to a local server):

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

analyzeduration is to make it start faster. You can also add other parameters in there to "reencode" etc. if desired.




回答2:


try typing in this way: $ffmpeg -i "[InputSourceAddress]" -f [Outputfileformat] "[OutputSourceAddress]" The input source address can be in type rtmp, or rtsp/m3u8/etc.



来源:https://stackoverflow.com/questions/7869190/is-it-possible-to-pull-a-rtmp-stream-from-one-server-and-broadcast-it-to-another

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!