I am making an attempt to overlay one video on prime of one other utilizing FFMPEG, in the very same format as FaceTime, however the video would have rounded corners. I’ve tried the instructions on different posts however all of them generate surprising outcomes or errors.
Right here is the command that overlays the movies decently:
-i main_video.mp4 -i small_overlaid_video_in_lower_left_corner.mp4 -filter_complex
"[0:v]scale=iw:ih[main_scaled];
[1:v]scale=iw/2:ih/2:force_original_aspect_ratio=lower,format=yuva420p[reaction_resized];
[main_scaled][reaction_resized]overlay=x=40:y=H-h-40:format=auto[final]"
-map "[final]" -map 1:a? -c:a duplicate -c:v libx264 -crf 18 -preset ultrafast -t -y output.mp4
The issues this has is that the principle movies decision varies from video to video, so generally the overlaid video is tremendous small and generally its too large. Three questions:
- How do I make the overlaid video the identical measurement compared to the principle video each time?
- How can I apply rounded corners on the rectangle?
- How can I modify it to incorporate each video’s audio?