简体   繁体   English

在 android 应用程序中如何在视频中添加图像叠加

[英]In android application how to add an image overlay in a video

My app has a requirement wherein a watermark png need to be added to the videos.我的应用程序有一个要求,其中需要将水印 png 添加到视频中。 Is there any sdk or library that helps with this functionality.是否有任何 sdk 或库可以帮助实现此功能。

If you mean to 'burn' the image into the video itself and save a new copy with he image then you likely want to use something like ffmpeg - there are Android wrappers available and the sone seems to be the most up to date at the time of writing (I have not used this particular one but have used others successfully):如果你的意思是将图像“刻录”到视频本身并用他的图像保存一个新副本那么你可能想要使用像 ffmpeg 这样的东西 - 有 Android 可用的包装器并且那个似乎是当时最新的写作(我没有使用过这个特定的,但成功地使用了其他的):

You can add the image with ffmpeg using a command like this:您可以使用如下命令添加带有 ffmpeg 的图像:

ffmpeg -i inputVideo.mp4 -i yourImage.png -filter_complex "overlay=5:5" -codec:a copy outputVideo.mp4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM