ffmpegが一度動作したコマンドに応答しません。

ffmpegが一度動作したコマンドに応答しません。

Debian 10.4ノートブックでビデオ(スクリーンショット)を録画しようとしています。

私が使用するコマンドは、同じハードウェアのMint 19.3でうまく機能しました。 Debian 10.4 の ffmpeg バージョンが最新であると思います。

コマンドは次のとおりです。

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

出力は次のとおりです

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%

そこにかかっています。 ffmpeg プロセスのトレースは次のようになります。

[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}])

私がDebianで使用しているffmpegのバージョンは4.1.6-1〜deb10u1です。

crfとプリセットを削除し、512に-thread_queue_sizeを追加してみました。また、-r 16と-r 32を試しました。これらのいくつかは警告を削除するのに役立ちますが、中断を削除するものではありません。

以前に動作していたコマンドを再び動作させる方法を知っている人はいますか?

ありがとうございます!

答え1

この部分が正しいかどうかはよくわかりません。-f alsa -ac 2 -i pulse

その逆はどうですか-f pulse -ac 2 -i default

関連情報