mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 10:49:36 +02:00
Update
This commit is contained in:
parent
3781bb7a05
commit
80dbf3d58f
5 changed files with 283 additions and 50 deletions
|
@ -482,6 +482,23 @@ function execAsync($command, $keyword = null)
|
|||
return $pid;
|
||||
}
|
||||
|
||||
function execFFMPEGAsyncOrRemote($command, $keyword = null)
|
||||
{
|
||||
$obj = AVideoPlugin::getDataObjectIfEnabled('API');
|
||||
if(!empty($obj) && !empty($obj->standAloneFFMPEG)){
|
||||
$url = "{$obj->standAloneFFMPEG}";
|
||||
$url = addQueryStringParameter($url, 'APISecret', $obj->APISecret);
|
||||
$url = addQueryStringParameter($url, 'ffmpegCommand', $command);
|
||||
$url = addQueryStringParameter($url, 'keyword', $keyword);
|
||||
_error_log("execFFMPEGAsyncOrRemote: URL $command");
|
||||
_error_log("execFFMPEGAsyncOrRemote: URL $url");
|
||||
return url_get_contents($url);
|
||||
}else{
|
||||
_error_log("execFFMPEGAsyncOrRemote: Async $command");
|
||||
return execAsync($command, $keyword);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Function to find the process by keyword using the pid file
|
||||
function findProcess($keyword)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue