It has always been a tough job to create polished time-lapse Instagram videos. From shooting a video in a portrait or landscape to changing the speed from 1X TO 12X for time-lapse, the default being 6 times the speed, it can get quite complicated.
3 facts about the technology behind Instagram!
Apart from record button and speed slider there are lot more in these 3 features that make the app a beauty
- Video Stabilization
- Time lapse stabilization
- Adaptive zoom
So what’s special about these 3 features!
Video stabilization: The Cinema technology uses your phone’s in-built gyroscope to measure and remove unwanted handshakes so that you get fluid videos. Cinema algorithm uses IGtrackStabilizer to get an all new set of camera orientation which is smooth and free from unwanted handshakes. The gyroscope samples and frame are the two inputs to the stabilizer which gives the camera orientation.
The new set of camera orientation is first fed into the IGtrackStabilization filter which is nothing but a video filtering pipeline. For getting a desired camera orientation, each input frame is changed by the filter. During the video playback the stabilization is applied at a speed of 30fps (frames per second) and the orientations are computed offline.
Time-Lapse stabilization: Once you have recorded a video, you need to drag the slider to choose the time lapse level. If you select a time lapse level of 7x, then every 7th frame is picked in the input video and played back at 30fps.
Due to modifications in Cinema algorithm, such as enforcement of empty region constraint only for the frames selected, the camera motion is smooth even if there are increased handshakes at higher time lapse levels in the un-stabilized input video.
Adaptive zoom: In order to avoid empty region constraints for the output video, we need to crop or zoom in to remove unwanted handshakes. Any video stabilization algorithm offers either an effective resolution or minimum handshake since there is a reduction in the field of view due to zoom in.
The zoom is selected by Cinema based on the level of handshake in the recorded video. Thus the algorithm is such that it minimises the handshake while maximizing the effective resolution based on per video.
What happens when you move the Slider?
- A request is sent to the decoder for the frames at the new playback rate
- The Cinema starts its operation simultaneously in the background and computes a new optical zoom and a new set of orientation for the time lapse amount and the new zoom.
- To output orientations for the frames which are to be displayed, the orientations computed at previous time lapse amounts along with the spherical interpolation are used.
- As soon as the new orientation comes from the stabilizer, it is automatically swap out with the old set of orientations.
No video playback interruption or no stonewalling of UI while the above step runs. All this sums up to give the result of a light and flexible app. A great chance to revamp your creativity with the tap of a button!
Leave a Reply
You must be logged in to post a comment.