Changed a bunch. Main change would be putting vlc and rtmpdump popens in its own thread.