split rm muxer and demuxer in their own files