How to install CumulusClips on Ubuntu Server 20.04 LTS

Post Reply
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

How to install CumulusClips on Ubuntu Server 20.04 LTS

Post: # 924Post LHammonds »

Greetings and salutations,

I hope this thread will be helpful to those who follow in my foot steps as well as getting any advice based on what I have done / documented.

To discuss this thread, please participate here: Ubuntu Forums

High-level overview

This thread will cover installation of a dedicated Ubuntu web server. CumulusClips is a video sharing script that allows you to start your own YouTube-like video website where users can upload, rate and comment on videos. The server will be installed inside a virtual machine in vSphere running on ESXi servers. Notes will also be supplied for doing the same thing for VirtualBox on a Windows 10 PC. Although there are some VMware-specific and VirtualBox-specific steps, they are very few and the majority of this documentation will work for other Virtual Machines or even directly installed onto a physical machine (e.g. bare-metal install). If you have any advice on doing things better, please let me know by replying on the Ubuntu forums link above.

Tools utilized in this process
Helpful links

The list below are sources of information that was helpful in the creation of this document.
Assumptions

This documentation will need to make use of some very-specific information that will most-likely be different for each person / location. And as such, this information will be noted in this section. They will be highlighted in red throughout the document as a reminder that you should plug-in your own value rather than actually using these "place-holder" values.

Under no circumstance should you use the actual values listed below. They are place-holders for the real thing. This is just a checklist template you need to have answered before you start the install process.

Wherever you see RED in this document, you need to substitute it for you will use in your environment.
  • Ubuntu Server name: srv-video
  • Internet domain: mydomain.com
  • Ubuntu Server IP address: 192.168.107.66
  • Ubuntu Admin ID: administrator
  • Ubuntu Admin Password: myadminpass
  • Email Server (remote): 192.168.107.25
  • Database root Password: mydbrootpass
  • Database user: u_cumulus
  • Database user password: cumulususerpass
  • Server RAM: 4 GB (I would set it to 2x the size of the largest file you are going to upload)
It is also assumed the reader knows how to use the VI editor. If not, you will need to beef up your skill set or use a different editor in place of it.
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Server OS Install

Post: # 925Post LHammonds »

Installation of Database Server

This documentation will assume you have installed a separate and dedicated database server according to this article: How To Install MariaDB

Installation of Ubuntu Server

This documentation will assume you have installed Ubuntu Server according to this article: How to install and configure Ubuntu Server

It is assumed that the server was configured according to that article with the exceptions that the assumptions in red (variables above) are used instead of the assumptions in that document since we are building a web server.

Be sure to add a host entry that points to your database server in /etc/hosts. Example:

Code: Select all

192.168.107.20	srv-database
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Configure Database

Post: # 926Post LHammonds »

Configure MariaDB / MySQL

In this scenario, a dedicated and general-purpose database server already exists and it will be used to hold the application's database.
  1. Connect to the database server using PuTTY.
  2. Type the following commands:
    mysql -u root -p Enter password: rootpass
    CREATE DATABASE cumulusclips CHARACTER SET utf8 COLLATE utf8_bin; CREATE USER 'u_cumulus'@'%' IDENTIFIED BY 'cumulususerpass'; GRANT ALL ON cumulusclips.* TO 'u_cumulus'@'%'; FLUSH PRIVILEGES; exit
    The above commands will allow the database account to connect from any machine from anywhere in the world. This might be OK if your database is not accessible outside your local network or if your machine name changes or you have multiple servers that connect to the same database that use the same ID. You can make this more secure by specifying your application server when granting access. Make sure the database server will recognize the server name (via hosts file or DNS) or just use the IP address:
    CREATE USER 'u_cumulus'@'srv-video' IDENTIFIED BY 'cumulususerpass'; GRANT ALL ON cumulusclips.* TO 'u_cumulus'@'srv-video';
    or
    CREATE USER 'u_cumulus'@'192.168.107.66' IDENTIFIED BY 'cumulususerpass'; GRANT ALL ON cumulusclips.* TO 'u_cumulus'@'192.168.107.66';
    This will prevent anyone knowing the credentials from logging into the database from any other remote machine not specified in the grant command.

    If your application is running on the database server (typical on a developer machine / non-production scenario), create the user like this:
    CREATE USER 'u_cumulus'@'localhost' IDENTIFIED BY 'cumulususerpass'; GRANT ALL ON cumulusclips.* TO 'u_cumulus'@'localhost';
    This will prevent anyone knowing the credentials from logging into the database from any other remote machine.

    If you mess anything up, you can remove the database and user by issuing these commands:
    DROP USER u_cumulus; FLUSH PRIVILEGES; DROP DATABASE cumulusclips;
If you would rather permissions be assigned to roles and then have roles assigned to user accounts, you can use commands similar to these:
CREATE USER 'u_cumulus'@'192.168.107.66' IDENTIFIED BY 'cumulususerpass'; CREATE ROLE r_cumulus; GRANT ALL PRIVILEGES ON cumulusclips.* TO r_cumulus; GRANT r_cumulus TO 'u_cumulus'@'192.168.107.66'; SET DEFAULT ROLE r_cumulus FOR 'u_cumulus'@'192.168.107.66';
More info on roles can be found here.
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Requirements and Domain Resolution

Post: # 927Post LHammonds »

CumulusClips Requirements

Source: http://cumulusclips.org/docs/requirements/
  • 1 GB RAM
  • Linux (Kernel 2.6.32+)
  • PHP 5.3+
  • MySQL 5.0+
  • Apache web server 2.x (with mod_rewrite enabled)
  • PHP Modules: POSIX, GD, curl, simplexml, zip, PHP-MySQL and PDO MySQL
  • PHP Settings: short_open_tag = On, upload_max_filesize = 110M, post_max_size = 110M, max_execution_time = 1500, safe_mode = Off, register_globals = Off
Domain Name Resolution

Your PC needs to be able to resolve the FQDN (Fully-Qualified Domain Name) to the server's IP address from this point forward.

If you are setting up this site before DNS (Domain Naming Service) can resolve the FQDN to the server's IP address, you can temporarily get around this by adding your domain to your local host on Windows or Linux. This will allow just your PC to match the FQDN to the server's IP address. Once DNS is managing this relationship, the local host entry is no longer needed.

Windows Example: C:\Windows\system32\drivers\etc\hosts
192.168.107.66 video.mydomain.com
Linux Example: /etc/hosts
192.168.107.66 video.mydomain.com
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Install Web Server

Post: # 928Post LHammonds »

Install Apache

Code: Select all

sudo apt install apache2
Install PHP for Apache with MySQL/MariaDB support

Code: Select all

sudo apt install php7.4 libapache2-mod-php7.4 php7.4-mysql
Firewall Rules

Edit the firewall script that was created during the initial setup of the server (if you followed my instructions):

Code: Select all

sudo vi /var/scripts/prod/en-firewall.sh
Add (or enable) the following:

Code: Select all

echo "Adding Web Server rules"
ufw allow proto tcp to any port 80 comment 'HTTP Service' 1>/dev/null 2>&1
ufw allow proto tcp to any port 443 comment 'HTTPS Service' 1>/dev/null 2>&1
Run the updated rules:

Code: Select all

sudo /var/scripts/prod/en-firewall.sh
Open a web browser and go to http://192.168.107.66 and you should see a web page that says "It works!"

Create the website root folder

Code: Select all

sudo mkdir -p /var/www/video.mydomain.com
sudo chown www-data:root /var/www/video.mydomain.com
Create Apache Config for CumulusClips

Code: Select all

sudo touch /etc/apache2/sites-available/video.mydomain.com.conf
sudo chown root:root /etc/apache2/sites-available/video.mydomain.com.conf
sudo chmod 0644 /etc/apache2/sites-available/video.mydomain.com.conf
sudo vi /etc/apache2/sites-available/video.mydomain.com.conf
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName video.mydomain.com DocumentRoot /var/www/video.mydomain.com <Directory /var/www/video.mydomain.com/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/video.mydomain.com-error.log CustomLog ${APACHE_LOG_DIR}/video.mydomain.com-access.log combined </VirtualHost>
Enable the site configuration:

Code: Select all

sudo a2ensite video.mydomain.com
If you need to disable the site in the future:

Code: Select all

sudo a2dissite video.mydomain.com
Reload the Apache config so it is aware of the modified virtual host

Code: Select all

sudo systemctl reload apache2
Let's Encrypt SSL Certificate

Follow these instructions to enable SSL so the site can run on the HTTPS protocol.
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

CumulusClips Prerequisites

Post: # 929Post LHammonds »

Install CumulusClips Prerequisites
  1. At the server console, type the following to install the additional modules and restart the web service:

    Code: Select all

    sudo apt -y install php7.4-curl php7.4-xml php7.4-gd php7.4-zip php7.4-intl
    sudo systemctl reload apache2
  2. To make sure the modules are loaded, we will create a phpinfo file:

    Code: Select all

    cd /var/www/video.mydomain.com
    sudo touch phpinfo.php
    sudo chown www-data:www-data phpinfo.php
    sudo chmod 0644 phpinfo.php
    printf "<?php\nphpinfo();\n?>\n" | sudo tee phpinfo.php
    
  3. Now open a web browser and go to http://video.mydomain.com/phpinfo.php and verify that all the CumulusClips required modules are present.
  4. When satisfied everything is good, delete the test file:

    Code: Select all

    sudo rm /var/www/video.mydomain.com/phpinfo.php
Configure Apache to meet requirements

Enable Mod_ReWrite

Code: Select all

sudo a2enmod rewrite
sudo systemctl restart apache2
Configure PHP to meet requirements

Edit the PHP configuration and modify the following variables:

Code: Select all

sudo vi /etc/php/7.4/apache2/php.ini
Change:

Code: Select all

short_open_tag = Off
To:

Code: Select all

short_open_tag = On
Change:

Code: Select all

upload_max_filesize = 2M
To:

Code: Select all

upload_max_filesize = 2048M
Change:

Code: Select all

post_max_size = 8M
To:

Code: Select all

post_max_size = 2054M
Change:

Code: Select all

max_execution_time = 30
To:

Code: Select all

max_execution_time = 3000
Add:

Code: Select all

safe_mode = Off
register_globals = Off
Change:

Code: Select all

memory_limit = 128M
To:

Code: Select all

memory_limit = 512M
Restart web service for changes to take effect:

Code: Select all

sudo systemctl restart apache2
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Install CumulusClips

Post: # 930Post LHammonds »

Install CumulusClips
  1. Download CumulusClips, extract the archive and set permissions:

    Code: Select all

    cd /tmp
    wget http://cumulusclips.org/cumulusclips.tar.gz
    tar -xzvf /tmp/cumulusclips.tar.gz
    sudo chown www-data:root --recursive /tmp/cumulusclips
    sudo find /tmp/cumulusclips/. -type d -exec chmod 755 '{}' \+
    sudo find /tmp/cumulusclips/. -type f -exec chmod 644 '{}' \+
    rm /tmp/cumulusclips.tar.gz
    sudo mv /tmp/cumulusclips/* /var/www/video.mydomain.com/.
    sudo mv /tmp/cumulusclips/.htaccess /var/www/video.mydomain.com/.
    
  2. Access the installation wizard via a web browser. http://video.mydomain.com/cc-install/
  3. Follow the prompts to install it.
  4. Welcome - Click the "Continue" button
  5. Database Setup - Set the following and "Submit Database Login" button:
    • Database host: srv-database
    • Database port: 3306
    • Database name: cumulusclips
    • Database user: u_cumulus
    • Database password: cumulususerpass
    • Table prefix:
  6. Site Details - Set the following and "Submit Site Details" button:
  7. All done. Click "View My Site" button.
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Customize

Post: # 931Post LHammonds »

Logo Locations
  • Images related to the admin panel
    "CumulusClips Admin Panel" text on top of admin panel page. (374x27)

    Code: Select all

    cc-admin/images/admin-logo.png
    Small greyscale version of the main screen logo at the bottom of the admin panel (79x32)

    Code: Select all

    cc-admin/images/footer-logo.png
  • Images related to the default theme
    CumulusClips cloud-like logo displayed on main screen. (264x107)

    Code: Select all

    cc-content/themes/default/images/logo.png
    Small greyscale version of the main screen logo. (144x58)

    Code: Select all

    cc-content/themes/default/images/logo_footer.png
  • Images related to the mobile theme
    "CumulusClips Mobile" text for mobile theme. (198x19)

    Code: Select all

    cc-content/themes/mobile-default/images/logo.png
  • Images related to the corporate theme
    Medium greyscale version of the main screen logo (139x50)

    Code: Select all

    cc-content/themes/corporate/images/logo.png
Main screen slide show removal

In version 2.5.3, there is an example slideshow on the main page that you cannot remove via settings. This has to be done by modifying the code.

Code: Select all

sudo vi /var/www/video.mydomain.com/cc-content/themes/default/index.phtml
Find and remove the following on lines 13 thru 78:

Code: Select all

<!-- BEGIN SLIDESHOW -->
<div id="slideshow">

    <!--
    Slides 1-3 are for demonstration purposes only. They are merely for
    displaying your ability to add custom slides. You may remove them as you
    wish.
    -->

    <!-- BEGIN SLIDE 1 -->
    <div>
        <img width="600" height="287" src="<?=$this->options->themeUrl?>/images/slide1.jpg" />
        <div class="slide-text">
            <div>
                <p>CumulusClips - Free Video CMS. Start your own video sharing website with CumulusClips video sharing script. You can build a YouTube clone where users can upload videos, rate videos, comment on videos, and much more.</p>
                <a class="button" href="http://cumulusclips.org/">Learn More</a>
            </div>
        </div>
    </div>
    <!-- END SLIDE 1 -->

    <!-- BEGIN SLIDE 2 -->
    <div>
        <img width="600" height="287" src="<?=$this->options->themeUrl?>/images/slide2.jpg" />
        <div class="slide-text">
            <div>
                <p>CumulusClips Documentation - Guides on managing, modifying, and general information regarding the CumulusClips Video CMS.</p>
                <a class="button" href="http://cumulusclips.org/docs/">Documentation</a>
            </div>
        </div>
    </div>
    <!-- END SLIDE 2 -->
    <!-- BEGIN SLIDE 3 -->
    <div>
        <img width="600" height="287" src="<?=$this->options->themeUrl?>/images/slide3.jpg" />
        <div class="slide-text">
            <div>
                <p>CumulusClips Support Forums - Ask questions, share ideas and solutions, and get connected with the CumulusClips community.</p>
                <a class="button" href="http://cumulusclips.org/forums/">Visit Forums</a>
            </div>
        </div>
    </div>
    <!-- END SLIDE 3 -->
    <!-- BEGIN FEATURED VIDEO SLIDES -->
    <?php foreach ($featured_videos as $featuredVideo): ?>
        <div>
            <img width="600" height="287" src="<?=$config->thumbUrl?>/<?=$featuredVideo->filename?>.jpg" />
            <div class="slide-text">
                <div>
                    <p class="large"><u><?=Language::getText('featured')?>:</u> <?=$featuredVideo->title?></p>
                    <p><?=Functions::cutOff($featuredVideo->description, 80)?></p>
                    <a class="button" href="<?=$this->getService('Video')->getUrl($featuredVideo)?>/">Watch Now</a>

                </div>
            </div>
        </div>
    <?php endforeach; ?>
    <!-- END FEATURED VIDEO SLIDES -->
</div>
<!-- END SLIDESHOW -->

<!-- SLIDESHOW SLIDE LINKS -->
<div id="slideshow_nav"></div>
Custom Title / Description

Code: Select all

sudo vi /var/www/video.mydomain.com/cc-content/languages/en_US.xml

Code: Select all

<meta.index.title>TEXT HERE</meta.index.title>
<meta.index.keywords>TEXT HERE</meta.index.keywords>
<meta.index.description>TEXT HERE</meta.index.description>
Custom Footer

Code: Select all

sudo vi /var/www/video.mydomain.com/cc-content/themes/THEME-NAME/blocks/footer.phtml
Custom Welcome Page

Code: Select all

sudo vi /var/www/video.mydomain.com/cc-content/themes/THEME-NAME/index.phtml
Install More Themes
  1. Download and extract the Theme Add-ons and set the correct permissions:

    Code: Select all

    mkdir /tmp/themes
    cd /tmp/themes
    wget http://cumulusclips.org/resources/slate.zip
    wget http://cumulusclips.org/resources/newsroom.zip
    wget http://cumulusclips.org/resources/corporate.zip
    wget http://cumulusclips.org/resources/barren.zip
    unzip slate.zip
    unzip newsroom.zip
    unzip corporate.zip
    unzip barren.zip
    rm *.zip
    cd /tmp
    sudo chown --recursive www-data:www-data /tmp/themes
    sudo mv /tmp/themes/* /var/www/video.mydomain.com/cc-content/themes/.
    sudo rmdir /tmp/themes
    
  2. Login to the site, go into Admin Panel, Appearance, Themes. Click the "Activate" link on the desired theme.
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Email Support Using Mail Relay Server

Post: # 932Post LHammonds »

Email Overview

CumulusClips utilizes PHP's built-in "mail" function which means we need to configure php.ini to use a mail client that will send email.

It seems like an industry standard to use "sendmail" based on all the tutorials out there but sendmail is a mail server itself which can receive mail which is overkill for our purposes. We only want to send outbound to an actual mail server...not turn this web server into a mail server.

For this reason, we will install a lightweight mail client called ssmtp that will allow sending outbound-only mail messages.

We will then modify PHP to utilize this mail client and then finally modify CumulusClips (or any other web app from this point forward) to send mail.

Mail Server Information
There are many scenarios surrounding how one might have a mail service.

For this tutorial, let's assume you have a mail server that you configured to act as a relay server for this specific server...which means you can send email to that server to be delivered locally or routed to another mail server if the destination is not local. Let's assume this relay server will not require login credentials but does require the FROM address to be specific. Let's also assume it does not require encryption.

Here is this examples relay server information:

Mail Relay Server Address: 192.168.107.25
Mail Relay Server Port: 25
Use TLS? No
Required From Address: webmaster@mydomain.com

Install and Configure SSMTP

Install the mail client:

Code: Select all

sudo apt -y install ssmtp
Backup the original configuration files:

Code: Select all

sudo cp /etc/ssmtp/ssmtp.conf /etc/ssmtp/ssmtp.bak
sudo cp /etc/ssmtp/revaliases /etc/ssmtp/revaliases.bak
Edit the main configuration file:

Code: Select all

sudo vi /etc/ssmtp/ssmtp.conf
Set the following:
root= mailhub=192.168.107.25:25 hostname=localhost
Edit the reverse alias file:

Code: Select all

sudo vi /etc/ssmtp/revaliases
Add the alias for "root" to be that of your desired "FROM" address. Modify PHP.ini for Apache

Edit the Apache PHP.ini

Code: Select all

sudo vi /etc/php/7.4/apache2/php.ini
Set the sendmail_path variable to point to the default sendmail path (which is a link to ssmtp)

Code: Select all

sendmail_path = /usr/sbin/sendmail -t
Or set the sendmail_path variable to point to ssmtp directly:

Code: Select all

sendmail_path = /usr/sbin/ssmtp -t
Modify PHP.ini for Command-Line

While we are making the mail command work for PHP inside Apache, we might as well do the same for the command-line interface.

Make the same changes above to this file as well.

Code: Select all

sudo vi /etc/php/7.4/cli/php.ini
CumulusClips Email Settings

If you go into the Admin Panel -> Settings -> Email, you will see options for specifying the FROM address and SMTP authentication.

Add the webmaster@mydomain.com and leave the SMTP authentication disabled. Save the settings and the next time you create a member, it will email them a message that looks like this:

Code: Select all

From: Webmaster
Sent: Thursday, May 10, 2018 12:44 PM
To: LHammonds
Subject: New Member Registered
 
A new member has registered.

=======================================================
Username: LHammonds
Profile URL: http://video.mydomain.com/members/LHammonds/
=======================================================
Send Test Email

Create a temporary PHP page to send an email message.

Code: Select all

sudo touch /var/www/video.mydomain.com/mail.php
sudo chown www-data:root /var/www/video.mydomain.com/mail.php
sudo chmod 644 /var/www/video.mydomain.com/mail.php
sudo vi /var/www/video.mydomain.com/mail.php

Code: Select all

<?php
$to = "lhammonds@mydomain.com";
$subject = "My Test Subject";
$body = "Testing 1-2-3";
mail($to,$subject,$body);
?>
Test from the command-line:

Code: Select all

php /var/www/video.mydomain.com/mail.php
Now test from a browser:

Code: Select all

http://video.mydomain.com/mail.php
If you have any issues, check /var/log/syslog for messages related to sSMTP

Remove the temporary PHP page:

Code: Select all

sudo rm /var/www/video.mydomain.com/mail.php
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Video Compression Settings

Post: # 936Post LHammonds »

Here are the default video compression/conversion settings when uploading a video:

H.264 Settings:

Code: Select all

-vcodec libx264 -vf "scale=min(640\,iw):trunc(ow/a/2)*2" -vb 800k -acodec aac -ab 96k -ar 44100 -f mp4
WebM Settings:

Code: Select all

-vcodec libvpx -vf "scale=min(640\,iw):trunc(ow/a/2)*2" -vb 800k -acodec libvorbis -ab 96k -ar 44100 -f webm
Theora Settings:

Code: Select all

-vcodec libtheora -vf "scale=min(640\,iw):trunc(ow/a/2)*2" -qscale 8 -vb 800k -acodec libvorbis -ab 96k -ar 44100 -f ogg
Mobile Settings:

Code: Select all

-vcodec libx264 -vf "scale=min(480\,iw):trunc(ow/a/2)*2" -vb 600k -ac 2 -ab 96k -ar 44100 -f mp4
Thumbnail Settings:

Code: Select all

-vf "scale=min(640\,iw):trunc(ow/a/2)*2" -t 1 -r 1 -f mjpeg
You might want to adjust some of these settings based on the majority of the content you are uploading.

For example, if most of your videos uploaded are 1920x1280, you might want to change the H.264 to this setting:

Code: Select all

-vcodec libx264 -vf "scale=min(1920\,iw):trunc(ow/a/2)*2" -vb 800k -acodec aac -ab 96k -ar 44100 -f mp4
User avatar
LHammonds
Site Admin
Site Admin
Posts: 920
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Orphaned Files

Post: # 937Post LHammonds »

Orphaned Files

Failures happen for various reasons and sometimes the files under "uploads" are no longer attached to an upload entry...and thus cannot be deleted from the web interface.

There are a few ways to find such files.

On the database server you can run the following SQL command to identify the filenames of any failed files:

Code: Select all

SELECT video_id,filename,status FROM videos WHERE status = "failed" ORDER BY video_id ASC;

Code: Select all

+----------+----------------------+----------+
| video_id | filename             | status   |
+----------+----------------------+----------+
|        3 | xM3eQHws8otJsePN3fPo | failed   |
|        4 | GJUBSdCfIiqUe7mhEa4F | failed   |
|        5 | nFk7r1yrBZF8Hp9F5lQ1 | failed   |
+----------+----------------------+----------+
On the web server, you can run these commands to find the related files (notice the asterisk added at the end of the name):

Code: Select all

find /var -name "xM3eQHws8otJsePN3fPo*" | xargs du -sh

Code: Select all

2.9M    /var/www/video.hl.com/cc-core/logs/KMrO2si2dBPGu4dwIFwq.log
83M     /var/www/video.mydomain.com/cc-content/uploads/mobile/KMrO2si2dBPGu4dwIFwq.mp4
337M    /var/www/video.mydomain.com/cc-content/uploads/theora/KMrO2si2dBPGu4dwIFwq.ogg
784M    /var/www/video.mydomain.com/cc-content/uploads/temp/KMrO2si2dBPGu4dwIFwq.mp4
24K     /var/www/video.mydomain.com/cc-content/uploads/thumbs/KMrO2si2dBPGu4dwIFwq.jpg
122M    /var/www/video.mydomain.com/cc-content/uploads/webm/KMrO2si2dBPGu4dwIFwq.webm
250M    /var/www/video.mydomain.com/cc-content/uploads/h264/KMrO2si2dBPGu4dwIFwq.mp4
In the above example, it found the associated log file which you can read to see why it failed. The file in the "temp" folder is the largest file which is the original upload. The other files are those that were converted from the original.

If I have resolved the problem located in the log and want to purge this particular entry completely, I can do the following:

On web server, delete related files:

Code: Select all

find /var -name "xM3eQHws8otJsePN3fPo*" -delete
On the database server, delete the record:

Code: Select all

DELETE FROM video WHERE filename = "xM3eQHws8otJsePN3fPo"
Post Reply