Code: Select all
"Extract Frame: 1 sec interval"
foreach($token,<get SelectedItemsPathNames |>){
$base=getpathcomponent($token,"base");
runret("cmd /c mklink ""<xydrive>\SL\$base"" ""$token""");
new("<xydrive>\Temp\$base","dir");
$hh=0;
$mm=0;
$ss=0;
while($hh<10){
$r=0;
$i++;
if($i==15){
$i=0;
$r=2;
}
$hh=format($hh,"00");
$mm=format($mm,"00");
$ss=format($ss,"00");
// run "<xydrive>\Bin\MPV\mpv.exe ""$token"" --no-sub --no-audio --start=$hh:$mm:$ss --vf=yadif,scale=0:0 --vo=image --frames=1 --o=""<xydrive>\Temp\$base\$hh'$mm'$ss.png""",,$r,0;
run "<xydrive>\Bin\ffmpeg.exe -ss $hh:$mm:$ss -i ""$token"" -vframes 1 -y -f image2 -q:v 1 ""<xydrive>\Temp\$base\$hh'$mm'$ss.jpg""",,$r,0;
if($r==2){
$exist=exists("<xydrive>\Temp\$base\$hh'$mm'$ss.jpg");
if($exist==0){
sound "WindowsLogoff",,1;
status "Done.";
break;
}
}
$ss++;
if($ss==60){
$mm++;
$ss=0;
}
if($mm==60){
$hh++;
$mm=0;
}
}
}
sound "%SystemRoot%\media\tada.wav";
status "Done!";
"Extract All Frame"
new("I:\Temp\<curbase>. Frame","dir");
run "<xydrive>\Bin\ffmpeg.exe -i ""<curitem>"" -q:v 1 ""I:\Temp\<curbase>. Frame\%d.jpg""";
1. Need http://ffmpeg.zeranoe.com/builds/
2. Make folder: <xydrive>\Bin\ - place here ffmpeg.exe, <xydrive>\Temp\ - need for extracted image, <xydrive>\SL\ - need for symbolik link.
3. For playing preview need MPV player http://mpv.srsfckn.biz/mpv-x86_64-20150505.7z and file association:
Code: Select all
*'*.jpg>$name=getpathcomponent("<curitem>","parent"); $min=replacelist("<curbase>","'",":"); run """<xydrive>\Bin\MPV\mpv.exe"" ""<xydrive>\SL\$name"" --screenshot-template=""<curpath>\%wH'%wM'%wS.%wT"" --title=""$name"" --start=+$min";
XYplorer Beta Club