Fixed final pts, dts, duration, and frame rate issue for video encoding.