Hello!
I attempted to grab desktop video+audio using ffmpeg, just like I used to do
long ago (in 2017, since then I updated to fc29, don't remember under what OS
it succeded, maybe fc26).
The problem I'm encountering now: the video is OK, the audio starts OK then, after few minutes
it starts to stutter, then becomes shifted by a VERY LARGE ammount relative to the video then,
I think, it again stutters and shifts more (with different audio encoders it's slightly different)
and finally the the audio ends much earlier than video.
The command I used:
ffmpeg -thread_queue_size 512 -f x11grab -s 1906x1038 -r 25 -i :0.0+14,130 -thread_queue_size 512 -f pulse -ac 2 -i alsa_output.pci-0000_00_14.2.analog-stereo.monitor -acodec pcm_s16le -vcodec libx264 -preset ultrafast sample.avi
and the stuttering started after 9 minutes.
With another audio encoder:
ffmpeg -thread_queue_size 512 -f x11grab -s 1906x1038 -r 25 -i :0.0+14,130 -thread_queue_size 512 -f pulse -ac 2 -i alsa_output.pci-0000_00_14.2.analog-stereo.monitor -acodec ac3 -vcodec libx264 -preset ultrafast sample.avi
the stuttering occured after 5.5 minutes.
With the command:
ffmpeg -f x11grab -s 1906x1038 -r 25 -i :0.0+14,130 -f pulse -ac 2 -i alsa_output.pci-0000_00_14.2.analog-stereo.monitor -acodec libmp3lame -vcodec libx264 -preset ultrafast sample.mkv
the audio stops after 2 minutes.
An attempt to use "-f alsa -i hw:0" instead of "-f pulse" resulted in a "silent movie"
and also, I noticed that the files
/proc/asound/cards
/proc/asound/devices
are empty.
Checking for alsa devices of ffmpeg:
Code:
ffmpeg -devices | grep alsa
DE alsa ALSA audio output
The alsa-related packages:
Code:
<root localhost.localdomain>.../root>rpm -qa | grep alsa
alsa-lib-1.1.8-1.fc29.i686
qemu-audio-alsa-3.0.0-4.fc29.x86_64
alsa-utils-1.1.8-2.fc29.x86_64
alsa-plugins-pulseaudio-1.1.8-1.fc29.x86_64
wine-alsa-4.4-1.fc29.x86_64
alsamixergui-0.9.0-0.27.rc2.fc29.x86_64
alsa-ucm-1.1.8-1.fc29.noarch
alsa-lib-1.1.8-1.fc29.x86_64
wine-alsa-4.4-1.fc29.i686
<root localhost.localdomain>.../root>rpm -ql alsa-lib-1.1.8-1.fc29.i686 | grep libasound
/lib/libasound.so.2
/lib/libasound.so.2.0.0
And I thought that just writng down the command which worked in 2017 would continue to work...
I "googled" and searched LQ for "ffmpeg" but didn't find anything relevant and RECENT - old
solutions might not work now. Does anyone have an idea why in FC29+KDE the audio grab no longer works
the same as it used to?
TIA,
kaza.