Backported SM5's support for more video formats