ekisu / mpv-webm

Simple WebM maker for mpv, with no external dependencies.
MIT License
571 stars 33 forks source link

ffmpeg support #15

Closed sides closed 6 years ago

sides commented 6 years ago

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:

Some potential benefits from this:

ekisu commented 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).

sides commented 6 years ago

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.

ekisu commented 6 years ago

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.

sides commented 6 years ago

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.

ekisu commented 6 years ago

Thanks, I'll just do a quick test before merging.

sides commented 6 years ago

@ElegantMonkey uhh, better do a pull again. Those comments in the compiled file are really messing me up.

ekisu commented 6 years ago

Yeah, noticed that. I wish moonc had an option to keep comments.

ekisu commented 6 years ago

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.

ekisu commented 6 years ago

I merged it to a branch, to sort those things out before merging into master.