Various fixes to make video remuxing work