Is there a way to put an image on each video frame? I was thinking about it and I found one way, extract each frame to bitmap, merge 2 images (video frame and specified image) and save all frames as a video. Is it the only way?
Asked
Active
Viewed 2,290 times
0
-
You can create frames from xml, but it is useless if you have more than 30 frames on a device running sdk version higher than 2.2 it will crash. – meh Nov 02 '12 at 15:45
-
Are you looking to do something like overlaying an image over a video frame, or are you building a video out of images? – Joe Plante Nov 02 '12 at 15:52
-
Yes, I want to overlay an image over a video – aptyp Nov 02 '12 at 19:13
1 Answers
1
You can use ffmpeg library and run something like this:
ffmpeg -i input.mp4 -i logo.png -filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -codec:a copy output.mp4
https://github.com/WritingMinds/ffmpeg-android-java is a good way for adding ffmpeg to your android project. Check this question for more info on the ffmpeg comand.
Community
- 1
- 1
Leonardo Max Almeida
- 56
- 3