Setting dynamic watermark in to the video using ffmpeg Android

耗尽温柔 提交于 2019-12-12 02:25:58

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/37678104/setting-dynamic-watermark-in-to-the-video-using-ffmpeg-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!