Skip to content

Commit b3b928a

Browse files
committed
Fix eyecatchup#14 for windows platforms
1 parent 48d9a60 commit b3b928a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

youtube-dl.class.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,11 @@ private function valid_dir($dir)
659659
*/
660660
private function has_ffmpeg()
661661
{
662-
$sh = `which ffmpeg`;
663-
return (bool) (strlen(trim($sh)) > 0);
662+
// check if ffmpeg is installed using returnVariable on help command
663+
$returnVar = false;
664+
$out = array();
665+
exec('ffmpeg -h', $out, $returnVar);
666+
return $returnVar === 0;
664667
}
665668

666669
/**

0 commit comments

Comments
 (0)