Sunita Kunwar
Sunita Kunwar

Reputation: 13

I'm not able to execute HandBrakeCLI sh script through php program

I have a sh file named test.sh

SRC=/var/www/html/plms/video/
DEST=/var/www/html/plms/mp4files/
DEST_EXT=mp4
HANDBRAKE_CLI=HandBrakeCLI
for FILE in `ls $SRC`
do
       filename=$(basename $FILE)
       extension=${filename##*.}
       filename=${filename%.*}
       $HANDBRAKE_CLI -i $SRC/$FILE -o $DEST/$filename.$DEST_EXT -e x264 -q 22 -r 12 -B 64 -X 480 -O

done

This gets run on command prompt and gives me output.

But when i try to execute it I dont get any output .Here output is .mp4 file from wmv file

testvideo.php

$output = shell_exec('sh test.sh');

Where I am doing wrong? If i write any other command in test.sh then its get executed.So have issue with HANDBRAKE_CLI only.

Upvotes: 1

Views: 37

Answers (0)

Related Questions