使用 FFmpeg 的 VP9 编码

Com*_*eer 6 video ffmpeg

我想问一下是否ffmpeg支持VP9编码,如果不支持:如何编码VP9视频?我尝试使用以下命令:

./ffmpeg-vp9 -y -i /home/mc/test.mkv -t 00:00:30 -c:v libvpx-vp9 -strict -2 -quality good -b:v 600k -speed 16 -rc_lookahead 25 -pass 1 2.webm
Run Code Online (Sandbox Code Playgroud)

但它显示拆分命令出现错误(for vp9)。这是输出ffmpeg -codecs | grep vpx

 ./ffmpeg -codecs|grep vpx
ffmpeg version N-51352-g81e85bc Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 27 2013 19:22:53 with gcc 4.8.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 22.101 / 52. 22.101
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  0.100 / 55.  0.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 48.105 /  3. 48.105
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
 DEV.L. vp8                  On2 VP8 (decoders: vp8 libvpx ) (encoders: libvpx )
Run Code Online (Sandbox Code Playgroud)

我尝试使用,vpxenc但我不知道其参数的确切含义。

提前致谢。

Neu*_*ula 6

基本ffmpeg支持VP9编解码。看起来您的 libvpx 版本不支持 VP9。对于 VP9 支持,您必须使用实验分支:

$ git clone -b experimental http://git.chromium.org/webm/libvpx.git
$ cd libvpx
$ ./configure --enable-vp9 --enable-shared
$ make && make install
Run Code Online (Sandbox Code Playgroud)

这应该启用 VP9 for ffmpeg,您必须像往常一样使用--enable-libvpx配置选项进行编译。