Modifying file according to the i-frame size