Hi again everyone.
i would like to ask you wonderful guys on how to encode videos using FFMPEG n PHP 5.3, so far i have gone through these following steps:
- Install FFMPEG
- Install PHP-FFMPEG extension for PHP 5.3, downloaded the extension over here
- install flvtool2
- try to convert a video into .flv using these script i found here
i got the video converted and duplicated, but the size of the new video is 0kb, i have also tried using the videotoolkit i found on phpclasses here, but i am getting these error messages
Notice: Undefined offset: 2 in /home/starakses/staraksess/encoder/videotoolkit/phpvideotoolkit.php5.php on line 628
Warning: unlink(/home/starakses/staraksess/encoder/videotoolkit/examples/tmp/1286940496-4cb52750dd754-multipass-0.log): No such file or directory in /home/starakses/staraksess/encoder/videotoolkit/phpvideotoolkit.php5.php on line 2597
FFMPEG ERROR: Execute error. Output for file "/home/starakses/staraksess/encoder/videotoolkit/examples/to-be-processed/MOV00007.3gp" was not found. Please check server write permissions and/or available codecs compiled with FFmpeg.
You can check the encode decode availability by inspecting the output array from PHPVideoToolkit::getFFmpegInfo().
i have tried to change the folder and file permission on the server, still...i get the same error messages, and the log file contain these
-------------------------------
FFMPEG OUTPUT
-------------------------------
-------------------------------
COMMAND
-------------------------------
/usr/bin/ffmpeg -i '/home/starakses/staraksess/encoder/videotoolkit/examples/to-be-processed/MOV00007.3gp' -s '320x240' -sameq '' -acodec 'libmp3lame' -ab '64kb' -ar '44100' -f 'flv' -pass '1' -passlogfile '/home/starakses/staraksess/encoder/videotoolkit/examples/tmp/1286940496-4cb52750dd754-multipass' -y /home/starakses/staraksess/encoder/videotoolkit/examples/tmp/1286940496-4cb52750dd695.flv &> /home/starakses/staraksess/encoder/videotoolkit/examples/tmp/1286940496-4cb52750dd820.info
/usr/bin/ffmpeg -i '/home/starakses/staraksess/encoder/videotoolkit/examples/to-be-processed/MOV00007.3gp' -s '320x240' -sameq '' -acodec 'libmp3lame' -ab '64kb' -ar '44100' -f 'flv' -pass '2' -passlogfile '/home/starakses/staraksess/encoder/videotoolkit/examples/tmp/1286940496-4cb52750dd754-multipass' -y /home/starakses/staraksess/encoder/videotoolkit/examples/tmp/1286940496-4cb52750dd695.flv &> /home/starakses/staraksess/encoder/videotoolkit/examples/tmp/1286940496-4cb52750dd820.info
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/starakses/staraksess/encoder/videotoolkit/examples/to-be-processed/MOV00007.3gp':
Metadata:
major_brand : 3gp5
minor_version : 512
compatible_brands: vfj13gp43gp5mp42
Duration: 00:00:10.40, start: 0.000000, bitrate: 78 kb/s
Stream #0.0(jpn): Video: h263, yuv420p, 176x144 [PAR 12:11 DAR 4:3], 65 kb/s, 9.44 fps, 29.97 tbr, 1k tbn, 29.97 tbc
Stream #0.1(jpn): Audio: amrnb, 8000 Hz, 1 channels, flt, 12 kb/s
Unable to find a suitable output format for ''
-------------------------------
RESULT
-------------------------------
Execute error. Output for file "/home/starakses/staraksess/encoder/videotoolkit/examples/to-be-processed/MOV00007.3gp" was not found. Please check server write permissions and/or available codecs compiled with FFmpeg. You can check the encode decode availability by inspecting the output array from PHPVideoToolkit::getFFmpegInfo().
i have also tried to print out the static method getFFmpegInfo(), but the array returned contain no value or what so ever. to be honest i am an alien to these things (FFMPEG and its usage). my questions would probably be:
- am i doing the right steps, i mean am i on the right track ?
- if i am on the right track, how do i know that both FFMPEG and PHP-FFMPEG extension is working on my server ?
- where can i find a good reference on learning these things (for a know nothing like me :D) ?
- is there any other options in regard to video conversion using PHP ?
thank you, i guess that covers everything for now, i am really sorry if i ask to much, really appreciate every help.
Regards