1

Trying to upload mp4 video. It is uploaded successfully - I can see it on the server.

But success page remains with process animation, and video is not avalable. It has in_process=1 in database (phpfox_video). Also the big problem that I cant see converting log, there even now such file in file/log, so I dont even know system does converting video or not.

Also I have one error in FireBug

ReferenceError: tb_show is not defined

Please help!

  • tb_show is a JS function, is that the first JS error that you have in your console panel? I would also check the server logs for the conversion, there are often problems with converting videos since there are thousands of combinations for codecs and whatnot – Purefan May 13 '14 at 09:35
  • Tnx for reply, but as I told before I cant see any logs for conversion. This is a JS function it is true, and error fires only when upload is ended. tb_show - thickbox.js function, and the script is there. – user3223195 May 13 '14 at 09:43
  • make sure you [enabled debug mode](http://www.phpfox.com/kb/article/138/enabling-debug-mode/) and then check the video log file in the folder /file/log/ .It sounds like you have 2 issues or that the JS one is caused by a problem when converting the video. – Purefan May 13 '14 at 10:08

2 Answers2

0

Well the solution for my problem is next: File: module/video/include/component/controller/frame.class.php Comment out about line 124

//Phpfox::getLib('ajax')->alert(Phpfox::getLib('image.helper')->display(array('theme' => 'ajax/add.gif', 'class' => 'v_middle')) . ' Your video has successfully been uploaded. Please standby while we convert your video.', ' Converting Video', 600);

And about 134

//echo 'window.parent.' . str_replace('$.ajaxBox', 'window.parent.$.ajaxBox', $sAlert);     

Now it works, but problem with tb_show is still there.

  • Editing the source code voids the warranty and access to support. This may hide the error but it does not fix the problem. If I were you I would get the response from the ajax request and paste it in the JS console to debug why it gives an error – Purefan May 14 '14 at 11:17
0

Your problem is not the upload. The problem is the conversion. If you dont setup properly 3 parameters then its not going to convert the file to FLV, format used by PHPFOX V3. Here I will explain you what is the procedure since I have done it succesfully.

If you control your server, meaning that is hosted by you, or you have it with a VPS, then you can test your FFFMPEG and MEMCODER that you need to convert those files to the apropiate format, PHPFOX needs to convert and process your video files. I have messed with it on the command shell prompt before, using dummy files to test. After it worked, I inserted those parameters on the setup admin panel. After a while I got it working to suit PHPFOX V3. Make sure you enable FLVTOOLS also. Remember, if it does not work on shell prompt on your server, there is no way is going to work on the setup of PHPFOX. The settings I came up with finally are listed below. Another issue, the player used in that version PHPFOX V3, is FLOWPLAYER, it only plays FLV files (flash enabled browsers) and is limited to browsers that uses Flash. Forget about Androids or iPhones, unless you use PUFFIN or any other flash enabled browser. I hope my settings work on your server. It depends really on your server setup and those 3 utilities below. If you have any problems, let me know. Its a tricky setup but its possible to change the player to a HTML5 format so you dont have to mess with Flash FLV files and formats any more. Remember, these parameters could change from server to server version of the utilities installed.

FLVTOOLS: -U {destination}

FFMPEG : -i {source} -ar 44100 -vcodec libx264 {destination}

MENCODER: {source} -o {destination} -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:last_pred=3 -vf scale={width}:{height}

ALSO MAKE SURE YOU HAVE MP4 format listed on the code below otherwise it will not process your MP4 file. To include that format (or any other) in the list of available formats for convertion, on my version I had to modify to accept celular formats such as '3gpp' => 'video/mp4'... good luck!!

The file you need to modify is located here: //yourdomain/module/video/include/service/video.class.php

class Video_Service_Video extends Phpfox_Service
{
private $_aExt = array(
'mpg' => 'video/mpeg',
'mpeg' => 'video/mpeg',
'wmv' => 'video/x-ms-wmv',  
'avi' => 'video/avi',
'mov' => 'video/quicktime',
'flv' => 'video/x-flv',
'mp4' => 'video/mp4',
'3gpp' => 'video/mp4'
);
Luis H Cabrejo
  • 302
  • 1
  • 8