使用ffmpeg和nginx rtmp模块对rtmp流进行重分组

使用ffmpeg和nginx rtmp模块对rtmp流进行重分组,ffmpeg,streaming,video-streaming,rtmp,Ffmpeg,Streaming,Video Streaming,Rtmp,这是我当前的本地主机rtmp配置,一切都很好 # Transcoding (ffmpeg needed) application big { live on; exec /usr/local/bin/ffmpeg -re -i rtmp://localhost:1935/$app/$name -vcodec flv -acodec copy -f flv rtmp://localhost:1935/anotherapp/${name}; } appl

这是我当前的本地主机rtmp配置,一切都很好

  # Transcoding (ffmpeg needed)

   application big {

       live on;

   exec /usr/local/bin/ffmpeg -re -i rtmp://localhost:1935/$app/$name -vcodec flv -acodec copy -f flv rtmp://localhost:1935/anotherapp/${name};

   }

application anotherapp {
       live on;
  }
这就是我想要实现的

  # Transcoding (ffmpeg needed)

   application big {

       live on;

   # rtmp://localhost:1935/$app/$name  -> Receive this address dynamically from outside, for example the address will be rtmp://142.204.134.93/red5app/12345
   # rtmp://localhost:1935/anotherapp/${name};  -> and create new stream on my server with the same name. 
   # So this will be the result:

   exec /usr/local/bin/ffmpeg -re -i  rtmp://142.204.134.93/red5app/12345 -vcodec flv -acodec copy -f flv rtmp://localhost:1935/anotherapp/12345;

   }

application anotherapp {
       live on;
  }

事先非常感谢

请指定从一个应用程序复制到另一个应用程序的最终目标。为了实现同样的目标,可能会有不同的解决方案。