• Welcome to PHPVIBE Forums. Please log in.

[ 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

Hi there, everything seems to be working well, except when I upload.

The video does not list, and this happens on the backend.



It made 800 unpublished entries.

Thanks for your help!
  •  

TheBritainTopic starter

And a few seconds later we are up to 1700 entries.
  •  

TheBritainTopic starter

I just did a delete from on both the vibe_videos_tmp, and the vibe_videos, and they are still racking up.
  •  

PHPVibe A.


TheBritainTopic starter

Gotta say, besides the little errors here and there, this is a pretty awesome framework to start off of.
  •  

TheBritainTopic starter

  •  

PHPVibe A.


PHPVibe A.

Quote from: TheBritain on
Gotta say, besides the little errors here and there, this is a pretty awesome framework to start off of.

Point them out. This is the only way to get them fixed.

TheBritainTopic starter

Alrighty, so I setup the videocron.php in the CPanel, made the correct changes and such, but I still have some issues. As of right now, when I upload a video, it does not show up on the front end or backend. I even gave it an hour just to see what would happen.

I am using FFMPEG.

After I get this worked out, I will compile a package or tutorial for users experiencing the same issues.
  •  

PHPVibe A.

Did you use the tester? All is well in the ffmpeg setup? videocron.php has chmod 0555?
So there is no sql insert of the video? Is the database user having full permissions on the db?

TheBritainTopic starter

I checked everything and re-read the instructions, still no cake. I checked the error_log in the root, and it doesn't contain any relevant entries.
  •  

PHPVibe A.

Walk me trough it step by step, cause I feel a bit lost.

TheBritainTopic starter

Alright, after getting them to clear up the ModSec problems, I can now upload a video and it will appear on the front page, however, it is stuck in perpetual processing. I ran the tester again, and the FFMPEG tester worked. My site meets all requirements for PHPVibe. I tried a vanilla script, and the manual cron-job. Feel free to check out my site, the processing video is still there.

Thanks for the help so far, I hope that I can help contribute to the error database.
  •  

PHPVibe A.

Here is what's happening:

1. The video gets uploaded in /rawmedia and inserted to database
2. The videocron.php is triggered (by cpanel in your case) and processes the video with ffmpeg and updates the video in database, also publishes videos and sets the ffmpeg details (thumb, duration, source).

Does videocron.php gets fired by the cpanel? Cause if it doesn't, for wrong bin path reasons, file not being able to execute, it will remain stuck.

If you execute domain.com/videocron.php what happens?

PS: PM me your url.

TheBritainTopic starter

Upon firing, it erased every video's thumbnail and name. It doesn't matter whether it was upload or if it was embedded.
  •  

PHPVibe A.

What?  :o
Send me a cpanel access by PM.
Also admin login and admin url (if changed).

awsjulio

I'm having some issues with uploading as well

- I uploaded an mp4, and it prossesed quickly but had no thumbnail, it also created 300+ pages of entries that are just blank video thumbnails.

- Have tried uploading AVI extensions in the past with no luck

I can import youtube videos no problems, thumbnails and everything.

If relevant:
Brasil theme
Recently removed Cron Jobs from index.php as found in an article here because of CPU issues.
  •  

PHPVibe A.

Quote from: Alexander on
Hi, haven't heard about this shel_exec issues in a few months.
Here you go http://www.phprevolution.com/forum/troubleshooting-issues/not-using-the-right-ffmpeg/msg15349/#msg15349

Did you try this? It could also be because of a wrong specified bin path or/and ffmpeg command under "cons & ffmpeg". Does the tester work http://www.phpvibe.com/#requirements ?

awsjulio

Quote from: Alexander on
Did you try this? It could also be because of a wrong specified bin path or/and ffmpeg command under "cons & ffmpeg". Does the tester work http://www.phpvibe.com/#requirements ?

Could not locate FFMPEG via a php command. FFMPEG is optional.

does that actually mean that FFMPEG is missing or that the string being used by the php command is different? Contacted host, account FFMPEG is set up
  •  

awsjulio

Quote from: awsjulio on
Could not locate FFMPEG via a php command. FFMPEG is optional.

does that actually mean that FFMPEG is missing or that the string being used by the php command is different? Contacted host, account FFMPEG is set up

Making some progress here, turns out I took "FFMPEG comand to run, ex: ffmpeg, usr/bin/ffmpeg. Make sure it works." in FFMPEG settings too literal and removed the / before usr...

adding it now provides a thumbnail for the video, but no video: Error loading media: File could not be played.
  •  

PHPVibe A.

It means, the command is wrong.
I've never seen without an slash in front, except when it's ffmpeg word only.
Change the path in tester, see why it doesn't convert.

TheBritainTopic starter

I am still having this issue, and I have tried all manner of FFMPEG commands. I was hoping if I held off for a bit and worked on other projects, that I might come back to a later build of PHPVibe. Have there been any advancements on the processing front?
  •  

PHPVibe A.

Not sure what you expect in the next upgrade, I don't believe anybody will touch the way PHPVibe interacts with FFMPEG, there is no global need.
What you need to do is figure what's up with your FFMPEG (using the tester is the best way since it outputs the ffmpeg errors to http://www.phpvibe.com/#requirements), I'm sure there is something small there in the path/command.
Or try another host? We still have for now that starter kit free hosting offer.

TheBritainTopic starter

I have a VPS with full access to Apache. There is no need for me to switch hosting. I will continue to try and get it to work. I will post the results if I am successful.
  •  

TheBritainTopic starter

Ok, running the tester had these results: (I ran the FFMPEG tester 3 times, with the three lines detailed in this file.)
http://www.phprevolution.com/installing-phpvibe/

The first long line, does not produce an error or a file.
The second line produces an MP4 with 0 bytes of data.
The third line produces an error log. The error reads:

[21-Aug-2014 04:18:23 America/Detroit] PHP Parse error:  syntax error, unexpected '"' in /home/ROOT/public_html/tester/ff.php on line 105
[21-Aug-2014 04:18:34 America/Detroit] PHP Parse error:  syntax error, unexpected '"' in /home/ROOT/public_html/tester/ff.php on line 105
  •  

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)