Fix rank settings for hardware encoders, fix remuxing support