Closed petzku closed 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.
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?
Like, why would someone even want to "clip" the entire video?
I use it to easily convert (short) mp4s into webms.
Eh, fair enough. Would like some testing before merging, though.
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!
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.
The PR was merged, closing this.
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".