From c3efcf9f8932855fbb02bc815b0d566ccc6261c9 Mon Sep 17 00:00:00 2001 From: pax Date: Tue, 14 Apr 2026 15:58:33 -0500 Subject: [PATCH] library: seek to 10% before capturing video thumbnail Videos that open on a black frame (fade-in, title card, codec warmup) produced black library thumbnails. mpv now starts at 10% with hr_seek so the first decoded frame is past the opening. mpv clamps `start` to valid range so very short clips still land on a real frame. --- booru_viewer/gui/library.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/booru_viewer/gui/library.py b/booru_viewer/gui/library.py index e5413f8..5ad4c00 100644 --- a/booru_viewer/gui/library.py +++ b/booru_viewer/gui/library.py @@ -338,6 +338,13 @@ class LibraryView(QWidget): vo='null', ao='null', aid='no', pause=True, keep_open='yes', terminal=False, config=False, + # Seek to 10% before first frame decode so a video that + # opens on a black frame (fade-in, title card, codec + # warmup) doesn't produce a black thumbnail. mpv clamps + # `start` to valid range so very short clips still land + # on a real frame. + start='10%', + hr_seek='yes', ) try: @m.property_observer('video-params')