使用ffmpeg和nginx-rtmp-module重新调用rtmp流

时间:2014-07-11 13:12:01

标签: ffmpeg streaming video-streaming rtmp

这是我当前对localhost的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;
  }

非常感谢您提前。

0 个答案:

没有答案