albertusputra
Hello,
I sent InMotion Hosting a message about changing to '/usr/local' first before doing any installation steps for FFMPEG, and I also commented about the PHP test they ran and that showing version info is not akin to executing scripts successfully.
Here is their response:
I added an additional command to the ffmpegtest.php script. It cropped and copied a 30 second stock image down to 5 seconds.
<?php
$command = "/usr/bin/ffmpeg -version";
echo shell_exec($command);
shell_exec("ffmpeg -i /home/quinnguitar/public_html/Dewdrops_1.mp4 -ss 00:00:05 -to 00:00:10 -c copy /home/quinnguitar/public_html/Dewdrops_1_copy.mp4");
?>
https://quinnguitar.com/Dewdrops_1.mp4
https://quinnguitar.com/Dewdrops_1_copy.mp4
I'm seeing a lot of memory allocation errors in the apache error log, perhaps, from other websites trying to convert with ffmpeg. Example:
[Mon Jun 11 09:11:02.888286 2018] [:error] [pid 6509] [client 74.124.217.189:62961] Error while decoding stream #0:1: Internal bug, should not have happened
[Mon Jun 11 09:11:02.888528 2018] [:error] [pid 6509] [client 74.124.217.189:62961] /home/quinnguitar/public_html/images/video/originalvideos/705/Qxw15ejHkkD.m4v: Cannot allocate memory
[Mon Jun 11 09:11:02.888751 2018] [:error] [pid 6509] [client 74.124.217.189:62961] [scaler_out_0_0 @ 0x2596000] Failed to configure output pad on scaler_out_0_0
[Mon Jun 11 09:11:02.888914 2018] [:error] [pid 6509] [client 74.124.217.189:62961] Error reinitializing filters!
[Mon Jun 11 09:11:02.889087 2018] [:error] [pid 6509] [client 74.124.217.189:62961] Error while filtering: Cannot allocate memory
[Mon Jun 11 09:11:02.889296 2018] [:error] [pid 6509] [client 74.124.217.189:62961] Finishing stream 0:0 without any data written to it.
[Mon Jun 11 09:11:02.889523 2018] [:error] [pid 6509] [client 74.124.217.189:62961] [scaler_out_0_0 @ 0x2595e80] Failed to configure output pad on scaler_out_0_0
[Mon Jun 11 09:11:02.889679 2018] [:error] [pid 6509] [client 74.124.217.189:62961] Error configuring filter graph
[Mon Jun 11 09:11:02.889835 2018] [:error] [pid 6509] [client 74.124.217.189:62961] [aac @ 0x2585000] Qavg: 1814.694
[Mon Jun 11 09:11:02.890031 2018] [:error] [pid 6509] [client 74.124.217.189:62961] [aac @ 0x2585000] 2 frames left in the queue on closing
[Mon Jun 11 09:11:02.890213 2018] [:error] [pid 6509] [client 74.124.217.189:62961] Conversion failed!
I would provide this information back to the plugin developers as it does seem that PHP is able to properly execute ffmpeg commands.
I then tried executing some commands myself:
exec ffmpeg /home/quinnguitar/public_html/images/video/originalvideos/705/1YSnr1NEfCz.mp4 -ss 00:00:05 -to 00:00:10 -c copy /home/quinnguitar/public_html/images/video/originalvideos/705/1YSnr1NEfCz-copy.mp4
ffmpeg version N-91208-ge50a5c9 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)
configuration: --enable-gpl --enable-shared --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libass --extra-libs=-lpthread --libdir=/usr/lib64 --pkg-config-flags=--static --enable-nonfree
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 19.105 / 58. 19.105
libavformat 58. 17.100 / 58. 17.100
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 25.100 / 7. 25.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Output #0, mp4, to '/home/quinnguitar/public_html/images/video/originalvideos/705/1YSnr1NEfCz.mp4':
Output file #0 does not contain any stream
I then tried this:
exec ffmpeg /home/quinnguitar/public_html/1YSnr1NEfCz.mp4 -c copy /home/quinnguitar/public_html/1YSnr1NEfCz-copy.mp4
ffmpeg version N-91208-ge50a5c9 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)
configuration: --enable-gpl --enable-shared --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libass --extra-libs=-lpthread --libdir=/usr/lib64 --pkg-config-flags=--static --enable-nonfree
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 19.105 / 58. 19.105
libavformat 58. 17.100 / 58. 17.100
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 25.100 / 7. 25.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Output #0, mp4, to '/home/quinnguitar/public_html/1YSnr1NEfCz.mp4':
Output file #0 does not contain any stream
My thinking was that perhaps a permissions issue with the deeper directory structure created by JS was preventing FFMPEG from working, so I tried the test with another video at the root level of public_html.
Hope this helps, looking forward to your response.