ffmpeg不生成调色板

时间:2018-12-01 22:24:23

标签: ffmpeg

我下载了ffmpeg并运行了documentation中的命令以生成调色板:

ffmpeg -i input.mkv -vf palettegen palette.png

唯一的区别是我的输入是input.mp4而不是input.mkv

未生成任何文件。这是PowerShell的控制台输出:

ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers  
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom
    creation_time   : 2018-11-23T23:27:38.000000Z
  Duration: 00:00:09.98, start: 0.000000, bitrate: 2784 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 580x328 [SAR 1:1 DAR 145:82], 2699 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2018-11-23T23:27:38.000000Z
      handler_name    : VideoHandler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 79 kb/s (default)
    Metadata:
      creation_time   : 2018-11-23T23:27:38.000000Z
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
Output #0, image2, to 'palette.png':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom
    encoder         : Lavf57.83.100
    Stream #0:0(und): Video: png, rgba, 16x16 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)
    Metadata:
      creation_time   : 2018-11-23T23:27:38.000000Z
      handler_name    : VideoHandler
      encoder         : Lavc57.107.100 png
[Parsed_palettegen_0 @ 00000296510def00] 255(+1) colors generated out of 285516 colors; ratio=0.000893
[Parsed_palettegen_0 @ 00000296510def00] Dupped color: FF000001

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

所以我发现我安装了两个版本的ffmpeg,而Path里面的第一个版本已经过时了。因此,我删除了较旧的版本,效果很好。