[ Video Sharing CMS v4 ] Uploading & Processing Glitch

Started by TheBritain,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TheBritainTopic starter

To further clarify, I edited ff.php and replaced the $output line, trying each of the three detailed on that tutorial page.
  •  

TheBritainTopic starter

I tossed the command string:
$output ="{ffmpeg-cmd} -i {input} -vcodec libx264 -s {ffmpeg-vsize} -threads 4 {output}.mp4 2>&1";

At my hosting provider, they are going to have a look at it and see what may be the issue. This is the string I am having the best luck with, as it outputs an MP4, albeit one with 0bytes.

The tester completes with all green checks.

PHP Version: 5.4.26
FFMPEG Version: 0.6.5

The command is definitely ffmpeg. The full path is: /usr/bin/ffmpeg
  •  

TheBritainTopic starter

The following is the output using that command, when I try to convert the test.avi. Also, yes, I did make sure that test.mp4 did not exist before starting.

File to convert: test.avi
Converted file: test.mp4
Command send to server: ffmpeg -i test.avi -vcodec libx264 -s 640x360 -threads 4 test.mp4 2>&1
FFmpeg output


array(16) {
  [0]=>
  string(67) "FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers"
  [1]=>
  string(73) "  built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)"
  [2]=>
  string(747) "  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab"
  [3]=>
  string(35) "  libavutil     50.15. 1 / 50.15. 1"
  [4]=>
  string(35) "  libavcodec    52.72. 2 / 52.72. 2"
  [5]=>
  string(35) "  libavformat   52.64. 2 / 52.64. 2"
  [6]=>
  string(35) "  libavdevice   52. 2. 0 / 52. 2. 0"
  [7]=>
  string(35) "  libavfilter    1.19. 0 /  1.19. 0"
  [8]=>
  string(35) "  libswscale     0.11. 0 /  0.11. 0"
  [9]=>
  string(35) "  libpostproc   51. 2. 0 / 51. 2. 0"
  [10]=>
  string(45) "[avi @ 0x1784670]max_analyze_duration reached"
  [11]=>
  string(31) "Input #0, avi, from 'test.avi':"
  [12]=>
  string(59) "  Duration: 00:00:06.06, start: 0.000000, bitrate: 891 kb/s"
  [13]=>
  string(82) "    Stream #0.0: Video: IV41 / 0x31345649, 256x240, 30 fps, 30 tbr, 30 tbn, 30 tbc"
  [14]=>
  string(63) "swScaler: Unknown format is not supported as input pixel format"
  [15]=>
  string(29) "Cannot get resampling context"
}
int(1)
  •  

TheBritainTopic starter

PHPVibe has a typo on this page:
http://www.phprevolution.com/installing-phpvibe/

This Line:
$output ="{ffmpeg-cmd} -y -i {input} {output}.mp4 2<&1"";


Should be this:
$output ="{ffmpeg-cmd} -y -i {input} {output}.mp4 2<&1";


Upon testing this line, the 'Simplest command possible (debugging only):', this is my output:

File to convert: test.avi
Converted file: test.mp4
Command send to server: ffmpeg -y -i test.avi test.mp4 2<&1
FFmpeg output


array(16) {
  [0]=>
  string(67) "FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers"
  [1]=>
  string(73) "  built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)"
  [2]=>
  string(747) "  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab"
  [3]=>
  string(35) "  libavutil     50.15. 1 / 50.15. 1"
  [4]=>
  string(35) "  libavcodec    52.72. 2 / 52.72. 2"
  [5]=>
  string(35) "  libavformat   52.64. 2 / 52.64. 2"
  [6]=>
  string(35) "  libavdevice   52. 2. 0 / 52. 2. 0"
  [7]=>
  string(35) "  libavfilter    1.19. 0 /  1.19. 0"
  [8]=>
  string(35) "  libswscale     0.11. 0 /  0.11. 0"
  [9]=>
  string(35) "  libpostproc   51. 2. 0 / 51. 2. 0"
  [10]=>
  string(45) "[avi @ 0x1416670]max_analyze_duration reached"
  [11]=>
  string(31) "Input #0, avi, from 'test.avi':"
  [12]=>
  string(59) "  Duration: 00:00:06.06, start: 0.000000, bitrate: 891 kb/s"
  [13]=>
  string(82) "    Stream #0.0: Video: IV41 / 0x31345649, 256x240, 30 fps, 30 tbr, 30 tbn, 30 tbc"
  [14]=>
  string(63) "swScaler: Unknown format is not supported as input pixel format"
  [15]=>
  string(29) "Cannot get resampling context"
}
int(1)


It still generates a 0byte test.mp4 file, even with the simplest command available.

Thanks for all your help Alexander, I know all these support request can be overwhelming. Hopefully, once I get all the problems I run into nailed, I can put together a help cheat sheet, as I seem to have run into more complicated variants of already existing problems.
  •  

PHPVibe A.

Then it's simple, the ffmpeg doesn't work. That debugging command works even on the most primitive ffmpeg versions.
I would suggest you get it uninstalled and install it according to the ffmpeg wiki for your operating system..
Make sure you uninstall it, a common mistake is to install 2 or more ffmpeg modules on the server (yes, it's possible they do not trow any error, just mess up the output badly).

TheBritainTopic starter

My VPS is professionally installed and managed by A Small Orange. I have no ability to uninstall, or install FFMPEG. I run another video site on a different platform, and it handles uploading and converting the video fine, I've never looked at their video code (it is really terrible) but I am almost certain it uses FFMPEG in some way, as it was an install requirement.
  •  

TheBritainTopic starter

I did some testing, and the tester folder is set to CHMOD 755, now here is the funny bit, if I change it to 777, I get a 404. This might sound strange, but I can't access CHMOD 777 folders. What if FFMPEG is being denied write permission, and that is why I am ending up with a 0 byte file?

So to clarify:

If I set my tester folder to 755, I can access it.
If I set my tester folder to 777, I can not access it; 404 error.

This is the same with any folder I create within the root of the website. If I set that folder to 777, I can not longer access it.

This is the content of my root .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^embed/([^/]*)/$ /embed.php?id=$1 [L]
RewriteRule ^feed(.*)$ feed.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/?$ index.php?rp=$1 [L]
</IfModule>
<ifModule mod_headers.c>
    Header set Access-Control-Allow-Origin: *
</ifModule>
  •  

TheBritainTopic starter

My host has upgraded FFMPEG to version .7 and replaced my PHP with suPHP, in an attempt to fix these errors. They still persist. I will keep at it:

As you can see, the error has changed.
Also, I am seeing if my host can get me updated to FFMPEG 2.3.

array(16) {
  [0]=>
  string(68) "ffmpeg version 0.7.13, Copyright (c) 2000-2011 the FFmpeg developers"
  [1]=>
  string(73) "  built on Aug 23 2014 00:25:59 with gcc 4.4.7 20120313 (Red Hat 4.4.7-4)"
  [2]=>
  string(330) "  configuration: --prefix=/usr --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-x11grab --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libfaac --enable-libmp3lame --enable-libopenjpeg --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib"
  [3]=>
  string(36) "  libavutil    50. 43. 0 / 50. 43. 0"
  [4]=>
  string(36) "  libavcodec   52.123. 0 / 52.123. 0"
  [5]=>
  string(36) "  libavformat  52.111. 0 / 52.111. 0"
  [6]=>
  string(36) "  libavdevice  52.  5. 0 / 52.  5. 0"
  [7]=>
  string(36) "  libavfilter   1. 80. 0 /  1. 80. 0"
  [8]=>
  string(36) "  libswscale    0. 14. 1 /  0. 14. 1"
  [9]=>
  string(36) "  libpostproc  51.  2. 0 / 51.  2. 0"
  [10]=>
  string(65) "[avi @ 0x28f50a0] max_analyze_duration 5000000 reached at 5000000"
  [11]=>
  string(31) "Input #0, avi, from 'test.avi':"
  [12]=>
  string(59) "  Duration: 00:00:06.06, start: 0.000000, bitrate: 891 kb/s"
  [13]=>
  string(82) "    Stream #0.0: Video: IV41 / 0x31345649, 256x240, 30 fps, 30 tbr, 30 tbn, 30 tbc"
  [14]=>
  string(53) "[buffer @ 0x28ee580] Invalid pixel format string '-1'"
  [15]=>
  string(22) "Error opening filters!"
}
int(1)
  •  

TheBritainTopic starter

Alright, they can not upgrade past FFMPEG .7 without compiling CPANEL. So I am prodding them for answers. They are looking into the problem, and trying to figure out what is up. I will get this solved and leave it here for future inquisitors.
  •  

TheBritainTopic starter

Well, this is new. This is the reply from my hosting:

QuoteI see. No, that is normal on SuPHP servers; it won't allow 777 on any file or folder, due security reasons. You need all files on 640 or 644 and folders on 755 only.

A few of my folders are set to 777.
  •  

TheBritainTopic starter

I've started a thread on the FFMPEG site, and they seem to think my version is to far out to work. My hosting wants to charge to update past 0.7. Being cheap, I am trying to avoid paying for a CPANEL recompile. Here is the thread for any party interested.

http://ffmpeg.gusari.org/viewtopic.php?f=11&t=1635&p=4612#p4612

Long story short, I am trying to add the executable to my site, and redirect the command to the new FFMPEG. I am going to try and install it through the bash here soon.
  •  

Similar topics (7)