FFmpeg Desktop Recordings: Solving Video Sync/Frame Drop Problems

preview_player
Показать описание
If the audio and video of your desktop recordings are falling out of sync and you're already using the "asyncts" filter to keep your audio in line, video frame drops may be to blame instead. This presentation covers diagnosing and resolving such problems, along with tips and examples featuring Tribes 2, my all-time favorite FPS.

NB: This video is ~54 minutes long. If you find it too daunting for your attention span, take breaks, then come back and finish watching so nothing of importance is missed. I ain't as concise as I could be, but I try to be thorough. ;-)

Tribes 2 info:
Original copyright (C) 2000, Sierra On-Line, Inc. (currently SIERRA, a division of Activision Publishing, Inc.)

Half-Life 2: Lost Coast and Steam are (C) Valve Corporation

If you're interested in Linux-compatible USB 3.0 HD video capture units, check the following:

Sample FFmpeg Desktop Recording Script used to Create this Video:
------
FFREPORT=file=/media/Storage/Videos/DesktopRecordings/[FILENAME].log:level=32 \
ffmpeg \
-thread_queue_size 64 -f x11grab -draw_mouse 0 -r 60 -video_size 1920x1080 -i :0 \
-filter_complex "[0]asyncts[m],[1]asyncts[d],[m][d]amix" \
-c:v libx264 -preset superfast -crf 18 -pix_fmt yuv420p \
-c:a libmp3lame -ac 2 -ar 44100 -b:a 320k \
/media/Storage/Videos/DesktopRecordings/[FILENAME].mkv
------
Рекомендации по теме
Комментарии
Автор

Still, years later, this has merit and has helped me to ensure sync in audio and video when screen recording.
Thank you!

markizano
Автор

hi i am suffering form uac popups you know in window . When pop up comes ffmpeg stop recording is there any solution that pop up comes but recording not stop ?

Amodarling
Автор

I just watched this video and the one on asyncts. Excellent information.
I am still struggling with one thing: I'm trying to do x11grab with pause and resume. I'm trying to do pause by sending SIGSTOP to the ffmpeg process and SIGCONT to resume. This scheme works fine as far as pausing and resuming video recording is concerned. However, there are 2 major problems:
1. the audio seems to continue to be recorded after SIGSTOP
2. the video 'slows' down after SIGCONT. It's as if it's trying to fill out the gap during the pause. Needless to say the audio and video are, at this point completely out of sync

Anyway, this is years after your videos. If you can help out that would be grand. Thanks from Canada.

ottbee
Автор

Informative...Enjoyed It...Great Job Thnx!

johnnyguitar
Автор

That was great!! Subscribe, subscribe, subscribe!!!!

DigisDen