Screensheet

simur612

Member
May 25, 2018
879
0
16
Hi all is there a pluging available that makes a screensheet for rutorrent i think Xirvik Torrent have it installed on there seed boxes
does any1 have or can get the plugin folder Dir and maybe get it working in rutorrent smiley.gif
many thanks
 

simur612

Member
May 25, 2018
879
0
16
Hi sorry for the confusion im looking to create thumbnails i already have screenshot installed
 

simur612

Member
May 25, 2018
879
0
16
hey sorry to take the mick but im not to clever with linux ive pasted what my text looks like would it be possible for you or some1 who knows what there doing
to correct the text so i just paste it in and save it once again thanks so much for you help ive also install moviethumbnail as you advised on my server

GNU nano 2.2.4 File: action.php

<?php

require_once( '../_task/task.php' );
require_once( 'ffmpeg.php' );
eval( getPluginConf( 'screenshots' ) );

$ret = array();
if(isset($_REQUEST['cmd']))
{
$st = ffmpegSettings::load();
switch($_REQUEST['cmd'])
{
case "ffmpeg":
{
if(isset($_REQUEST['hash']) &&
isset($_REQUEST['no']))
{
$req = new rXMLRPCRequest( new rXMLRPCCommand( "f.get_frozen_path", array($_REQUEST['hash'],intval($_REQUEST['no']))) );
if($req->success())
{
$filename = $req->val[0];
if($filename=='')
{
$req = new rXMLRPCRequest( array(
new rXMLRPCCommand( "d.open", $_REQUEST['hash'] ),
new rXMLRPCCommand( "f.get_frozen_path", array($_REQUEST['hash'],intval($_REQUEST['no'])) ),
new rXMLRPCCommand( "d.close", $_REQUEST['hash'] ) ) );
if($req->success())
$filename = $req->val[1];
}
if($filename!=='')
{
$commands = array();
$offs = $st->data['exfrmoffs'];
$useWidth = $st->data['exusewidth'];
for($i=0; $i<$st->data['exfrmcount']; $i++)
{
$name = '"${dir}"/frame'.$i.($st->data['exformat'] ? '.png' : '.jpg');
$commands[] = getExternal("ffmpeg").
' -ss '.$offs.
" -i ".escapeshellarg($filename).
' -y -vframes 1 -an '.
($useWidth ? '-vf "scale='.$st->data['exfrmwidth'].':-1"' : '').
' '.
$name;
$commands[] = '{';
$commands[] = '>'.$i;
$commands[] = '}';
$offs += $st->data['exfrminterval'];
}
$commands[] = 'chmod a+r "${dir}"/frame*.*';
}
$ret = rTask::start($commands, rTask::FLG_NO_ERR);
}
}
break;
}
case "ffmpeggetall":
{
$dir = rTask::formatPath( $_REQUEST['no'] );
if(@chdir( $dir ))
{
$randName = uniqid("/tmp/rutorrent-data-");
exec(escapeshellarg(getExternal('tar'))." -cf ".$randName." ./*.".($st->data['exformat'] ? 'png' : 'jpg'),$results,$return);
if(is_file($randName))
{
sendFile( $randName, "application/x-tar", $_REQUEST['file'].'.tar', false );
unlink($randName);
exit(); }
case "ffmpeggetimage":
{
$dir = rTask::formatPath( $_REQUEST['no'] );
$ext = ($st->data['exformat'] ? '.png' : '.jpg');
$filename = $dir.'/frame'.$_REQUEST['fno'].$ext;
sendFile($filename, $st->data['exformat'] ? 'image/png' : 'image/jpeg', $_REQUEST['file']."-".str_pad($_REQUEST['fno']+1, 3, "0", STR_PAD_LEFT).$ext);
exit();
}
case "ffmpegclose":
{
$dir = rTask::formatPath( $_REQUEST['no'] );
for($i=0; $i<$st->data['exfrmcount']; $i++)
@unlink( $dir.'/frame'.$i.($st->data['exformat'] ? '.png' : '.jpg') );
@rmdir($dir);
exit();
}
case "ffmpegset":
{
$ret = $st->set();
break;
}
}
}

cachedEcho(json_encode($ret),"application/json");

?>
 

saroos1

Member
May 25, 2018
718
0
16
here can modify the cmd:

Code:
$commands[] = getExternal("ffmpeg").
' -ss '.$offs.
" -i ".escapeshellarg($filename).
' -y -vframes 1 -an '.
($useWidth ? '-vf "scale='.$st->data['exfrmwidth'].':-1"' : '').