rtmpproto: read metadata to set correct FLV header