Show all sound card in my pc.
pacmd list-sources |grep name:
name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
name: <alsa_input.pci-0000_00_1b.0.analog-stereo>
Now to capture audio playing via alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
.
ffmpeg -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \
/tmp/out.mkv
I encounter error info:
Queue input is backward in time
Last message repeated 3 times
[matroska @ 0x562e991d5e00] Non-monotonous DTS in output stream 0:0; previous: 4550, current: 4507; changing to 4550. This may result in incorrect timestamps in the output file.
How to fix it?
Add
-use_wallclock_as_timestamps 1
input option:Note that you will likely get Vorbis audio by default for Matroska output. You can add
-c copy
if you just want to mux the input PCM audio into.mkv
(or.mka
).