-1

Can someone please guide me How I could display one video file inside of another (Picture in picture), I have both the videos in .webm format.

Any pointers/ guidance is greatly appreciated.

kurrodu
  • 2,108
  • 4
  • 32
  • 49

1 Answers1

3

Example using ffmpeg command-line tool using scale, overlay, and amerge filters:

enter image description here

ffmpeg -i main.webm -i pip.webm -filter_complex "[1]scale=iw/3:-1[pip];[0][pip]overlay=W-w-10:10:shortest=1[v];[0:a][1:a]amerge[a]" -map "[v]" -map "[a]" -ac 2 -movflags +faststart output.mp4

Example assumes both inputs are the same size and you want to mix audio from both inputs.

llogan
  • 121,796
  • 28
  • 232
  • 243