带有frei0r库的ffmpeg在os x 10.14.6上失败

问题描述 投票:0回答:1

我在Mac OS X 10.14.6(Mojave)上,使用自制软件安装ffmpeg和frei0r。如果您检查以下输出,则选项--enable-frei0r存在。

我验证了frei0r库的路径,并像这样调用ffmpeg:

FREI0R_PATH=/usr/local/Cellar/frei0r/1.6.1/lib/frei0r-1/ ffmpeg -v debug -i running.mkv -filter:v frei0r=pixeliz0r=0.02:0.02 pixel.mkv

但是它失败的方式与我没有通过env var FREI0R_PATH的方式完全相同:

FREI0R_PATH=/usr/local/Cellar/frei0r/1.6.1/lib/frei0r-1/ ffmpeg -y -v debug -i running.mkv -filter:v frei0r=pixeliz0r=0.02:0.02 pixel.mkv
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.8)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input url with argument 'running.mkv'.
Reading option '-filter:v' ... matched as option 'filter' (set stream filtergraph) with argument 'frei0r=pixeliz0r=0.02:0.02'.
Reading option 'pixel.mkv' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url running.mkv.
Successfully parsed a group of options.
Opening an input file: running.mkv.
[NULL @ 0x7f894e002000] Opening 'running.mkv' for reading
[file @ 0x7f894ce20f40] Setting default whitelist 'file,crypto'
[matroska,webm @ 0x7f894e002000] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
[matroska,webm @ 0x7f894e002000] Before avformat_find_stream_info() pos: 1021 bytes read:32768 seeks:0 nb_streams:2
[h264 @ 0x7f894e003400] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f894e003400] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f894e003400] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f894e003400] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f894e003400] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x7f894e003400] Format yuv420p chosen by get_format().
[h264 @ 0x7f894e003400] Reinit context to 1280x720, pix_fmt: yuv420p
[h264 @ 0x7f894e003400] no picture
[matroska,webm @ 0x7f894e002000] All info found
[matroska,webm @ 0x7f894e002000] After avformat_find_stream_info() pos: 26157 bytes read:32768 seeks:0 frames:5
Input #0, matroska,webm, from 'running.mkv':
  Metadata:
    MINOR_VERSION   : 0
    COMPATIBLE_BRANDS: iso6avc1mp41
    MAJOR_BRAND     : dash
    ENCODER         : Lavf58.29.100
  Duration: 00:00:46.22, start: -0.013000, bitrate: 2189 kb/s
    Stream #0:0, 3, 1/1000: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1280x720 [SAR 1:1 DAR 16:9], 0/1, 60 fps, 60 tbr, 1k tbn, 120 tbc (default)
    Metadata:
      HANDLER_NAME    : ISO Media file produced by Google Inc.
      DURATION        : 00:00:46.216000000
    Stream #0:1(eng), 2, 1/1000: Audio: opus, 48000 Hz, stereo, fltp, delay 312 (default)
    Metadata:
      DURATION        : 00:00:46.194000000
Successfully opened the file.
Parsing a group of options: output url pixel.mkv.
Applying option filter:v (set stream filtergraph) with argument frei0r=pixeliz0r=0.02:0.02.
Successfully parsed a group of options.
Opening an output file: pixel.mkv.
[file @ 0x7f894ce22840] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 4 logical cores
[h264 @ 0x7f894d006a00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f894d006a00] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (opus (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[opus @ 0x7f894d020000] skip 312/960 samples
[h264 @ 0x7f894d006a00] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x7f894d006a00] Format yuv420p chosen by get_format().
[h264 @ 0x7f894d006a00] Reinit context to 1280x720, pix_fmt: yuv420p
[graph_1_in_0_1 @ 0x7f894ce3f740] Setting 'time_base' to value '1/48000'
[graph_1_in_0_1 @ 0x7f894ce3f740] Setting 'sample_rate' to value '48000'
[h264 @ 0x7f894d006a00] no picture
[graph_1_in_0_1 @ 0x7f894ce3f740] Setting 'sample_fmt' to value 'fltp'
[graph_1_in_0_1 @ 0x7f894ce3f740] Setting 'channel_layout' to value '0x3'
[graph_1_in_0_1 @ 0x7f894ce3f740] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[format_out_0_1 @ 0x7f894ce3fdc0] Setting 'sample_fmts' to value 'fltp'
[AVFilterGraph @ 0x7f894cc07180] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 2 times
[h264 @ 0x7f894d007000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f894e030800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f894e030e00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[h264 @ 0x7f894e017c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f894d006a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
[Parsed_frei0r_0 @ 0x7f894ce4fe40] Setting 'pixeliz0r' to value '0.02'
[Parsed_frei0r_0 @ 0x7f894ce4fe40] Option 'pixeliz0r' not found
[AVFilterGraph @ 0x7f894cc08340] Error initializing filter 'frei0r' with args 'pixeliz0r=0.02:0.02'
Error reinitializing filters!
Failed to inject frame into filter network: Option not found
Error while processing the decoded data for stream #0:0
[AVIOContext @ 0x7f894cc06400] Statistics: 0 seeks, 0 writeouts
[libvorbis @ 0x7f894d800c00] 44 frames left in the queue on closing
[AVIOContext @ 0x7f894ce21080] Statistics: 65536 bytes read, 0 seeks
Conversion failed!
ffmpeg homebrew macos-mojave
1个回答
0
投票

frei0r过滤的语法是

frei0r=filter_name:filter_param1|filter_param2|filter_param3

所以,

-filter:v "frei0r=pixeliz0r:'0.02|0.02'"
© www.soinside.com 2019 - 2024. All rights reserved.