Open frozenpandaman opened 4 years ago
Seems the problem is explicitly with the --ovc=libx264
option used with mpv
. Can't seem to get that to work…
Seems a bit similar to #13. I don't know if mpv on macOS uses the ffmpeg system libraries or is statically linked, but does using ffmpeg with libx264 works?
Sorry for the late reply here @ekisu! It doesn't seem to use/depend on ffmpeg; rather, it's just executing the mpv
command which includes the ability to do this, apparently.
Here's the command it's trying to run (cleaned up for the sake of an example):
[ 13.615][v][webm] Command line: mpv /path/to/my/video.mp4 --start=0:00:01.000 --end=0:00:02.000 --ovc=libx264 --oac=aac --loop-file=no --vid=1 --sid=no --aid=no --sub-ass-override=yes --sub-auto=exact --sub-delay=0.000000 --video-rotate=0 --ovcopts-add=b=132226k --ovcopts-add=crf=10 -o=/path/to/my/video-[00.01.000-00.02.000].mp4
Then it's spitting out "[vo/lavc] codec for video not found" and failing. Encodes fail whether I launch mpv from command line or Finder, and when copy-pasting that command into the command line too. FYI, I've since upgraded mpv to 0.31.0, but same issue.
Re: https://trac.ffmpeg.org/wiki/CompilationGuide/macOS – seems to be a decision that everyone is chiding, but "Since v2.0, Homebrew does not offer options for its core formulae anymore. Users who want to build ffmpeg with additional libraries (including non-free ones) need to use so-called taps from third party repositories."
I had tried out using a custom tap, though, and here's my current output of ffmepeg -version
:
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.16)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2-with-options_1 --enable-shared --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-gpl --enable-libaom --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --disable-libjack --disable-indev=jack --enable-opencl --enable-videotoolbox --disable-htmlpages
So it'd seem I am using ffmpeg with libx264. Is there a way to force mpv-webm to use ffmpeg rather than the built-in functionality of mpv to do this which is, for some reason, failing?
It's weird that you would need a external formula for using x264 with ffmpeg, given that the core one (and the one the core mpv formula depends on) already has it enabled.
Is there a way to force mpv-webm to use ffmpeg rather than the built-in functionality of mpv to do this
It already (should) use the same libavcodec libraries that ffmpeg uses, so I don't really know why one has support for x264 and the other doesn't.
Please post the output of mpv --ovc=help
and ffmpeg -codecs
, it might shed some light over this.
Oh, yeah, you're right, you don't need one as it now has it enabled by default.
Here ya go. Long outputs for both, so I've uploaded them as .txt files:
mpv --ovc=help
: https://puu.sh/F9NxW/c11f1ed9b0.txtffmpeg -codecs
: https://puu.sh/F9Ny5/54e28b300a.txtFrom that, I think it's pretty safe to say they aren't sharing the same libraries, seeing that codecs with the EV
flags from ffmpeg, that should appear in mpv's output, aren't appearing. I don't really know what could fix it though, maybe reinstalling would recompile mpv with the right libraries? Homebrew is a mystery to me.
Re/installing mpv via Homebrew doesn't seem to fix it for me, nor does using a pre-built binary which is what I did in the past actually rather than a Homebrew Cask (which install the .app along with the CLI utility)… hmm…
Is there any way to force mpv to use ffmpeg, do you know?
Hmm, I don't think mpv can use the ffmpeg binary per se, but, as I said, it should use the same shared libraries ffmpeg exposes (libavcodec/libavformat), unless ffmpeg and/or mpv were linked statically against those libs. I know very little about the macOS ecosystem itself, but .app bundles are like Snap/Flatpak app images, right? If so, the only way out is getting Homebrew to build the linked ffmpeg with the correct flags.
mpv version and platform
macOS 10.14.6
Description
Any clue why I conversion to mp4 is failing for me? I tried
uninstall
& reinstall
ing both ffmpeg and libvpx via Homebrew, and still getting the error below…Log file
(let me know if you need the full thing)
Thanks!