0.8.0.0
This commit is contained in:
@@ -62,9 +62,17 @@ if ($mode == "thumb") {
|
||||
$cmd['ql-thumbnail'][] = $bin_qlthumb." ".$shellpath." ".$tprefix."qlthumb.jpg public.jpeg ".$p['thumb_size']." ".$p['thumb_size']." .8";
|
||||
$cmd['ql-thumbnail'][] = $tprefix."qlthumb.jpg";
|
||||
|
||||
$cmd['sox'][] = $bin_sox." ".$shellpath." -n trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -o - | ".$bin_convert." - -crop 800x515+58+30 +dither -colors 16 ".$tprefix."sox.png";
|
||||
//$cmd['sox'][] = $bin_sox." ".$shellpath." -n trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -o ".$tpfile."; ".$bin_sips." -s format jpeg -s formatOptions 80 ".escapeshellarg($tpfile)." --out ".$tprefix."sox.png";
|
||||
$cmd['sox'][] = $tprefix."sox.png";
|
||||
$cmd['sox_q'][] = $bin_sox." ".$shellpath." -n trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -o - | ".$bin_pngquant." - -o ".$tprefix."sox-quant.png";
|
||||
$cmd['sox_q'][] = $tprefix."sox-quant.png";
|
||||
|
||||
$cmd['sox_c'][] = $bin_sox." ".$shellpath." -n trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -o - | ".$bin_convert." - -quality 85% ".$tprefix."sox-convert.jpg";
|
||||
$cmd['sox_c'][] = $tprefix."sox-convert.jpg";
|
||||
|
||||
$cmd['sox_cx'][] = $bin_sox." ".$shellpath." -n remix - trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -r -o - | ".$bin_convert." - -quality 85% ".$tprefix."sox-convert_x.jpg";
|
||||
$cmd['sox_cx'][] = $tprefix."sox-convert_x.jpg";
|
||||
|
||||
$cmd['sox_s'][] = $bin_sox." ".$shellpath." -n trim 0 $(".$bin_exiftool." -s -s -s -duration# ".$shellpath." | awk '{print $1/10}') spectrogram -o ".escapeshellarg($wprefix.basename($argv[2]).".png")."; ".$bin_sips." -s format jpeg -s formatOptions 80 ".escapeshellarg($wprefix.basename($argv[2]).".png")." --out ".$tprefix."sox-sips.jpg";
|
||||
$cmd['sox_s'][] = $tprefix."sox-sips.jpg";
|
||||
|
||||
$cmd['ffmpeg'][] = $bin_ffmpeg." -ss $(( $(".$bin_mediainfo." --Inform='Video;%Duration%' ".$shellpath." | cut -d'.' -f1) / 10000 )) -i ".$shellpath." -vframes 1 -filter:v scale='".$p['thumb_size'].":-2' -q:v 3 ".$tprefix."ffmpeg.jpg"; // only works properly on horizontal videos
|
||||
$cmd['ffmpeg'][] = $tprefix."ffmpeg.jpg";
|
||||
@@ -74,10 +82,13 @@ if ($mode == "thumb") {
|
||||
$cmd['qltool'][] = $bin_qltool." di ".$shellpath." ".$p['icon_size']." ".$p['icon_size']." | base64 --decode | ".$bin_convert." - -scale 50% -strip -define png:compression-level=9 ".$tprefix."qltool.png";
|
||||
$cmd['qltool'][] = $tprefix."qltool.png";
|
||||
|
||||
$cmd['qltool_q'][] = $bin_qltool." di ".$shellpath." ".$p['icon_size']." ".$p['icon_size']." | base64 --decode | ".$bin_convert." - -scale 50% - | ".$bin_pngquant." - -o ".$tprefix."qltool-quant.png";
|
||||
$cmd['qltool_q'][] = $tprefix."qltool-quant.png";
|
||||
|
||||
$cmd['ql-icon'][] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." --output=".$tprefix."qlicon.png";
|
||||
$cmd['ql-icon'][] = $tprefix."qlicon.png";
|
||||
|
||||
$cmd['ql-icon_q'][] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." | ".$bin_pngquant." - > ".$tprefix."qlicon-quant.png";
|
||||
$cmd['ql-icon_q'][] = $bin_qlicon." --input=".$shellpath." --width=".$p['icon_size']." --height=".$p['icon_size']." | ".$bin_pngquant." - -o ".$tprefix."qlicon-quant.png";
|
||||
$cmd['ql-icon_q'][] = $tprefix."qlicon-quant.png";
|
||||
|
||||
$cmd['qlmanage_sx'][] = $bin_qlmanage." -ti -s ".$p['icon_size']." -o ".$wprefix." ".$shellpath." ; mv ".escapeshellarg($wprefix.basename($argv[2]).".png")." ".$tprefix."qlmanage-size.png";
|
||||
@@ -105,6 +116,7 @@ foreach ($cmd as $exec) {
|
||||
|
||||
if(!filesize($exec[1])) {
|
||||
echo "NO RESULT\n";
|
||||
unlink($exec[1]);
|
||||
} else {
|
||||
rename($exec[1],$dir."/".$i."_".$file."_".$elapsed."msec.".$ext);
|
||||
}
|
||||
@@ -113,5 +125,6 @@ foreach ($cmd as $exec) {
|
||||
}
|
||||
|
||||
shell_exec("qlmanage -p ".$tprefix."/* > /dev/null 2>&1");
|
||||
shell_exec("open ".$tprefix);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user