mirror of
https://github.com/9001/copyparty.git
synced 2026-10-05 22:04:38 +01:00
th: video: prefer embedded cover/pic
This commit is contained in:
+8
-1
@@ -833,7 +833,7 @@ class ThumbSrv(object):
|
|||||||
|
|
||||||
def conv_ffmpeg(self, abspath: str, tpath: str, fmt: str, vn: VFS) -> None:
|
def conv_ffmpeg(self, abspath: str, tpath: str, fmt: str, vn: VFS) -> None:
|
||||||
self.wait4ram(0.2, tpath)
|
self.wait4ram(0.2, tpath)
|
||||||
ret, _, _, _ = ffprobe(abspath, int(vn.flags["convt"] / 2))
|
ret, raw, strms, ctnr = ffprobe(abspath, int(vn.flags["convt"] / 2))
|
||||||
if not ret:
|
if not ret:
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -841,6 +841,13 @@ class ThumbSrv(object):
|
|||||||
# audio in a video trenchcoat
|
# audio in a video trenchcoat
|
||||||
return self.conv_spec(abspath, tpath, fmt, vn)
|
return self.conv_spec(abspath, tpath, fmt, vn)
|
||||||
|
|
||||||
|
for strm in strms:
|
||||||
|
if (
|
||||||
|
strm.get("codec_type") == "video"
|
||||||
|
and strm.get("DISPOSITION:attached_pic") == "1"
|
||||||
|
):
|
||||||
|
return self.conv_emb_cv(abspath, tpath, fmt, vn, strm)
|
||||||
|
|
||||||
ext = abspath.rsplit(".")[-1].lower()
|
ext = abspath.rsplit(".")[-1].lower()
|
||||||
if ext in ["h264", "h265"] or ext in self.fmt_ffi:
|
if ext in ["h264", "h265"] or ext in self.fmt_ffi:
|
||||||
seek: list[bytes] = []
|
seek: list[bytes] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user