简体   繁体   English

使用ffmpeg Android在视频中设置动态水印

[英]Setting dynamic watermark in to the video using ffmpeg Android

I am using this command to overlay the image into the video. 我正在使用此命令将图像叠加到视频中。

ffmpeg",i", inputVideoPath,"-i", imageToOverlay,"
-filter_complex",overlay=10:10","-strict", "-2","-b:a" ,"32k",
"-r","15","-preset", "ultrafast",outputVideoPath

Can we set the dynamic values into the "overlay=x:y" also "imageToOverlay" which is image path? 我们可以将动态值设置为图像路径的“ overlay = x:y”还是“ imageToOverlay”吗?

try this command 试试这个命令

 //  test with watermark.png 128x128, add it to /sdcard/videokit/
String[] complexCommand = {"ffmpeg","-y" ,"-i", "/sdcard/videokit/in.mp4","-strict","experimental", "-vf", "movie=/sdcard/videokit/watermark.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:10 [out]","-s", "320x240","-r", "30", "-b", "15496k", "-vcodec", "mpeg4","-ab", "48000", "-ac", "2", "-ar", "22050", "/sdcard/videokit/out.mp4"};

for more information check this link 有关更多信息,请检查链接

check this link as well 还要检查链接

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

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