Added 2d video support and minor fixed