Closed sides closed 6 years ago
Well, that's quite big. It might take some time to look at it, but it seems pretty well structured, at a first glance (a lot better than what I would do, that's for sure).
I'm gonna be pushing the changes later today. But just to reiterate, the more I looked at it the more I realized this actually brings pretty little utility (other than to satisfy my autism). It might make adding new options unnecessarily annoying, idk. Anyway, do what you want with it, but you've been warned.
Well, mpv support for encoding seems to be abandoned (it's there just because it still works), and enabling ffmpeg would allow some extra options (stream copying, two pass, softsubs, etc). And, aside from Windows, usually systems that have mpv installed also have ffmpeg.
mpv support for encoding seems to be abandoned (it's there just because it still works)
Didn't know that. Then there might've been a point to this after all. Could also at some point add libav then for those who have that.
Anyway, everything should be almost 1:1 between mpv and ffmpeg now with filters working, except for the "format" filter in raw video that I don't know what to do about. I don't know what the ffmpeg equivalent is and it sort of goes out of my range of expertise.
Thanks, I'll just do a quick test before merging.
@ElegantMonkey uhh, better do a pull again. Those comments in the compiled file are really messing me up.
Yeah, noticed that. I wish moonc had an option to keep comments.
Also, hardsubbing and twopass doesn't work (with ffmpeg). I can fix those things myself, so if it's okay for you I'll just merge it.
I merged it to a branch, to sort those things out before merging into master.
Hey, for personal reasons I wanted to be able to use ffmpeg with this script, so I changed the way encoding is done a bit. This ended up being more massive than I thought, so I figured I'd open this pull request if you're interested, but I understand if it's out of scope.
Outline of changes:
encode.moon
now doesn't build a command to be executed, but instead builds an instance ofEncodingParameters
which are passed to a backend (mpv or ffmpeg).webm.moon
,rawvideo.moon
,formats/base.moon
:getX
methods.getXFilters
methods, but instead return an array ofMpvFilter
(which is up to backend discretion to resolve).backends/
dir was added with ffmpeg and mpv. These create their respective commands with varying support. mpv should be producing the same commands as it was before these changes.options.moon
now hasbackend
andbackend_location
options.Some potential benefits from this:
-c copy
). This would need a few more changes, particularly in how much control formats have.