Android square video recording and concat

Is there a way to record square (640x640) videos and concatenate them in Android? I looked on the internet and found some solutions. The solution is similar to "ffmpeg". However, to use ffmpeg, I need to dive into the NDK and build ffmpeg from its sources. Is there a solution only using the Android SDK?

My basic needs:

  • Record multiple videos (square format)
  • Resize captured videos (i.e., from 480x480 to 640x640).
  • Katkat captured videos
  • Rotate the final video (90 clockwise)
  • The final output will be in mp4 or mpg format
+6
source share
1 answer

Is there a solution only using the Android SDK?

Not really.

Your main feature is MediaRecorder video recording and it does not support anything on the list. For example, for any Android device, there is no need to support square videos.

You can also use camera previews to assemble your own videos from individual frames. Guilt does it, AFAIK. There you could use existing Bitmap tools to handle cropping, resizing, and rotation. However, it will be slow, and doing this work in a way that can keep up with a reasonable frame rate will be difficult. In addition, I do not know if there is a library that can stitch these frames together in a video or use any sound (camera previews are clear images).

+3
source

Source: https://habr.com/ru/post/983006/


All Articles