I am trying to record my screen along with the audio using ffmpeg 4.3. But in the final output, my audio is around 500ms to 1sec behind the video. Why is this happening? How this can be fixed? Here is the command I am using on Windows 10 machine:
ffmpeg.exe -threads 4 -rtbufsize 1024m -f dshow -i audio="Microphone (Realtek Audio)" -f gdigrab -offset_x 0 -offset_y 0 -video_size 1920x1080 -framerate 30 -probesize 32 -i desktop -pix_fmt yuv420p -c:v libx264 -crf 28 -preset ultrafast -tune zerolatency -movflags +faststart test.mp4
how have you calculate the shift between the 2 media ?
ffmpeg -i "sample.mp4" -itsoffset 13.84 -i "sample.mp4" \
       -map 1:v -map 0:a -c copy "movie-video-delayed.mp4"
-itoffset is the delay
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With