ffmpeg сильно крутится после остановки записи

284
aki

Запишите с помощью ffmpeg так:

ffmpeg -f alsa -i pulse out.flac 

и остановись с qключом. ffmpeg выводит как

video:0kB audio:142kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.694811%

и крутится сильно. ffmpeg съедает все ядро ​​процессора и не заканчивает работу, даже если проходит час. Тогда out.flacэто завершено. Пробрема нет, даже если убить ffmpeg с помощью ctrl + C и ctrl + C.

Но я надеюсь закончить ffmpeg аккуратно ...

войти с -reportопцией.

ffmpeg started on 2018-07-07 at 02:08:40 Report written to "ffmpeg-20180707-020840.log" Command line: ffmpeg -f alsa -i pulse -report test.flac ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 8.1.1 (GCC) 20180531 configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvenc --enable-omx --enable-shared --enable-version3 libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 libpostproc 55. 1.100 / 55. 1.100 Splitting the commandline. Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'. Reading option '-i' ... matched as input url with argument 'pulse'. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Reading option 'test.flac' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option report (generate a report) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url pulse. Applying option f (force format) with argument alsa. Successfully parsed a group of options. Opening an input file: pulse. [alsa @ 0x561ac3092e00] All info found Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, alsa, from 'pulse': Duration: N/A, start: 1530896920.152895, bitrate: 1536 kb/s Stream #0:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Successfully opened the file. Parsing a group of options: output url test.flac. Successfully parsed a group of options. Opening an output file: test.flac. [file @ 0x561ac30d1a40] Setting default whitelist 'file,crypto' Successfully opened the file. Stream mapping: Stream #0:0 -> #0:0 (pcm_s16le (native) -> flac (native)) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) detected 40 logical cores [graph_0_in_0_0 @ 0x561ac30d8b00] Setting 'time_base' to value '1/48000' [graph_0_in_0_0 @ 0x561ac30d8b00] Setting 'sample_rate' to value '48000' [graph_0_in_0_0 @ 0x561ac30d8b00] Setting 'sample_fmt' to value 's16' [graph_0_in_0_0 @ 0x561ac30d8b00] Setting 'channel_layout' to value '0x3' [graph_0_in_0_0 @ 0x561ac30d8b00] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3 [format_out_0_0 @ 0x561ac30d9640] Setting 'sample_fmts' to value 's16|s32' [AVFilterGraph @ 0x561ac30d3c40] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed [flac @ 0x561ac30cfd00] compression: 5 [flac @ 0x561ac30cfd00] lpc type: Levinson-Durbin recursion with Welch window [flac @ 0x561ac30cfd00] prediction order: 1, 8 [flac @ 0x561ac30cfd00] order method: estimate [flac @ 0x561ac30cfd00] partition order: 0, 8 [flac @ 0x561ac30cfd00] block size: 4608 [flac @ 0x561ac30cfd00] lpc precision: 15 Output #0, flac, to 'test.flac': Metadata: encoder : Lavf58.12.100 Stream #0:0, 0, 1/48000: Audio: flac, 48000 Hz, stereo, s16, 128 kb/s Metadata: encoder : Lavc58.18.100 flac cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) size= 8kB time=00:00:01.64 bitrate= 41.3kbits/s speed=3.24x
size= 8kB time=00:00:02.13 bitrate= 32.2kbits/s speed= 2.1x
size= 8kB time=00:00:02.70 bitrate= 25.6kbits/s speed=1.78x
size= 9kB time=00:00:03.18 bitrate= 21.9kbits/s speed=1.57x
size= 9kB time=00:00:03.67 bitrate= 19.2kbits/s speed=1.45x
size= 9kB time=00:00:04.24 bitrate= 16.8kbits/s speed= 1.4x
size= 9kB time=00:00:04.72 bitrate= 15.2kbits/s speed=1.33x
size= 9kB time=00:00:05.20 bitrate= 13.9kbits/s speed=1.28x
size= 9kB time=00:00:05.68 bitrate= 12.8kbits/s speed=1.24x
size= 9kB time=00:00:06.26 bitrate= 11.8kbits/s speed=1.23x
size= 9kB time=00:00:06.35 bitrate= 11.6kbits/s speed=1.23x
video:0kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 896.969727% Input file #0 (pulse): Input stream #0:0 (audio): 2398 packets read (1222532 bytes); 2398 frames decoded (305633 samples); Total: 2398 packets (1222532 bytes) demuxed Output file #0 (test.flac): Output stream #0:0 (audio): 66 frames encoded (304128 samples); 67 packets muxed (924 bytes); Total: 67 packets (924 bytes) muxed 2398 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x561ac30d1ac0] Statistics: 0 seeks, 1 writeouts

0
Q неясно. Добавьте `-report` и выполните команду. Поделитесь отчетом. Gyan 5 лет назад 0
Не вижу проблемы. Gyan 5 лет назад 0
Пожалуйста, смотрите https://youtu.be/Qth7rKXPzAs с подпунктом. aki 5 лет назад 0

0 ответов на вопрос

Похожие вопросы