From 220f84c8ff421631c630dbb7441807992d1f683a Mon Sep 17 00:00:00 2001 From: koblack Date: Sat, 19 Oct 2024 17:40:25 +0000 Subject: [PATCH 1/3] screenshots plugin: add m2ts extension to allow taking screenshot from bluray discs --- plugins/screenshots/conf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/screenshots/conf.php b/plugins/screenshots/conf.php index d8fb56a32..788f8a9b3 100644 --- a/plugins/screenshots/conf.php +++ b/plugins/screenshots/conf.php @@ -14,5 +14,5 @@ "mp2","mp4","mpeg","mpeg1video","mpeg2video","mpegts","mpegtsraw","mpegvideo", "msnwctcp","mvi","mxf","mxf_d10","nc","nsv","nuv","ogg","psp","psxstr","rawvideo","rm","rpl","rtsp", "smk","svcd","swf","vcd","video4linux","video4linux2","vob","webm","wmv", - "mkv","ogm","mpg","mpv","m1v","m2v","mp2","qt","rmvb","dat","ts" + "mkv","ogm","mpg","mpv","m1v","m2v","mp2","qt","rmvb","dat","ts","m2ts" ); \ No newline at end of file From 8f2b5c84edf0d44899f4c1e03ee628c4fcb7e1b9 Mon Sep 17 00:00:00 2001 From: koblack Date: Sat, 19 Oct 2024 17:47:25 +0000 Subject: [PATCH 2/3] screenshots plugin: sort extensions alphabetically --- plugins/screenshots/conf.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/plugins/screenshots/conf.php b/plugins/screenshots/conf.php index 788f8a9b3..239505bc0 100644 --- a/plugins/screenshots/conf.php +++ b/plugins/screenshots/conf.php @@ -7,12 +7,11 @@ $extensions = array ( - "3g2","3gp","4xm","iff","iss","mtv","roq","a64","ac3","anm","apc","asf","avi","avm2","avs","bethsoftvid", - "bink","c93","cavsvideo","cdg","dirac","dnxhd","dsicin","dts","dv","dv1394","dvd","ea","eac3","ffm","film_cpk", - "filmstrip","flic","flv","gxf","h261","h263","h264","idcin","image2","image2pipe", - "ingenient","ipmovie","ipod","iv8","ivf","m4v","matroska","mjpeg","mov","m4a","mj2", - "mp2","mp4","mpeg","mpeg1video","mpeg2video","mpegts","mpegtsraw","mpegvideo", - "msnwctcp","mvi","mxf","mxf_d10","nc","nsv","nuv","ogg","psp","psxstr","rawvideo","rm","rpl","rtsp", - "smk","svcd","swf","vcd","video4linux","video4linux2","vob","webm","wmv", - "mkv","ogm","mpg","mpv","m1v","m2v","mp2","qt","rmvb","dat","ts","m2ts" + "3g2","3gp","4xm","a64","ac3","anm","apc","asf","avi","avm2","avs","bethsoftvid", + "bink","c93","cavsvideo","cdg","dat","dirac","dnxhd","dsicin","dts","dv","dv1394","dvd","ea","eac3","ffm","film_cpk", + "filmstrip","flic","flv","gxf","h261","h263","h264","idcin","iff","image2","image2pipe", + "ingenient","ipmovie","ipod","iss","iv8","ivf","m1v","m2ts","m2v","m4a","m4v","matroska","mj2","mjpeg","mkv","mov", + "mp2","mp2","mp4","mpeg","mpeg1video","mpeg2video","mpegts","mpegtsraw","mpegvideo","mpg","mpv", + "msnwctcp","mtv","mvi","mxf","mxf_d10","nc","nsv","nuv","ogg","ogm","psp","psxstr","qt","rawvideo","rm","rmvb","roq","rpl","rtsp", + "smk","svcd","swf","ts","vcd","video4linux","video4linux2","vob","webm","wmv", ); \ No newline at end of file From 5ee367a13d1b7ca7dbfdef4883d0ad5d41ebb3d9 Mon Sep 17 00:00:00 2001 From: koblack Date: Sat, 19 Oct 2024 17:48:54 +0000 Subject: [PATCH 3/3] screenshots plugin: take screenshot with correct aspect ratio from anamorphic video --- plugins/screenshots/action.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/screenshots/action.php b/plugins/screenshots/action.php index 4dc2db3f7..a34e9ea40 100644 --- a/plugins/screenshots/action.php +++ b/plugins/screenshots/action.php @@ -38,10 +38,12 @@ $name = '"${dir}"/frame'.$i.($st->data['exformat'] ? '.png' : '.jpg'); $commands[] = Utility::getExternal("ffmpeg"). ' -ss '.$offs. - " -i ".escapeshellarg($filename). - ' -y -vframes 1 -an '. - ($useWidth ? '-vf "scale='.$st->data['exfrmwidth'].':-1"' : ''). - ' '. + ' -i '.escapeshellarg($filename). + ' -y'. + ' -vframes 1'. + ' -an'. + ' -sn'. + ' -vf "scale=\'max(sar,1)*iw\':\'max(1/sar,1)*ih\''.($useWidth ? ',scale='.$st->data['exfrmwidth'].':-1' : '').'" '. $name; $commands[] = '{'; $commands[] = '>'.$i;