[FFmpeg-user] Unable to capture audio and video synced

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue May 23 23:16:08 EEST 2017


2017-05-23 19:11 GMT+02:00 Leonardo Soares Müller <leozinho29_eu at hotmail.com>:
> To record speakers and microphone, I use pulse.

(If there really is an issue, it is unclear for me from your report:)
Please also test alsa if possible.

> The command I used to record was:
>
> env PULSE_LATENCY_MSEC=20 ffmpeg -vaapi_device /dev/dri/renderD128
> -hwaccel vaapi -hwaccel_output_format yuv420p -thread_queue_size 16384
> -f pulse -sample_rate 44100 -channels 2 -i
> alsa_output.pci-0000_00_1f.3.analog-stereo.monitor -thread_queue_size

> 16384 -f x11grab -s 1366x768 -r 30 -i :0.0 -acodec libfdk_aac -b:a 160k

Remove -r 30, the correct option is "framerate" iirc.

> -vf format=nv12,hwupload,scale_vaapi=w=960:h=540 -vcodec h264_vaapi
> -qp 20 -f flv -shortest TEST001.flv

[...]

> After I have recorded it, I have separated the video and audio from the
> resulting file in two files

Do you mean you did not test A/V sync on the file that was recorded
with FFmpeg?
You (generally) cannot "separate" a media file and expect A/V sync
to be preserved, for screen recording, a (very large) length difference
between audio and video is expected.

Carl Eugen


More information about the ffmpeg-user mailing list