This works great. I have it running with a watchdog so when a connection to the source goes down and the process exits, it restarts it correctly. When I look at "netstat -an" when it's working I see:
tcp 0 0 172.27.0.8:59556 [rtsp source ip]:554 ESTABLISHED
tcp 0 0 172.27.0.8:54874 [rtmp destination ip]:1935 ESTABLISHED
Occasionally all processing will stop when ffmpeg looses its OUTPUT connection to the rtmp server. When I tail the output I see nothing happening and the connection rtmp connection is gone from netstat, yet the process is still running.
The documentation has an rtmp timeout but that's only when ffmpeg is running a listener and taking an rtmp stream as input.
Am I missing something? I'd rather not have the watchdog periodically run netstat to see if the connection is live and then kill the ffmpeg process. That seems like the wrong approach. Shouldn't ffmpeg exit with an error code if the output rtmp connection goes down?