format the code
only keep the rtmp.py to keep the core simple