0

I'm attempting to record video (a screen capture) on a Debian 10.4 laptop.

I'm using a command that used to work fine on Mint 19.3, on the same hardware. I'm guessing the version of ffmpeg is newer on Debian 10.4.

The command is:

ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 10 -s 1366x768 -i :0.0 -qmin 1 -qmax 1 -vcodec flv -pix_fmt yuv420p -preset ultrafast -crf 0 -threads 0 -y screen-movie.temp.flv

And the output is:

ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'pulse':
  Duration: N/A, start: 1597616399.164690, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[x11grab @ 0x55f7452a4380] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #1, x11grab, from ':0.0':
  Duration: N/A, start: 1597616399.267230, bitrate: N/A
    Stream #1:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1366x768, 10 fps, 1000k tbr, 1000k tbn, 1000k tbc
Codec AVOption preset (Configuration preset) specified for output file #0 (screen-movie.temp.flv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Codec AVOption crf (Select the quality for constant quality mode) specified for output file #0 (screen-movie.temp.flv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo (native) -> flv1 (flv))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[swscaler @ 0x55f7452beec0] Warning: data is not aligned! This can lead to a speed loss
[alsa @ 0x55f74527da40] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
Output #0, flv, to 'screen-movie.temp.flv':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p(progressive), 1366x768, q=1-1, 200 kb/s, 10 fps, 1k tbn, 10 tbc
    Metadata:
      encoder         : Lavc58.35.100 flv
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 48000 Hz, stereo, s16p
    Metadata:
      encoder         : Lavc58.35.100 libmp3lame
frame=   69 fps= 10 q=31.0 Lsize=    2867kB time=00:00:06.88 bitrate=3409.7kbits/s speed=1.01x    
video:2753kB audio:108kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.205926%

There it hangs. strace of that ffmpeg process shows:

[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 26482] getpid()                    = 26482
[pid 26482] poll([{fd=3, events=POLLIN|POLLERR|POLLNVAL}], 1, -1^C) = 1 ([{fd=3, revents=POLLIN}])

The version of ffmpeg I'm using on Debian is: 4.1.6-1~deb10u1 .

I tried removing the crf and preset, and I've also tried adding a -thread_queue_size of 512. Further, I tried -r 16 and -r 32. Some of these helped with eliminating warnings, but none of them eliminated the hang.

Does anyone know how to get this previously-working command working again?

Thanks!

2
  • 1
    I'm not sure this part is correct: -f alsa -ac 2 -i pulse - what about just -f pulse -ac 2 -i default ? Commented Aug 16, 2020 at 22:48
  • Thanks Artem. That's working. Make it an answer, and I'll accept it. Commented Aug 16, 2020 at 23:03

1 Answer 1

2

I'm not sure this part is correct: -f alsa -ac 2 -i pulse

what about just -f pulse -ac 2 -i default instead?

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.