Zohaib Islam
Zohaib Islam

Reputation: 31

android using ffmpeg add custom image as a frame

I'm using FFmpeg for making and editing videos. I've successfully converted array of images to videos. Now i want to add custom images as a frame to whole video. I've searched a lot but couldn't find the exact solution. I've used drawbox tool of FFmpeg but with it we can only make colored frames. I want to add custom image as a frame.

This the frame that i want to add to whole video

X

Upvotes: 0

Views: 1542

Answers (1)

Tulsiram Rathod
Tulsiram Rathod

Reputation: 1946

You are using FFMPEG for Android(Kotlin). So you need to add Frame for your entire video. That can be done by using below command.

val complexCommand = arrayOf("-i", videoPath, "-i", "/sdcard/frame.jpg" , "-filter_complex", "overlay=10:x=600:y=600", destPath)

videoPath = existing video path (video is created using array of images and saved to sdcard)

/sdcard/frame.jpg = path to your frame image

destPath = where you want too save video after frame added.

Let me know if you still facing issue.

Note: You can use same command for Java.

Upvotes: 1

Related Questions