• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Auto Video Convertion, Thumbnail Generating and Subtitle Upload Plugin - PHPVibe

Started by sanishan,

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

sanishanTopic starter

What is this plugin for?

Just like you are running a video sharing portal, users upload the videos on your website, but the problem is default phpvibe script don't generate the video thumbnail, or fetch the duration of video also did not convert video into Mp4 (PC and Mobile Friendly Format).

If someone upload the FLV,WMV, AVI or MOV (etc) files? it's did not support by most of Smartphone like (iPhone etc). you have to convert into Mp4 and then re-uploading the file again, but with this script/module/plugin you don't have to worry about anything everything is running automatically,

Another Cool feature is user could easily add the video subtitle while uploading the video :)

Feature:

   

  • Completely Automatic
  •     Control Video Height and Width from Control Panel.
  •     Use single FFMPEG module to run No other tools required to run like FLVTOOL, MPlayer etc.
  •     Framerate could be control from Control Panel.
  •     Support Shared hosting (If your hosing provider enabled the ffmpeg plugin)
  •     Convert most of video type into Mp4 and Allow to run on Smart-Mobile, Tablet and PC as well.
  •     Generate Thumbnail on the Fly
  •     Calculate the video length on the fly.
  •     Remove the Original Video after conversion, only converted video will be available, this will give you extra space to upload more videos :)
  •     in most of case reduce the  upload video size without disturbing the video quality.
  •     Support Subtitle upload while upload video
  •     Subtitle support on FlowPlayer, jwplayer 5 and jwplayer 6
  •     Convert video automatically by using cronjob (set XX minute as per you requirement)
  •     Complete documentation included with purchase.




Requirements:

    Linux OS or WIndows OS Server
    Apache
    PHP 5.3+
        PCRE( Perl-Compatible )
    PhpVibe 3.3  Rc2
    VPS or Dedicated Server (Shared hosting if FFMPEG module installed by the hosting provider).
    FFMPEG
    Compile With Video and Audio Codec (Video Coded Recommended x264)
    shell_exec and Exec must be enable
    safe_mode Off
    Cron Job Access to run conversions Script ever XX minute



Installing the FFMPEG on Ubuntu and Centos Server Guide

    https://trac.ffmpeg.org/wiki/UbuntuCompilationGuide
    https://trac.ffmpeg.org/wiki/CentosCompilationGuide (Centos 6.x / These instructions should also work for recent Red Hat Enterprise Linux (RHEL) and Fedora.)

FFmpeg for Windows Exe (Binary) file could be download from the ffmpeg official website.

Script inlcude with 1 year free updates, for lifetime purchase from extra


Price: 17.95€
Buy Now
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

sanishanTopic starter

Module/Plugin on Discount for limited time only.

New Price
17.95€ 11.99 with Free Lifetime Update
Offer Expire:
28-Oct-2013
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

sanishanTopic starter

FAQ:

1. Did this script support Chines, Russian, or french (etc) languages subtitle:
A. Right know only English Subtitle option available, In next update i will add more subtitle language support.

2. Did we change subtitle after upload?

A. Right know there is no option available, maybe in next update I will add this support.

3. What is video thumbnail size?

A. Default thumbnail size is: 320x240 but you could change it from upload.php file

4. Did this script automatically convert video after upload?
A. Yes if you set the cron job correctly, and cron job only convert video at a time, even its run 100's of time during the conversion , until first conversion finish next can't be start, this will help you to reduce the server load.

5. Did this support Mac Os?

A. I did not test it in Mac Os, Because i don't have, if you able to install the PHPVibe on Mac Server and its work then you have to install the ffmpeg on Mac so this will be work..

6. What is the screenshot/thumbnail image format ?
A. Default format is PNG (We recommend PNG) due to high quality and low space usage.

7. Sometime Plugin can't generate the thumbnail why is that?

A. In most of case ffmpeg unable to recognized the format or the video is broken.

8. What is the DEMO site?
http://taaji.com/upload-video.htm You have to register before testing.

If you want to know anything about the module or you are not understand the concept please let me know, i will help you with it.

Thanks,
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

mastodon

Hey there sanishan... some of us here will have problem with server storage... so we might use the option to host the videos on another server and add them via the admin panel as ( Remote Videos ). My question is, are you going to implement any soon an option to add subtitles for the videos stored on an external server?
  •  

sanishanTopic starter

Quote from: mastodon on
Hey there sanishan... some of us here will have problem with server storage... so we might use the option to host the videos on another server and add them via the admin panel as ( Remote Videos ). My question is, are you going to implement any soon an option to add subtitles for the videos stored on an external server?

Maybe I will create separate multi server module for video converssion (its required FTP), first its upload the video to your server and its converted into mp4, then we move to the other server.

This is the only possible way for me i could do that,

Thanks,
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

mastodon

That could be an option! i'm looking forward on that. Btw, i sent you an inquiry via your contact us page. could you answer me to that please?
  •  

sanishanTopic starter

Quote from: mastodon on
That could be an option! i'm looking forward on that. Btw, i sent you an inquiry via your contact us page. could you answer me to that please?

Hi Sir!

some how my server did not send me the email from few hours, i just fixed the issue, please send me email using website again or PM me the email address i will contact you right away.

Thanks,
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

mastodon

  •  

sanishanTopic starter

Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

mastodon

hey there sanishan, I've ordered an hour ago the video conversion module and paid for it but i'm not able to download it, and my order has been marked as canceled... Do you have any news on that?
  •  

sanishanTopic starter

Quote from: mastodon on
hey there sanishan, I've ordered an hour ago the video conversion module and paid for it but i'm not able to download it, and my order has been marked as canceled... Do you have any news on that?

Thanks for your Purchase,
your order has been marked as complete, please download the plugin from My Account -> Downloads

Thanks,
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

mastodon

Hey there sanishan. I've configured the module and i must say, great work! Althogh I'm facing some troubles here.

If I upload small videos everything works as a charm, but when uploading videos with sizes 300 MB or 1500 MB after uploading 60 MB the uploader resets itself, tries to upload the file again and then fails.

I must say that i have ffmpeg installed and successfully configured the conversion module with the correct paths
/usr/bin/ffmpeg
and
/usr/local/bin/php
.

I've also configured the following php values globally on the server and not just for 1 user:

php_value post_max_size 3072M
php_value upload_max_filesize 3072M
php_value max_execution_time 25000
php_value max_input_time 25000

The only errors i get on my error_log file are the following:

[22-Oct-2013 20:58:14 Europe/Bucharest] PHP Warning:  session_regenerate_id(): Cannot regenerate session id - headers already sent in /home/megaseri/public_html/lib/functions.user.php on line 248
[22-Oct-2013 20:58:14 Europe/Bucharest] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/megaseri/public_html/lib/class.upload.php:1) in /home/megaseri/public_html/lib/functions.user.php on line 270
[22-Oct-2013 20:58:14 Europe/Bucharest] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/megaseri/public_html/lib/class.upload.php:1) in /home/megaseri/public_html/lib/functions.php on line 21
shared object file: No such file or directory in Unknown on line 0
[22-Oct-2013 20:58:26 Europe/Bucharest] PHP Warning:  session_regenerate_id(): Cannot regenerate session id - headers already sent in /home/megaseri/public_html/lib/functions.user.php on line 248
[22-Oct-2013 20:58:26 Europe/Bucharest] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/megaseri/public_html/lib/class.upload.php:1) in /home/megaseri/public_html/lib/functions.user.php on line 270
[22-Oct-2013 20:58:26 Europe/Bucharest] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/megaseri/public_html/lib/class.upload.php:1) in /home/megaseri/public_html/lib/functions.php on line 21



and the ffmpeg and php version are the following:

PHP
PHP 5.4.19 (cli) (built: Sep  2 2013 17:21:59)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd.


and FFMPEG:

FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
  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
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
FFmpeg 0.6.5
libavutil     50.15. 1 / 50.15. 1
libavcodec    52.72. 2 / 52.72. 2
libavformat   52.64. 2 / 52.64. 2
libavdevice   52. 2. 0 / 52. 2. 0
libavfilter    1.19. 0 /  1.19. 0
libswscale     0.11. 0 /  0.11. 0
libpostproc   51. 2. 0 / 51. 2. 0
  •  

sanishanTopic starter

Did you edit the code files?

Its not the plugin problem, because plugin files did not edit the, functions.php, functions.user.php or class.upload.php file

"headers already sent" means that you have echoed before starting session or before setting header param. So be carefull echoing(or print) that where are you doing it.
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

sanishanTopic starter

Quote from: mastodon on
Hey there sanishan. I've configured the module and i must say, great work! Althogh I'm facing some troubles here.

If I upload small videos everything works as a charm, but when uploading videos with sizes 300 MB or 1500 MB after uploading 60 MB the uploader resets itself, tries to upload the file again and then fails.


Hi by default file size limit is 3gb by phpvibe,

There is must something wrong with the php config,

php_value post_max_size 3072M
php_value upload_max_filesize 3072M
php_value max_execution_time 25000
php_value max_input_time 25000

In most of server configuration it's only allow only directory where you upload the htaccess file,

Directly edit the php.ini file and restart you apache,

Thanks,
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

Marius P.

Remove this:

session_regenerate_id(); 



from functions.user.php and all those errors will go away.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

mastodon

For the guys that may encounter issues with the videos not starting instantly after pushing the play button here's a workaround:

replace the following line in vid_ffmpeg.php:

$ffmpeg_cmd="$ffmpeg_path -y -i $media -r $ffmpeg_framerate -s $ffmpeg_scale -vcodec h264 $output_final 2<&1";


with:

$ffmpeg_cmd="$ffmpeg_path -y -i $media -r $ffmpeg_framerate -s $ffmpeg_scale -vcodec h264 -movflags faststart $output_final 2<&1";


The
-movflags faststart
what really does is move the MP4 container's MOOV atom to the beginning. This atom (in essence, a unit of data in the MP4 container) usually contains important metadata about the video/audio streams themselves. By moving the MOOV atom at the beggining of the MP$ container the player will know how to play the video file before downloading it 100% on the player.

I posted this workaround because i wasted tonight like 6 hours trying to findout why the videos werent playing.

Sanishan, you're free to integrate this workaround if somebody else faces the same issue as i did. :)
  •  

sanishanTopic starter

Quote from: mastodon on
For the guys that may encounter issues with the videos not starting instantly after pushing the play button here's a workaround:

replace the following line in vid_ffmpeg.php:

$ffmpeg_cmd="$ffmpeg_path -y -i $media -r $ffmpeg_framerate -s $ffmpeg_scale -vcodec h264 $output_final 2<&1";


with:

$ffmpeg_cmd="$ffmpeg_path -y -i $media -r $ffmpeg_framerate -s $ffmpeg_scale -vcodec h264 -movflags faststart $output_final 2<&1";


The
-movflags faststart
what really does is move the MP4 container's MOOV atom to the beginning. This atom (in essence, a unit of data in the MP4 container) usually contains important metadata about the video/audio streams themselves. By moving the MOOV atom at the beggining of the MP$ container the player will know how to play the video file before downloading it 100% on the player.

I posted this workaround because i wasted tonight like 6 hours trying to findout why the videos werent playing.

Sanishan, you're free to integrate this workaround if somebody else faces the same issue as i did. :)

Honestly i was thinking about that its was my Flash Plugin problem, Thanks for solving this problem.
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

mastodon

Glad i could help :). there are two ways of doing this... one with MP4Box and this one... i've integrated this one since it was the easier one to do.


The other one needs more parameters to be included, it need to execute an additional command after the video is beeing converted... change names and stuff... and besides all that you'd need to add the MP4Box path to the ACP.
  •  

sanishanTopic starter

Quote from: mastodon on
Glad i could help :). there are two ways of doing this... one with MP4Box and this one... i've integrated this one since it was the easier one to do.


The other one needs more parameters to be included, it need to execute an additional command after the video is beeing converted... change names and stuff... and besides all that you'd need to add the MP4Box path to the ACP.

Yes i have just read about the MP4Box, as you said its use extra command, Right know FFMPEG cover our requirements,

Thanks,
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

mastodon

now there are a couple of issues i'd like to discuss with you sanishan.

First: It appears that if a user uploads a mp4 file directly we're running on the same issue as before ( the video won't play unless it has been buffered at 100% on the player ) because the conversion script skips the conversion if the file extension is mp4. We would need to re-convert those files even if  user uploads a mp4 file in order for it to be played as soon as 1 MB is buffered.

The second issue is: I can see that for videos 720-1080 it takes a lot for the ffmpeg to convert ( example: 720p video with a size of 400MB it takes 1 hour- 1 hour and 10 minutes to convert on a i7 8 cores CPU at 2,80 GHz and with 12 GB of ram.

Isnt there a way that we could speed that up a bit?
  •  

sanishanTopic starter

Quote from: mastodon on
now there are a couple of issues i'd like to discuss with you sanishan.

First: It appears that if a user uploads a mp4 file directly we're running on the same issue as before ( the video won't play unless it has been buffered at 100% on the player ) because the conversion script skips the conversion if the file extension is mp4. We would need to re-convert those files even if  user uploads a mp4 file in order for it to be played as soon as 1 MB is buffered.

The second issue is: I can see that for videos 720-1080 it takes a lot for the ffmpeg to convert ( example: 720p video with a size of 400MB it takes 1 hour- 1 hour and 10 minutes to convert on a i7 8 cores CPU at 2,80 GHz and with 12 GB of ram.

Isnt there a way that we could speed that up a bit?

No.. There is no way you could make it fast, I did not find a way, even i test lot of other desktop Software (Sony Vegas, After Effect, Any Video Convertor, Xilisoft Video Converter and so on, none of them convert quickly on MY PC (i7 16GB) its take nearly 40-80 Min for 500MB MOV to Mp4 h264 compatible.

Thanks,
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

mastodon

what about this issue?

Quote from: mastodon on
First: It appears that if a user uploads a mp4 file directly we're running on the same issue as before ( the video won't play unless it has been buffered at 100% on the player ) because the conversion script skips the conversion if the file extension is mp4. We would need to re-convert those files even if  user uploads a mp4 file in order for it to be played as soon as 1 MB is buffered.
  •  

sanishanTopic starter

Quote from: mastodon on
what about this issue?


To re-encode the mp4 video

open com/com_share.php

Find:
if ($ext!='mp4'){

$db->query("INSERT INTO `video_q` (`id` ,`video_id`) VALUES (NULL, '".toDb($vid_unique)."')");
$render=1;

} else {
$render=0;
}


Replace with

$db->query("INSERT INTO `video_q` (`id` ,`video_id`) VALUES (NULL, '".toDb($vid_unique)."')");
$render=1;


This will allow mp4 video to re-encode.

If you have installed the MP4Box on your server, you just need to add the meta data only.

Please open /vid_ffmpeg.php

Find:  (maybe on line 72-73)
$ffmpeg_cmd="$ffmpeg_path -y -i $media -r $ffmpeg_framerate -s $ffmpeg_scale -vcodec h264 -movflags faststart $output_final 2<&1";
exec($ffmpeg_cmd,$outx);


Replace with:

$ext=$path_parts['extension'];
      if ($ext!='mp4'){
      
      $ffmpeg_cmd="$ffmpeg_path -y -i $media -r $ffmpeg_framerate -s $ffmpeg_scale -vcodec h264 -movflags faststart $output_final 2<&1";
      } else {
          $ffmpeg_cmd="MP4Box -isma $media"; // please put the mp4box path.
      }
Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

mastodon

hey sanishan, did you tested those modifications? it doesn't appear to be working on my end at least not the MP4Box one.
  •  

sanishanTopic starter

Quote from: mastodon on
hey sanishan, did you tested those modifications? it doesn't appear to be working on my end at least not the MP4Box one.

I have tested few of my Mp4 with MP4Box some of work but some of not work.. i don't know why, but I am not good Mp4Box.

Try ffmpeg converstion insted for mp4box.

Just simple replace the
$ext=$path_parts['extension'];
      if ($ext!='mp4'){
      
      $ffmpeg_cmd="$ffmpeg_path -y -i $media -r $ffmpeg_framerate -s $ffmpeg_scale -vcodec h264 -movflags faststart $output_final 2<&1";
      } else {
          $ffmpeg_cmd="MP4Box -isma $media"; // please put the mp4box path.
      }


with
$ffmpeg_cmd="$ffmpeg_path -y -i $media -r $ffmpeg_framerate -s $ffmpeg_scale -vcodec h264 -movflags faststart $output_final 2<&1";
     


Free PHPVibe Professional Customized Plugin http://phpvibemod.com/
  •  

Similar topics (7)