1

I'd like to use a Teradek Cube connected to a broadcast camera to push to a server running ffmpeg with an open RTMP port, and have ffmpeg re-stream that feed to a decoder using RTMP or RTSP.

Monaserver does this, but I need to duplicate this functionality using ffmpeg. I would use the Cube as a server, except it could be broadcasting anywhere so opening ports at every location the camera goes to is not an option. Our decoder is a Teradek Slice. Any other suggestions about how to do this would be greatly appreciated.

Thank you!

4

You can use FFmpeg as an RTMP server as following ffmpeg -f flv -listen 1 -i rtmp://localhost:1935/live/app -c copy rtsp://YOUR_RTSP_HOST

Notes:

  • -listen 1 makes FFmpeg act as a RTMP server when used with RTMP protocol
  • Use rtmp://localhost:1935/live/app as the RTMP server url on the source
  • You can set any playpath rtmp://localhost:1935/any/thing and any port
  • The main advantage with this way is simplicity, the disadvantage is server stops if source stopped or had encoding errors
  • The other option is to use nginx with nginx-rtmp-module
  • Perfect, thanks a ton. If I'd like to use an application such as VLC to receive the stream from the server, can ffmpeg listen for a connection and output to local port 1935 as well? – Pandazoic Mar 18 at 0:15
  • Yes, ffmpeg -f flv -listen 1 -i rtmp://localhost:8889/live/app -c copy -f flv -listen 1 rtmp://localhost:1935/live/app, just set different ports for input and output – Marware Mar 18 at 13:05
  • Thanks again, this is exactly what I need. While testing it I've tried just about every combination of /live/app on the Teradek Cube and various iOS RTMP streaming video apps to test this, and ffmpeg is unresponsive while monaserver works. Is 'app' the key, and does live have to be included in the client's url? – Pandazoic Mar 18 at 18:43
  • Would elaborate how you set the RTMP urls in Cube, iOS apps and Monaserver? do you open required ports? You can set any playpath /any/thing – Marware Mar 18 at 19:46
  • Also FFmpeg Input server starts when it receives stream, and the output starts when it receives a request – Marware Mar 18 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.