ekisu / mpv-webm

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

[Suggestion] Default empty start/end to file start/end #37

Closed petzku closed 5 years ago

petzku commented 5 years ago

Currently if start or end time is not given, the script will simply refuse to encode. This is sensible behavior. However, encoding to the end of the video can be difficult, since mpv can close (if --keep-open is not set) or go to the next item in the playlist. I suggest making it at least configurable to default an empty end timestamp to mean "until the end of the video".

frozenpandaman commented 5 years ago

I like this suggestion! It makes sense to me that if the start and/or end time aren't set, they would (or should – it'd be handy) default to the video start and end timestamps, respectively.

ekisu commented 5 years ago

While I think defaulting the end time to the end of the video makes some sense, defaulting the start time to the start of the video is a bit... weird. Like, why would someone even want to "clip" the entire video?

frozenpandaman commented 5 years ago

Like, why would someone even want to "clip" the entire video?

I use it to easily convert (short) mp4s into webms.

ekisu commented 5 years ago

Eh, fair enough. Would like some testing before merging, though.

webm.lua

frozenpandaman commented 5 years ago

Seems if I open the prompt (Shift+W) too soon after opening the video file in mpv (I have to wait about 2 seconds), the fields don't populate. Other than that, it seems to work fine!

ekisu commented 5 years ago

Well, I can't reproduce (even if I press Shift+W as soon as I can, the fields are already set), but I've included some code to redraw the prompt when the duration is available.

ekisu commented 5 years ago

The PR was merged, closing this.