This question already has an answer here:
This is my codes in compresser.php:
<?php
$filename = "isnotconverted_*";
$files = glob($filename);
$filefound = $files[0];
$new_filefound = str_replace( "isnotconverted_", '', $filefound );
$command = 'ffmpeg -i '.$filefound.' -b 64k -vf "movie=watermark.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:0 [out]" '.$new_filefound;
exec( $command );
unlink( $filefound );
When I open compresser.php
directly there is no error and everything is OK, but when I use putty
and type /usr/local/bin/php /home/dltvbourse/public_html/compresser.php
, I get this error:
PHP Notice: Undefined offset: 0 in /home/dltvbourse/domains/dl.tvbourse.ir/public_html/compresser.php on line 5
ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers
built on Mar 1 2015 14:55:21 with gcc 4.1.2 20080704 (Red Hat 4.1.2-55)
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.123. 0 / 52.123. 0
libavformat 52.111. 0 / 52.111. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
-b: No such file or directory
PHP Warning: unlink(): No such file or directory in /home/dltvbourse/domains/dl.tvbourse.ir/public_html/compresser.php on line 12
What should I do?
</div>