Debian 10.4 노트북에서 비디오(스크린샷)를 녹화하려고 합니다.
내가 사용하는 명령은 동일한 하드웨어의 Mint 19.3에서 잘 작동했습니다. 데비안 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}])
내가 데비안에서 사용하는 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
?