How to restream an udp live stream using nginx rtm

2019-08-15 04:26发布

问题:

I need to restream a live stream which is in UDP protocol using nginx RTMP module. So the final stream will be in RTMP protocol. I have tried the command below in the configuration file of nginx(inside the RTMP server)

exec_pull ffmpeg -re -i udp://ipaddress:portnumber -f flv rtmp://localhost/$appname/$streamname;

When I am writing the rtmp stream link in VLC I am not able to get any display. Can anyone help me?