Is it possible to pull a RTMP stream from one serv

2019-02-18 19:29发布

问题:

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.



标签: ffmpeg rtmp