Проблемы с установкой ffmpeg с помощью Homebrew

2290
Pat

Я получаю сообщение об ошибке при попытке конвертировать mp4 в webm:

Encoder (codec vp8) not found for output stream #0:0 

Поиск Google говорит мне, что мне нужно установить libvpx, но я это сделал.

Я установил с homebrew как таковой (с libvpx):

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265 

Так что я озадачен тем, почему я получаю эту ошибку. Вот остальная часть этого:

Logans-MacBook-Pro:desktop loganmccoy$ ffmpeg -i video.mp4 -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 myvideo.webm ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4': Metadata: major_brand : M4V  minor_version : 1 compatible_brands: M4V mp42isom creation_time : 2015-09-21 06:30:12 Duration: 00:00:10.58, start: 0.000000, bitrate: 1264 kb/s Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 1253 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default) Metadata: creation_time : 2015-09-21 06:30:12 handler_name : Mainconcept MP4 Video Media Handler encoder : AVC Coding File 'myvideo.webm' already exists. Overwrite ? [y/N] y Output #0, webm, to 'myvideo.webm': Metadata: major_brand : M4V  minor_version : 1 compatible_brands: M4V mp42isom Stream #0:0(eng): Video: vp8, none, q=2-31, 128 kb/s (default) Metadata: creation_time : 2015-09-21 06:30:12 handler_name : Mainconcept MP4 Video Media Handler Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> ? (?)) Encoder (codec vp8) not found for output stream #0:0 

Любая помощь будет оценена.

1
Является ли `--with-webp` опцией установки, которую вы пропустили? Thom Nichols 8 лет назад 0
Получил такую ​​же проблему David 'mArm' Ansermot 7 лет назад 0

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

2
fifer55

I used the exact same command and was able to get an output, but with vp9:

 user-Mac-Pro:~ user$ /ffmpeg -i /Volumes/media/1080p-PRHQ.mov -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 /Volumes/media/080p-PRHQ_v.webm ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfontconfig --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libssh --enable-libfdk-aac --enable-openssl --enable-libopus --enable-libx265 --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.2_1/include/openjpeg-1.5 ' --enable-nonfree --enable-vda libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/media/1080p-PRHQ.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2015-03-13 21:20:09 Duration: 00:12:14.17, start: 0.000000, bitrate: 146674 kb/s Stream #0:0(eng): Audio: pcm_s24be (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default) Metadata: creation_time : 2015-03-13 21:20:09 handler_name : Apple Alias Data Handler Stream #0:1(eng): Video: prores (apch / 0x68637061), yuv422p10le, 1920x800, 144356 kb/s, 24 fps, 24 tbr, 1k tbn, 1k tbc (default) Metadata: creation_time : 2015-03-13 21:20:09 handler_name : Apple Alias Data Handler encoder : Apple ProRes 422 HQ [libvpx-vp9 @ 0x7fee4780e400] v1.4.0 Output #0, webm, to '/Volumes/media/1080p-PRHQ_v.webm': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt encoder : Lavf56.40.101 Stream #0:0(eng): Video: vp9 (libvpx-vp9), yuv422p, 1920x800, q=-1-25, 200 kb/s, 24 fps, 1k tbn, 24 tbc (default) Metadata: creation_time : 2015-03-13 21:20:09 handler_name : Apple Alias Data Handler encoder : Lavc56.60.100 libvpx-vp9 Stream #0:1(eng): Audio: vorbis (libvorbis), 48000 Hz, stereo, fltp (24 bit) (default) Metadata: creation_time : 2015-03-13 21:20:09 handler_name : Apple Alias Data Handler encoder : Lavc56.60.100 libvorbis Stream mapping: Stream #0:1 -> #0:0 (prores (native) -> vp9 (libvpx-vp9)) Stream #0:0 -> #0:1 (pcm_s24be (native) -> vorbis (libvorbis)) Press [q] to stop, [?] for help frame= 34 fps=2.7 q=0.0 Lsize= 35kB time=00:00:01.48 bitrate= 193.7kbits/s video:6kB audio:23kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 18.441772% Exiting normally, received signal 2. user-Mac-Pro:~ user$ 

Maybe you should delete the current versions of ffmpeg and all its dependencies in /usr/local/Cellar/.

You can manually delete them and then install them again with homebrew.

Then, run each of these commands to help you clean up your Cellar:

  1. brew options ffmpeg (to find what you want to install)
  2. brew install ffmpeg --with-x --with-y --with-z etc.
  3. brew update && brew upgrade (Update formulae and Homebrew itself && Install newer versions of outdated packages)
  4. brew prune (Remove dead symlinks from Homebrew’s prefix)
  5. brew doctor (Check your Homebrew installation for common issues)

homebrew options quoted above from: http://pythonic.zoomquiet.io/data/20111223160257/index.html

Then try the command line again.

I have the exact same version of homebrew as you and I can run the provided command with no issues.

0
Colin D

It was noted that one method here creates VP9 while the OP originally mentioned VP8. In case it is of interest, in my tests, I found some basic flags can enable VP8 or VP9

ffmpeg -i in.mov -c:v libvpx 1.webm #creates VP8 ffmpeg -i in.mov -c:v libvpx-vp9 2.webm #creates VP9 

This is from ffmpeg 3.0.2 installed with brew install ffmpeg --with-libvpx

ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libvpx --enable-vda libavutil 55. 17.103 / 55. 17.103 libavcodec 57. 24.102 / 57. 24.102 libavformat 57. 25.100 / 57. 25.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 31.100 / 6. 31.100 libavresample 3. 0. 0 / 3. 0. 0 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 

Codecs outputted verified with mediainfo (brew install mediainfo)

mediainfo --fullscan 1.webm #shows VP8 mediainfo --fullscan 2.webm #shows VP9