The required syntax is:
where rtmp_proto is one of the strings "rtmp", "rtmpt", "rtmpe", "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and server, port, app and playpath have the same meaning as specified for the RTMP native protocol. options contains a list of space-separated options of the form key=val.
See the librtmp manual page (man 3 librtmp) for more information.
For example, to stream a file in real-time to an RTMP server using ffmpeg:
ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
To play the same stream using ffplay:
ffplay "rtmp://myserver/live/mystream live=1"