I am trying to merge a video from my camera with a video via URL and show them [pip]. It shows great but the sound is out of sync. my code is
ffmpeg -i input1.mp4 -i urlInput.mp4 -filter_complex "[1]crop=450:230:80:215,scale=iw/1.5:ih/1.5 [pip]; [0][pip] overlay=main_w-overlay_w-10:main_h-overlay_h-300; [1]volume=0.2[vol1]; [0][vol1]amix" -shortest output.mp4
there is nearly a one second delay between url-input(video and audio shows first) and the first input. How can i get them to be synced?