note about new latest homebrew versions/ffmpeg path
This commit is contained in:
parent
5fdf2851ea
commit
26e9907ff3
15
README.md
15
README.md
|
@ -19,6 +19,21 @@ All directly in the fantastic media player [mpv](https://mpv.io/installation/).
|
||||||
|
|
||||||
Besides mpv, you must have `ffmpeg` in your PATH.
|
Besides mpv, you must have `ffmpeg` in your PATH.
|
||||||
|
|
||||||
|
If you're launching mpv from Finder/Explorer, FFmpeg must be in your actual
|
||||||
|
system environment's PATH as opposed to your shell environment. This means
|
||||||
|
that changes to `~/.profile` or the like will not suffice. As such, on my
|
||||||
|
newest Macbook, after installing ffmpeg with homebrew I had to run the
|
||||||
|
following:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo ln -s /opt/homebrew/bin/ffmpeg /usr/local/bin/ffmpeg
|
||||||
|
```
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
To debug when launching from Finder/Explorer, use `` ` `` to display a terminal
|
||||||
|
with output.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
#### Linux/MacOS
|
#### Linux/MacOS
|
||||||
|
|
12
main.lua
12
main.lua
|
@ -1,3 +1,7 @@
|
||||||
|
-- NOTE TO FUTURE SELF:
|
||||||
|
-- To view debug logs when launching through Finder,
|
||||||
|
-- use the ` key in mpv instead of viewing ~/Library/Logs/mpv.log.
|
||||||
|
|
||||||
mp.msg.info("MPV-CUT LOADED")
|
mp.msg.info("MPV-CUT LOADED")
|
||||||
|
|
||||||
utils = require "mp.utils"
|
utils = require "mp.utils"
|
||||||
|
@ -20,6 +24,14 @@ local function table_to_str(o)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local result = mp.command_native({ name = "subprocess", args = {"ffmpeg"}, playback_only = false, capture_stdout = true, capture_stderr = true })
|
||||||
|
mp.msg.info("Your PATH: " .. os.getenv('PATH'))
|
||||||
|
if result.status ~= 1 then
|
||||||
|
mp.osd_message("FFmpeg failed to run, please press ` for debug info", 5)
|
||||||
|
mp.msg.error("FFmpeg failed to run:\n" .. table_to_str(result))
|
||||||
|
mp.msg.error("`which ffmpeg` output:\n" .. table_to_str(mp.command_native({ name = "subprocess", args = {"which", "ffmpeg"}, playback_only = false, capture_stdout = true, capture_stderr = true })))
|
||||||
|
end
|
||||||
|
|
||||||
local function to_hms(seconds)
|
local function to_hms(seconds)
|
||||||
local ms = math.floor((seconds - math.floor(seconds)) * 1000)
|
local ms = math.floor((seconds - math.floor(seconds)) * 1000)
|
||||||
local secs = math.floor(seconds)
|
local secs = math.floor(seconds)
|
||||||
|
|
Loading…
Reference in New Issue