[FFmpeg-user] Trying to grab video of screen on a Thinkpad x130e netbook ...

Albretch Mueller lbrtchx at gmail.com
Thu Aug 29 13:54:23 EEST 2019


 Hi *:

 I can gab a silent video of my netbook's screen just fine (even if a
bit accelerated) using ffmpeg:

_SCREEN_SIZE=$(xrandr | grep '*' | awk '{print $1}')
echo "// __ \$_SCREEN_SIZE: |$_SCREEN_SIZE|"

_VID="screen_grabbing__$(date +%Y%m%d%H%M%S).mp4"

ffmpeg -f x11grab -s $_SCREEN_SIZE -r 25 -i :0.0 "${_VID}"

 but when I have tried grabbing the audio as well I have run into all
kinds of problems and the guidelines I have found such as:

 https://trac.ffmpeg.org/wiki/Capture/Desktop

 https://wiki.ubuntuusers.de/Videograbbing/

 are a bit "too magical" (they suppose things will work if you just do
what they tell you)

 Actually, since I see myself using ffmpeg more often can you point me
to more thourough going howtos.


 I am running:

$ uname -a
Linux niggahme 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2
(2019-05-13) x86_64 GNU/Linux

 on an "old" X130e Thinkpad which has 4 Gb of RAM.

 Nothing is listed under:

 # ls -l /dev/video*
ls: cannot access '/dev/video*': No such file or directory
 #

 As I remember, some time ago I had to do some kernel tinkering in
order to make the screen work fine on Linux:

# lshw -class cpu
  *-cpu
       description: CPU
       product: AMD E-450 APU with Radeon(tm) HD Graphics
       vendor: Advanced Micro Devices [AMD]
       physical id: 2e
       bus info: cpu at 0
       version: AMD E-450 APU with Radeon(tm) HD Graphics
       slot: Socket FT1
       size: 1650MHz
       capacity: 1650MHz
       width: 64 bits
       clock: 100MHz
       capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr
pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse
sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp constant_tsc
rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor ssse3
cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a
misalignsse 3dnowprefetch ibs skinit wdt hw_pstate vmmcall arat npt
lbrv svm_lock nrip_save pausefilter cpufreq
       configuration: cores=2 enabledcores=2 threads=2
#

# lshw -class display
  *-display
       description: VGA compatible controller
       product: Wrestler [Radeon HD 6320]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 1
       bus info: pci at 0000:00:01.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=radeon latency=0
       resources: irq:25 memory:e0000000-efffffff
ioport:3000(size=256) memory:f0300000-f033ffff memory:c0000-dffff
#

 this are the sound cards on the X130e:

# lshw -class sound
  *-multimedia:0
       description: Audio device
       product: Wrestler HDMI Audio
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 1.1
       bus info: pci at 0000:00:01.1
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi bus_master cap_list
       configuration: driver=snd_hda_intel latency=0
       resources: irq:24 memory:f0344000-f0347fff
  *-multimedia:1
       description: Audio device
       product: SBx00 Azalia (Intel HDA)
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 14.2
       bus info: pci at 0000:00:14.2
       version: 40
       width: 64 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list
       configuration: driver=snd_hda_intel latency=64
       resources: irq:16 memory:f0340000-f0343fff
#


$ cat /proc/asound/cards
 0 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xf0344000 irq 24
 1 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xf0340000 irq 16


$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: SB [HDA ATI SB], device 0: CX20590 Analog [CX20590 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


 this is my ffmpeg version:

$ which ffmpeg
/usr/bin/ffmpeg

$ ffmpeg -version
ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1'
--toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
--incdir=/usr/include/x86_64-linux-gnu --enable-gpl
--disable-stripping --enable-avresample --enable-avisynth
--enable-gnutls --enable-ladspa --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128
--enable-libflite --enable-libfontconfig --enable-libfreetype
--enable-libfribidi --enable-libgme --enable-libgsm
--enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt
--enable-libopus --enable-libpulse --enable-librubberband
--enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid
--enable-libzmq --enable-libzvbi --enable-omx --enable-openal
--enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883
--enable-chromaprint --enable-frei0r --enable-libopencv
--enable-libx264 --enable-shared
libavutil      55. 34.101 / 55. 34.101
libavcodec     57. 64.101 / 57. 64.101
libavformat    57. 56.101 / 57. 56.101
libavdevice    57.  1.100 / 57.  1.100
libavfilter     6. 65.100 /  6. 65.100
libavresample   3.  1.  0 /  3.  1.  0
libswscale      4.  2.100 /  4.  2.100
libswresample   2.  3.100 /  2.  3.100
libpostproc    54.  1.100 / 54.  1.100
$

 lbrtchx:ffmpeg-user:Trying to grab video of screen on a Thinkpad
x130e netbook ...


More information about the ffmpeg-user mailing list