Why does the inset freeze on its last frame?
When the inset ends before the main video, overlay repeats its last frame until the main video ends. That is the default, eof_action=repeat:
ffmpeg -i main.mp4 -i inset.mp4 -filter_complex "[1:v]scale=320:-2[pip];[0:v][pip]overlay=W-w-24:H-h-24[v]" -map "[v]" -map 0:a -c:v libx264 -crf 20 -c:a copy out.mp4From 0:10 to 0:20 the corner shows the inset's last frame, 0:09.958, in every frame checked. The main video keeps playing behind it.
Add eof_action=pass to drop the inset when it ends, as the commands at the top do. To end the whole video with the inset instead, use shortest=1 in overlay and -shortest for the copied audio. That gave a 10.0 s file.




