I've done it and extracted RTMP from erlyvideo. You may take a look at an example rtmp client, made with erlang-rtmp: http://github.com/erlyvideo/erlang-rtmp/blob/master/contrib/rtmp_bench