Comments (15)
Which build are you using? Please post the output from mpv --ovc=help
and mpv --oac=help
.
from mpv-webm.
here's the mpv output
from mpv-webm.
Apparently your libavcodec
was compiled without libvpx/libvorbis encoding support. I don't know if macOS mpv builds are statically or dynamically linked, but there's not much that can be done aside from enabling the right flags on the build.
Edit: just for the record, can your mpv play webm files?
from mpv-webm.
Yeah my mpv build is able to play webm files.
Looks like --enable-libvorbis --enable-libvpx
are the required build flags
from mpv-webm.
Can you (re)install ffmpeg enabling libvpx and libvorbis, and report if it works?
from mpv-webm.
Thanks, reinstalling ffmpeg with those flags works.
But I think the webm output file is corrupt:
original
webm output
Same output for other video formats. I also noticed encoding will fail if I open the video through finder instead of the command line.
from mpv-webm.
Setting the script to use to libvpx-v9 instead of libvpx fixed everything.
from mpv-webm.
Could you try encoding it with ffmpeg, as described here? Using VP8 alone shouldn't be the reason why it's producing such broken files.
from mpv-webm.
using -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis
is working, but VP8 from the script is still broken
from mpv-webm.
I'm running out of ideas here, sadly I don't have a Mac to try this myself. Does modifying the 1/2-pass setting change anything? Maybe VP8 can't, for some reason, use/write the first pass log file. Also, if you execute the mpv encoding command on the terminal again, does anything change (for both 1 and 2 pass variations)?
Please post logs if you find them necessary/somewhat useful.
from mpv-webm.
As far as my issues go single or two pass doesn't matter. I figured out the VP8 corruption is caused by libvpx_threads
being set to anything other than 1 (default 4), so I can get a proper webm files with VP8, but only if I open the video through a terminal.
When I open a video through finder instead of the terminal encoding fails. The mpv command being run for both terminal and finder processes are the same though, and running the mpv command separately works so I'm stumped there. And switching to VP9 and encoding through finder works, including libvpx_threads=4.
Don't think this is helpful but here's the relevant part of the log from encoding through finder with twopass=false:
[ 4.632][i][webm] Encoding to ~/small-[00_01.066-00_02.866]-audio.webm
[ 4.632][v][webm] Command line: mpv ~/small.mp4 --start=0:00:01.066 --end=0:00:02.866 --ovc=libvpx --oac=libvorbis --vid=1 --aid=1 --sid=no --vf lavfi=[colormatrix=bt709:bt601] --ovcopts-add=threads=1 --ovcopts-add=b=11111k --ovcopts-add=crf=10 -o=~/small-[00_01.066-00_02.866]-audio.webm
[ 4.632][v][cplayer] Run command: show-text, flags=0, args=[�Started encode..., 5000, 0]
[ 4.643][v][osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.5.1 (COMPLEX)
[ 4.643][v][osd/libass] Setting up fonts...
[ 4.644][v][osd/libass] Using font provider coretext
[ 4.644][v][osd/libass] Done.
[ 4.647][v][osd/libass] fontselect: (sans-serif, 400, 0) -> /System/Library/Fonts/Helvetica.ttc, -1, Helvetica
[ 4.649][v][vo/opengl] Reallocating OSD texture to 512x128.
[ 4.724][v][cplayer] Run command: script-binding, flags=9, args=[webm/e]
[ 4.739][v][cplayer] Run command: show-text, flags=0, args=[�Encode failed! Check the logs for details., 5000, 0]
[ 4.744][v][vo/opengl] Reallocating OSD texture to 1024x128.
[ 4.826][v][lavf] EOF reached.
[ 5.508][v][cplayer] Run command: quit, flags=9, args=[0]
[ 5.508][v][cplayer] EOF code: 6
from mpv-webm.
I've updated the script to produce better logging. Please try it out and post logs.
Edit: if the libvpx_threads
issue occurs even when using ffmpeg directly, you might consider opening a bug on their tracker.
from mpv-webm.
Ah you're right the threads issue lies with ffmpeg. I'll open a bug report with them.
I noticed with your last update encoding failure prints success and vice versa.
Here's the updated log when encoding through finder
[ 17.771][i][webm] Encoding to ~/small-[00_01.900-00_03.733]-audio.webm
[ 17.771][v][webm] Command line: mpv ~/small.mp4 --start=0:00:01.900 --end=0:00:03.733 --ovc=libvpx --oac=libvorbis --vid=1 --aid=1 --sid=no --vf lavfi=[colormatrix=bt709:bt601] --ovcopts-add=threads=1 --ovcopts-add=b=10909k --ovcopts-add=crf=10 -o=~/small-[00_01.900-00_03.733]-audio.webm
[ 17.771][v][cplayer] Run command: show-text, flags=0, args=[�Started encode..., 5000, 0]
[ 17.870][v][webm] Command failed! Reason: nil Killed by us? no
[ 17.870][v][webm] Command stdout:
[ 17.870][v][webm]
[ 17.870][v][cplayer] Run command: show-text, flags=0, args=[�Encoded successfully! Saved to\N{\b1}~/small-[00_01.900-00_03.733]-audio.webm{\b0}, 5000, 0]
from mpv-webm.
I noticed with your last update encoding failure prints success and vice versa.
Fixed that.
Anyway, I think this might be, somehow, related to mpv not allowing multiple instances under macOS (mpv-player/mpv#1377) when using the app bundle (the Terminal allows you to run as many instances as you like). But, because it works when libvpx-vp9 is used, I'm not entirely sure why that would matter. I'll try wrapping it on a bash instance or something.
Edit: try this and this, you should find 2 files named "encode-log.log" on your home dir, please upload them.
from mpv-webm.
Closed, seems to be working as of now (see #13).
from mpv-webm.
Related Issues (20)
- [Request] Encode speed option HOT 2
- the player freezes when using sub-scale in combinations of keys together with sub-ass-override
- coding error when displaying progress (revision of the installation instructions)
- [Request] Apply GLSL shaders to output
- Slightly off colors in generated webm
- %04n output_template naming HOT 1
- [Request] Update the FFMPEG branch to contain the new features
- mpv-webm with mpv.net: `Command failed! Reason: init` HOT 3
- webm conversion fails when going from 4:2:2 to 4:2:0 subsampling
- There are no subtitles in the generated GIF
- Encode fails in GIF format HOT 3
- Lua error: <eof> expected near 'mp' HOT 3
- srt subtitle style
- active fork or alternative HOT 1
- Subtitles are missing when watching the preview
- Feature Request: Automatic log cleanup and/or set log directory.
- Encode fails if source video file is located on a NAS and display_progress=yes
- Encode fails when MP4 or MP3 codes are selected on MacOS HOT 1
- Getting error: "AVFilterGraph: No such filter: 'fifo'" HOT 2
- Apply Current Video Filters doesn't work with sub-bold property
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpv-webm.