Quantcast
Channel: How-Tos - CumulusClips - Forums
Viewing all 16 articles
Browse latest View live

How-To: Videos Not Showing Up After Upload Fix

$
0
0
A common problem encountered by users using CumulusClips is when videos don't show up after being uploaded. The actual upload process succeeds without any issues, however after waiting for a while the video never shows up on your site.

Further investigation, by way of enabling 'Log Encoding' in the Admin Panel reveals some of these clues in your '/cc-core/logs/converter.log'

'Unable to connect to database'

or

<!DOCTYPE html>
<html>
<head>
<title>Page Not Found</title>
...

These symptoms indicate you're experiencing what we call the 'Alternate Location of PHP' or 'ALP' bug. This bug occurs because the default PHP binary detected by CumulusClips on your server was not CLI, most likely was PHP CGI or something else instead. These other PHP binaries do not behave properly in a command line environment, like that in which CumulusClips converts videos. This in turn leads to the problem you're having.

The solution luckily is pretty simple. You must find the alternate location of the PHP binary for use on the command line. If you're using one of these environments here are typical locations:

CumulusClips supported shared hosts: /usr/local/bin/php

Xamp on Linux: /opt/lampp/bin/php

Mamp on Mac: /Applications/MAMP/bin/php/phpx.x.x/bin/php

If you're not in any of these environments, then simply execute this from the command line:

whereis php

This should return the path(s) to any PHP binaries on your server. Next verify if its CLI compatible by exectuing the binary with the '-v' switch, i.e.:

/usr/local/bin/php -v

If the result of that command is something like this:

PHP 5.2.4 (cgi) (built: Apr 17 2009 14:31:37)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Notice the '(cgi)', then that binary is no good, however if the result contains '(cli)' instead then you've found the correct binary.

Once you found the alternate path to PHP, add it to the 'PHP Path' field located at: Admin Panel -> Settings -> Video and you should be all set.

How-To: Increase the Maximum Allowed Upload Filesize

$
0
0
In this how-to we're going to walk you through increasing the max upload filesize so that you may upload bigger files to your CumulusClips site. We're going to be using 500MB as our example.

First you need to adjust the PHP settings to make sure they allow your target upload size. It's always a good idea to set them slightly higher than what you anticipate uploading, in our case since we're expecting 500M files we're adjusting the settings to 550M. Here are the settings that need to be tweaked:

upload_max_filesize = 550M
post_max_size = 550M

Recommended:
max_execution_time = 3600
memory_limit = 550M

Typically these settings are adjusted in your php.ini file. You may need to contact your webhost to find out where you can make these changes.

Next you need to change the filesize limit within CumulusClips. This is done in the admin panel: Admin Panel -> Settings -> Video ->Video Site Limit. Change this to: 576716800. That value is in Bytes (576716800B = 550MB).

That's it! You may want to change the text that appears on the upload page that describes the upload limit. This is only text and won't affect the actual upload. This text is located in your language file: /cc-content/language/english.xml.

How-To: Create a Custom Theme by Copying the Default Theme

$
0
0
This is a quick write up on how to create a custom theme based on the default theme. This is useful in the event you want to make changes but don't want them overwritten or lost during the update process. For in depth information regarding themes, please refer to the article in our doc:

http://cumulusclips.org/docs/guide-to-cumulusclips-themes/

To create your custom theme follow these steps:

1) Navigate to the directory: /cc-content/themes.

2) Copy and paste the default theme folder. Give the new folder a valid URL friendly name.

3) Edit the theme.xml file in your new theme. Change the name and description. This is what appears in the Admin Panel.

4) Login and navigate to the Admin Panel -> Appearance -> Themes and activate your new theme.

5) Done! Now you can modify your theme to your liking and not worry about losing your changes during updates.

The steps above make a complete copy of the default theme. This isn't completely necessary, because CumulusClips uses a fallback approach to custom themes. You really only need to copy/create the specific template files you want to customize. The system will fallback to the default theme if it needs a file it cannot find in your theme. This is useful to keeping your themes small and not duplicating logic, but it is more advanced.

How-To: Move CumulusClips to Another Server

$
0
0
Moving your CumulusClips site to a new server is straightforward. To do so follow the steps outlined below:

1) Create a MySQL dump (SQL file) of your CumulusClips database. Be sure to include all tables and their content.
2) Copy all your files to the new location.
3) Import your MySQL dump created during step one into your new database.
4) Make the following directories writeable by PHP/Webserver
- /cc-core/logs
- /cc-content/uploads/flv
- /cc-content/uploads/mobile
- /cc-content/uploads/temp
- /cc-content/uploads/thumbs
- /cc-content/uploads/avatars
5) (Optional) Update your paths in the settings table if they changed. These are: base_url, ffmpeg, and php.

That's all there is to it! Be sure to verify your new server meets the requirements needed for CumulusClips to operate properly, see here http://cumulusclips.org/docs/requirements/.

How-To: Implement Video Quality Selector

$
0
0
This document describes how to implement a Video Quality Selector toggle on your video player. Since CC's MP4 settings already allow for two MP4 streams (a regular and a mobile one), why not allow the user on the default player theme to toggle between the two?

In my case, my regular videos are encoded at 1280 (720p) while the mobile-optimized version is encoded at 480p. To allow a switch to toggle between these two, do the following:

1. Copy https://raw.githubusercontent.com/dominic-p/videojs-resolution-selector/master/button-styles.css to {cc-home}/cc-content/themes/default/css/button-styles.css

2. Copy https://raw.githubusercontent.com/dominic-p/videojs-resolution-selector/master/video-quality-selector.js to {cc-home}/cc-content/themes/default/js/video-quality-selector.js

3. Edit {cc-home}/cc-content/themes/default/play.phtml and make the following modifications:

Change from:

<?php
$this->addMeta('videoId', $video->videoId);
$this->addMeta('theme', $this->options->themeUrl);
$this->addMeta('loggedIn', (boolean) $loggedInUser);
$this->addCss('video-js.css');
$this->addCss('jscrollpane.css');
$this->addJs('video.plugin.js');
$this->addJs('jscrollpane.plugin.js');
$this->addJs('mousewheel.plugin.js');
$this->setLayout('full');
?>


Change to:

<?php
$this->addMeta('videoId', $video->videoId);
$this->addMeta('theme', $this->options->themeUrl);
$this->addMeta('loggedIn', (boolean) $loggedInUser);
$this->addCss('video-js.css');
$this->addCss('button-styles.css');
$this->addCss('jscrollpane.css');
$this->addJs('video.plugin.js');
$this->addJs('video-quality-selector.js');
$this->addJs('jscrollpane.plugin.js');
$this->addJs('mousewheel.plugin.js');
$this->setLayout('full');
?>


Change from:

<!-- BEGIN VIDEO -->
<div id="player">
<video class="video-js vjs-default-skin" data-setup='{ "controls": true, "autoplay": true, "preload": "auto" }' width="600" height="337" poster="<?=$config->thumbUrl?>/<?=$video->filename?>.jpg">
<source src="<?=$config->h264Url?>/<?=$video->filename?>.mp4" type="video/mp4" />
<?php if ($webmEncodingEnabled): ?>
<source src="<?=$config->webmUrl?>/<?=$video->filename?>.webm" type="video/webm" />
<?php endif; ?>
<?php if ($theoraEncodingEnabled): ?>
<source src="<?=$config->theoraUrl?>/<?=$video->filename?>.ogg" type="video/ogg" />
<?php endif; ?>
</video>
</div>
<!-- END VIDEO -->


Change to:

<!-- BEGIN VIDEO -->
<div id="player">
<video class="video-js vjs-default-skin" data-setup='{ "plugins" : { "resolutionSelector" : { "default_res" : "720" } }, "controls": true, "autoplay": true, "preload": "auto" }' width="600" height="337" poster="<?=$config->thumbUrl?>/<?=$video->filename?>.jpg">
<source src="<?=$config->h264Url?>/<?=$video->filename?>.mp4" type="video/mp4" data-res="720"/>
<source src="<?=$config->mobileUrl?>/<?=$video->filename?>.mp4" type="video/mp4" data-res="480"/>
<?php if ($webmEncodingEnabled): ?>
<source src="<?=$config->webmUrl?>/<?=$video->filename?>.webm" type="video/webm" />
<?php endif; ?>
<?php if ($theoraEncodingEnabled): ?>
<source src="<?=$config->theoraUrl?>/<?=$video->filename?>.ogg" type="video/ogg" />
<?php endif; ?>
</video>
</div>
<!-- END VIDEO -->



Note: Video.JS Resolution Selector Copyright by Dominic and licensed via MIT License (opensource): https://github.com/dominic-p/videojs-resolution-selector

How-To: Use Static FFMPEG Build With CumulusClip

$
0
0
1) Visit: http://johnvansickle.com/ffmpeg/

2) Download the appropriate "release" file archive for your server (32bit vs 64bit).

3) Extract the downloaded archive

4) Find the plain "ffmpeg" file in the archive you just extracted.

5) Upload the ffmpeg file to the location: /cc-core/system. The other files in the archive are not needed.

6) Go to: Admin Panel -> Settings -> Video

7) Update your FFMPEG path value to the full absolute path to the FFMPEG file you just uploaded.

Your new ffmpeg path should now be something like this: /home/mysite/public_html/cc-core/system/ffmpeg

How-To: Fix 404 Error on Every Page

$
0
0

A common issue is that user's will receive "404 Page Not Found" errors when navigating several pages on their CumulusClips site. Yet, the Admin Panel works fine. There are a couple known causes for this issue.

First Possible Cause

You are probably missing the ".htaccess" file.

Solution

Make sure you have the ".htaccess" file located at the root of the script. It is a hidden file. If the file is missing from your web server, you'll need to re-uploaded. It is provided in the CumulusClips archive you downloaded.

This happens when you perform "mv", "cp", or similar from the command line which doesn't automatically move hidden files.

Second Possible Cause

You instance of Apache doesn't have URL rewrites enabled or even installed.

Solution

Make sure the "mod_rewrite" module is enabled in the Apache config and the vhost configuration for your site has the "AllowOverride" setting is set to "All". If you're using a shared web host, they can help you with this.

How to use CumulusClips with Nginx

$
0
0
I've seen requests for Nginx server configs rather than Apache and although it's not *officially* supported, it does work just fine with Nginx so I thought I'd write a little how to.

This guide is for Debian and its derivatives but can be very easily adapted depending on your Linux flavour.

For your reference, the general installation guide for CumulusClips is here:
http://cumulusclips.org/docs/installation/

Let's begin!

Note:
This guide presumes you have installed and setup Nginx, MySQL and PHP-FPM as well as the "PHP Modules" and "PHP Settings" from the CumulusClips guide above.
If you have not, you can follow this guide here, up to step 6 then continue with this guide.
https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04

1. Edit your default Nginx config file, or create a new one. sudo nano /etc/nginx/sites-available/default

Presuming your CumulusClips is extracted to:
"/var/www/html/cumulusclips"
and your domain name is: "example.com" redirecting to "www.example.com".
Using the following config, change 'server_name' and 'root' where needed.

server {
listen 80;
server_name example.com;
return 301 http://www.example.com$request_uri;
}

server {
listen 80;
server_name www.example.com;

client_max_body_size 2048M;

root /var/www/html/cumulusclips;
index index.php index.html index.htm default.html default.htm;

location / {
try_files $uri $uri/ /index.php?q=$uri&$args =404;
}


location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
include fastcgi_params;
fastcgi_param HTTPS on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}


"client_max_body_size 2048M;" means a 2GB limit per file upload.
Changes to this will also need to be reflected in the php-fpm's "php.ini" file.
See the "PHP Settings" paragraph from http://cumulusclips.org/docs/requirements/ and also the "PHP Requirements" will need to be fulfilled.

Once saved, run sudo service nginx restart.
It should now be working with Nginx and no Apache to be seen! :)


How-To: Videos Not Showing Up After Upload Fix

$
0
0
A common problem encountered by users using CumulusClips is when videos don't show up after being uploaded. The actual upload process succeeds without any issues, however after waiting for a while the video never shows up on your site.

Further investigation, by way of enabling 'Log Encoding' in the Admin Panel reveals some of these clues in your '/cc-core/logs/converter.log'

'Unable to connect to database'

or

<!DOCTYPE html>
<html>
<head>
<title>Page Not Found</title>
...

These symptoms indicate you're experiencing what we call the 'Alternate Location of PHP' or 'ALP' bug. This bug occurs because the default PHP binary detected by CumulusClips on your server was not CLI, most likely was PHP CGI or something else instead. These other PHP binaries do not behave properly in a command line environment, like that in which CumulusClips converts videos. This in turn leads to the problem you're having.

The solution luckily is pretty simple. You must find the alternate location of the PHP binary for use on the command line. If you're using one of these environments here are typical locations:

CumulusClips supported shared hosts: /usr/local/bin/php

Xamp on Linux: /opt/lampp/bin/php

Mamp on Mac: /Applications/MAMP/bin/php/phpx.x.x/bin/php

If you're not in any of these environments, then simply execute this from the command line:

whereis php

This should return the path(s) to any PHP binaries on your server. Next verify if its CLI compatible by exectuing the binary with the '-v' switch, i.e.:

/usr/local/bin/php -v

If the result of that command is something like this:

PHP 5.2.4 (cgi) (built: Apr 17 2009 14:31:37)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Notice the '(cgi)', then that binary is no good, however if the result contains '(cli)' instead then you've found the correct binary.

Once you found the alternate path to PHP, add it to the 'PHP Path' field located at: Admin Panel -> Settings -> Video and you should be all set.

How-To: Increase the Maximum Allowed Upload Filesize

$
0
0
In this how-to we're going to walk you through increasing the max upload filesize so that you may upload bigger files to your CumulusClips site. We're going to be using 500MB as our example.

First you need to adjust the PHP settings to make sure they allow your target upload size. It's always a good idea to set them slightly higher than what you anticipate uploading, in our case since we're expecting 500M files we're adjusting the settings to 550M. Here are the settings that need to be tweaked:

upload_max_filesize = 550M
post_max_size = 550M

Recommended:
max_execution_time = 3600
memory_limit = 550M

Typically these settings are adjusted in your php.ini file. You may need to contact your webhost to find out where you can make these changes.

Next you need to change the filesize limit within CumulusClips. This is done in the admin panel: Admin Panel -> Settings -> Video ->Video Site Limit. Change this to: 576716800. That value is in Bytes (576716800B = 550MB).

That's it! You may want to change the text that appears on the upload page that describes the upload limit. This is only text and won't affect the actual upload. This text is located in your language file: /cc-content/language/english.xml.

How-To: Create a Custom Theme by Copying the Default Theme

$
0
0
This is a quick write up on how to create a custom theme based on the default theme. This is useful in the event you want to make changes but don't want them overwritten or lost during the update process. For in depth information regarding themes, please refer to the article in our doc:

http://cumulusclips.org/docs/guide-to-cumulusclips-themes/

To create your custom theme follow these steps:

1) Navigate to the directory: /cc-content/themes.

2) Copy and paste the default theme folder. Give the new folder a valid URL friendly name.

3) Edit the theme.xml file in your new theme. Change the name and description. This is what appears in the Admin Panel.

4) Login and navigate to the Admin Panel -> Appearance -> Themes and activate your new theme.

5) Done! Now you can modify your theme to your liking and not worry about losing your changes during updates.

The steps above make a complete copy of the default theme. This isn't completely necessary, because CumulusClips uses a fallback approach to custom themes. You really only need to copy/create the specific template files you want to customize. The system will fallback to the default theme if it needs a file it cannot find in your theme. This is useful to keeping your themes small and not duplicating logic, but it is more advanced.

How-To: Move CumulusClips to Another Server

$
0
0
Moving your CumulusClips site to a new server is straightforward. To do so follow the steps outlined below:

1) Create a MySQL dump (SQL file) of your CumulusClips database. Be sure to include all tables and their content.
2) Copy all your files to the new location.
3) Import your MySQL dump created during step one into your new database.
4) Make the following directories writeable by PHP/Webserver
- /cc-core/logs
- /cc-content/uploads/flv
- /cc-content/uploads/mobile
- /cc-content/uploads/temp
- /cc-content/uploads/thumbs
- /cc-content/uploads/avatars
5) (Optional) Update your paths in the settings table if they changed. These are: base_url, ffmpeg, and php.

That's all there is to it! Be sure to verify your new server meets the requirements needed for CumulusClips to operate properly, see here http://cumulusclips.org/docs/requirements/.

How-To: Implement Video Quality Selector

$
0
0
This document describes how to implement a Video Quality Selector toggle on your video player. Since CC's MP4 settings already allow for two MP4 streams (a regular and a mobile one), why not allow the user on the default player theme to toggle between the two?

In my case, my regular videos are encoded at 1280 (720p) while the mobile-optimized version is encoded at 480p. To allow a switch to toggle between these two, do the following:

1. Copy https://raw.githubusercontent.com/dominic-p/videojs-resolution-selector/master/button-styles.css to {cc-home}/cc-content/themes/default/css/button-styles.css

2. Copy https://raw.githubusercontent.com/dominic-p/videojs-resolution-selector/master/video-quality-selector.js to {cc-home}/cc-content/themes/default/js/video-quality-selector.js

3. Edit {cc-home}/cc-content/themes/default/play.phtml and make the following modifications:

Change from:

<?php
$this->addMeta('videoId', $video->videoId);
$this->addMeta('theme', $this->options->themeUrl);
$this->addMeta('loggedIn', (boolean) $loggedInUser);
$this->addCss('video-js.css');
$this->addCss('jscrollpane.css');
$this->addJs('video.plugin.js');
$this->addJs('jscrollpane.plugin.js');
$this->addJs('mousewheel.plugin.js');
$this->setLayout('full');
?>


Change to:

<?php
$this->addMeta('videoId', $video->videoId);
$this->addMeta('theme', $this->options->themeUrl);
$this->addMeta('loggedIn', (boolean) $loggedInUser);
$this->addCss('video-js.css');
$this->addCss('button-styles.css');
$this->addCss('jscrollpane.css');
$this->addJs('video.plugin.js');
$this->addJs('video-quality-selector.js');
$this->addJs('jscrollpane.plugin.js');
$this->addJs('mousewheel.plugin.js');
$this->setLayout('full');
?>


Change from:

<!-- BEGIN VIDEO -->
<div id="player">
<video class="video-js vjs-default-skin" data-setup='{ "controls": true, "autoplay": true, "preload": "auto" }' width="600" height="337" poster="<?=$config->thumbUrl?>/<?=$video->filename?>.jpg">
<source src="<?=$config->h264Url?>/<?=$video->filename?>.mp4" type="video/mp4" />
<?php if ($webmEncodingEnabled): ?>
<source src="<?=$config->webmUrl?>/<?=$video->filename?>.webm" type="video/webm" />
<?php endif; ?>
<?php if ($theoraEncodingEnabled): ?>
<source src="<?=$config->theoraUrl?>/<?=$video->filename?>.ogg" type="video/ogg" />
<?php endif; ?>
</video>
</div>
<!-- END VIDEO -->


Change to:

<!-- BEGIN VIDEO -->
<div id="player">
<video class="video-js vjs-default-skin" data-setup='{ "plugins" : { "resolutionSelector" : { "default_res" : "720" } }, "controls": true, "autoplay": true, "preload": "auto" }' width="600" height="337" poster="<?=$config->thumbUrl?>/<?=$video->filename?>.jpg">
<source src="<?=$config->h264Url?>/<?=$video->filename?>.mp4" type="video/mp4" data-res="720"/>
<source src="<?=$config->mobileUrl?>/<?=$video->filename?>.mp4" type="video/mp4" data-res="480"/>
<?php if ($webmEncodingEnabled): ?>
<source src="<?=$config->webmUrl?>/<?=$video->filename?>.webm" type="video/webm" />
<?php endif; ?>
<?php if ($theoraEncodingEnabled): ?>
<source src="<?=$config->theoraUrl?>/<?=$video->filename?>.ogg" type="video/ogg" />
<?php endif; ?>
</video>
</div>
<!-- END VIDEO -->



Note: Video.JS Resolution Selector Copyright by Dominic and licensed via MIT License (opensource): https://github.com/dominic-p/videojs-resolution-selector

How-To: Use Static FFMPEG Build With CumulusClip

$
0
0
1) Visit: http://johnvansickle.com/ffmpeg/

2) Download the appropriate "release" file archive for your server (32bit vs 64bit).

3) Extract the downloaded archive

4) Find the plain "ffmpeg" file in the archive you just extracted.

5) Upload the ffmpeg file to the location: /cc-core/system. The other files in the archive are not needed.

6) Go to: Admin Panel -> Settings -> Video

7) Update your FFMPEG path value to the full absolute path to the FFMPEG file you just uploaded.

Your new ffmpeg path should now be something like this: /home/mysite/public_html/cc-core/system/ffmpeg

How-To: Fix 404 Error on Every Page

$
0
0

A common issue is that user's will receive "404 Page Not Found" errors when navigating several pages on their CumulusClips site. Yet, the Admin Panel works fine. There are a couple known causes for this issue.

First Possible Cause

You are probably missing the ".htaccess" file.

Solution

Make sure you have the ".htaccess" file located at the root of the script. It is a hidden file. If the file is missing from your web server, you'll need to re-uploaded. It is provided in the CumulusClips archive you downloaded.

This happens when you perform "mv", "cp", or similar from the command line which doesn't automatically move hidden files.

Second Possible Cause

You instance of Apache doesn't have URL rewrites enabled or even installed.

Solution

Make sure the "mod_rewrite" module is enabled in the Apache config and the vhost configuration for your site has the "AllowOverride" setting is set to "All". If you're using a shared web host, they can help you with this.


How to use CumulusClips with Nginx

$
0
0
I've seen requests for Nginx server configs rather than Apache and although it's not *officially* supported, it does work just fine with Nginx so I thought I'd write a little how to.

This guide is for Debian and its derivatives but can be very easily adapted depending on your Linux flavour.

For your reference, the general installation guide for CumulusClips is here:
http://cumulusclips.org/docs/installation/

Let's begin!

Note:
This guide presumes you have installed and setup Nginx, MySQL and PHP-FPM as well as the "PHP Modules" and "PHP Settings" from the CumulusClips guide above.
If you have not, you can follow this guide here, up to step 6 then continue with this guide.
https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04

1. Edit your default Nginx config file, or create a new one. sudo nano /etc/nginx/sites-available/default

Presuming your CumulusClips is extracted to:
"/var/www/html/cumulusclips"
and your domain name is: "example.com" redirecting to "www.example.com".
Using the following config, change 'server_name' and 'root' where needed.

server {
listen 80;
server_name example.com;
return 301 http://www.example.com$request_uri;
}

server {
listen 80;
server_name www.example.com;

client_max_body_size 2048M;

root /var/www/html/cumulusclips;
index index.php index.html index.htm default.html default.htm;

location / {
try_files $uri $uri/ /index.php?q=$uri&$args =404;
}


location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
include fastcgi_params;
fastcgi_param HTTPS on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}


"client_max_body_size 2048M;" means a 2GB limit per file upload.
Changes to this will also need to be reflected in the php-fpm's "php.ini" file.
See the "PHP Settings" paragraph from http://cumulusclips.org/docs/requirements/ and also the "PHP Requirements" will need to be fulfilled.

Once saved, run sudo service nginx restart.
It should now be working with Nginx and no Apache to be seen! :)

Viewing all 16 articles
Browse latest View live