How does Instagram crop video in android app?

前端 未结 3 1015
忘了有多久
忘了有多久 2021-01-21 15:20

I am trying to record the video in 1:1 ratio (square) and i cant get it to work, if i set custom resolution in media recorder instance i get an error on media recorder start.

3条回答
  •  青春惊慌失措
    2021-01-21 15:54

    1. You can take a look at https://github.com/boxme/SquareCamera. It's used to crop a image, but the idea can be used to crop a video. The main idea is to add a black cover top and bottom(or left and right)to make it seemed like a square.
    2. FFmpeg can be used, of course, though it is a little complicated.

提交回复
热议问题