Life of a Geek Admin

The Daily adventures of a true geek administrator

Life of a Geek Admin - The Daily adventures of a true geek administrator

Install Kdenlive on Fedora 14/15 64 bit

Recently I rebuilt a system to run Fedora 14. One of the many jobs I plan to use it for is for video editing and one of best Linux editors in development is Kdenlive. According to the site, Kdenlive is an intuitive and powerful multi-track video editor, including most recent video technologies. So let’s move on to the install.

Part of the issue with installing Kdenlive is that it is not in the repository but can be found in the rpmfusion free and non-free repositories. So first step is to add the repositories.

$ su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'

Now that the repository is loaded you need to run the install. If you run the command as you would normally it will fail getting libmlt. To resolve this issue you need to temporarily enable the rpmfsion-free-updates-testing repository and install Kdenlive. At the time of this posting 0.8.1 is available.

$ yum --enablerepo=rpmfusion-free-updates-testing -y install kdenlive

Once the command is completed Kdenlive is available. Refer back to the blog for more postings on the adventures of using Kdenlive or feel free to explore yourself and use the great documentation on Kdenlive’s website.

Note: With Fedora 15 you may have a crash caused by MLT. If you experience the crash you will need to downgrade MLT. You can do this by running the command.

$ sudo yum –downgrade mlt

Kdenlive Interface

Tracking Movie Collection with Griffith

Have you ever had one of those times that you were looking for a movie  and didn’t know if you had it or just had no idea what movies you had? Well in comes a nice little application called Griffith.

Griffith is a media collection manager application. Adding items to the collection is as quick and easy as typing the film title and selecting a supported source. Griffith will then try to fetch all the related information from the Web. Griffith is a cross-platform application and is known to run on GNU Linux, Microsoft Windows and MacOS X systems.

In  this post we will cover installing Griffith and configuring it to use MySQL for the database back end.

Install / Configure Griffith on the server
Griffith is in the repositories for Ubuntu and Fedora / CentOS, so installation is easy from the terminal.

Ubuntu
$ sudo apt-get install griffith

Fedora / CentOS
$ sudo yum install griffith

MySQL Database Creation
Now that the hard part is over we can create the MySQL database using the terminal. Once the database has been created and permissions set there is nothing to do but connect a client to the database and it will create the tables and fields it requires.

Open a terminal and connect to the MySQL database.

$ mysql -u root -p
mysql> CREATE DATABASE `griffith` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> CREATE USER 'griffith'@'localhost' IDENTIFIED BY 'gRiFiTh';
mysql> CREATE USER 'griffith'@'%' IDENTIFIED BY 'gRiFiTh';
mysql> GRANT ALL ON `griffith` . * TO 'griffith'@'localhost';
mysql> GRANT ALL ON `griffith` . * TO 'griffith'@'%';
mysql> exit

The commands created the database and user griffith on localhost and remote hosts to the database griffith. The password used is the default password created by the application, which you can use a different password (most advisable).

Edit /etc/my.cnf and comment out bind-address, this will allow remote connections to the database. If it is left to 127.0.0.1 then only the local host will be able to connect to the databases being hosted. Once the change has been made restart mysqld service.

$ sudo service mysqld restart

Client Installation and Configuration
Linux
Now that the server is configured and working, the clients need to be installed and configured. For Fedora and Ubuntu distributions use the same installation method as was done with the server. For Windows you will need to download and install Griffith from the website. Once you have installed the program we can move on to the configuration.
Next we need to open Griffith, click  Applications > Sound and Video > Griffith. Click File > Select Database. Use the following settings for this dialog.

Type: MySQL
Host: Your Servername or ip
Database: griffith
Username: Your username for database access or root
Password: Password associated to the selected user.

Click Save and if all is good you will login and connect to the database. If this is the first connection to the blank database the program will create the structure for you.

Windows Clients
For Windows systems the installation is as simple as downloading the self installing executable and double-clicking to install. Download the latest client from http://griffith.cc/index.php?option=com_content&task=view&id=22&Itemid=39 and click on the link for the Windows installer. The current version at this writing is 0.12.1.

Once the installation is complete open Griffith and configure the database connection to your server. Click File > Select Database. Use the following settings for this dialog.

Type: MySQL
Host: Your Servername or ip
Database: griffith
Username: Your username for database access or root
Password: Password associated to the selected user.

Now you are ready to add movies. You can do this one by one or if you have the movies in a spreadsheet you can export to csv and import into Griffith.

Installing NVIDIA drivers on CentOS 5.5

After you have installed CentOS, you see that your Desktop is running quite a bit slower than you expected, resolution is 800×600 and a bit jerky. What is needed is to install the drivers for your graphics card.

CentOS does not have these drivers available in its default yum repository, so you will first need to add a repository to make the drivers available for installation.

First, you will need to update your CentOS distribution, to do this simply type the following into your console/terminal:
# su -c 'yum update'
Enter your root password and follow the prompts that follow to complete the update.
Next we need to install the RPMForge repository so that we can download and install the NVIDIA display drivers. The repository comes in two flavors, namely 64-bit and 32-bit. Make sure you select the correct repository to install. When in doubt, select 32-bit.

For 32-bit installations
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
# su -c 'rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.i386.rpm'

For 64-bit installations
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
# su -c 'rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm'

Once the repository has been installed, we can finally install the NVIDIA display driver. To do this simply enter the following into your terminal/console:
For 32-bit installations
# su -c 'yum install dkms-nvidia-x11-drv.i386'

For 64-bit installations
# su -c 'yum install dkms-nvidia-x11-drv.x86_64'

Once the drivers have been installed, you need to fix xorg configuration
# su -
# nvidia-xconfig

Now you can reboot your machine. If you would like to customize your settings after you have rebooted, you can do so by using the NVIDIA settings applications. To open the application you can simply type the following into a console/terminal:
# su -c 'nvidia-settings'

Enter your root password, a dialog will appear where you can customize your display settings. If you change anything, please remember to click the SAVE Configuration button.

Adding Multimedia support on CentOS 5.5

Recently I have been building a new Home server as a Home Digital Server. In the process of using CentOS 5.5 as the Linux distro I ran into the need to Multimedia support. Here is how I accomplished the task.

Add the rpmforge repos if not already installed.
Type the following commands in the console/terminal
For 32-bit installations (i.e. CentOS 5.x 32-bit installed), enter the following into your console/terminal:
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
# su -c 'rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.i386.rpm'

Enter your root password to complete the installation.

For 64-bit installations (i.e. CentOS 5.x 64-bit installed), enter the following into your console/terminal::
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
# su -c 'rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm'

Enter your root password to complete the installation when prompted.

Install Adobe Reader
Type the following commands in the console/terminal:
#su -c 'rpm -Uhv http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm'

Enter your root password to complete the installation when prompted.

Additional Multimedia Programs
The next thing we need to do is install all the multimedia applications that we want to use. This includes all the needed DVD, Gstreamer plugins and Flash. When the dependencies are picked up you will get MP3, MP4 and many other needed codecs and programs. Type the following commands in the console/terminal:
# su -c 'yum -y install libdvdcss libdvdread libdvdplay libdvdnav lsdvd mplayerplug-in mplayer mplayer-gui compat-libstdc++-33 flash-plugin gstreamer-plugins-bad gstreamer-plugins-ugly'

Enter your root password to complete the installation when prompted.

Additional Codecs
Now we need to install all the codecs we want to use, luckily this step provides all the codecs we will ever need, most are for use with Mplayer. Type the following commands in the console/terminal:

# wget www1.mplayerhq.hu/MPlayer/releases/codecs/mplayer-codecs-20061022-1.i386.rpm
# su -c 'rpm -ivh mplayer-codecs-20061022-1.i386.rpm'
# wget www1.mplayerhq.hu/MPlayer/releases/codecs/mplayer-codecs-extra-20061022-1.i386.rpm

Installing Win32 Codecs on Linux

The following is an example way to install the “all” pack as root and will work on Ubuntu and Fedora.

cd /tmp
wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20100303.tar.bz2
tar -jxvf all-20100303.tar.bz2
su -c 'mkdir -p /usr/local/lib/codecs'
su -c 'cp all-20100303/* /usr/local/lib/codecs'
rm -rf /tmp/all-20100303*

Adding DVD Support Ubuntu Karmic 9.10

Due to licensing on encrypted DVD you are unable to watch your movies on Ubuntu. To remedy this you can add the support needed to Ubuntu 9.10.

$ sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update

Now install the DVD support and a few codecs

$ sudo apt-get install libdvdcss2 libxine1-ffmpeg gxine mencoder non-free-codecs ubuntu-restricted-extras

And finally a player to watch them. I prefer VLC and mplayer since both are very versatile players.

$ sudo apt-get install vlc mplayer mozilla-plugin-vlc

Creating YouTube type video using Kino and JW Player on Ubuntu

This post will cover creating a video and posting the video in Flash format to a website in the YouTube format. The tools / programs used are Kino, WinFF and JW Player. For the hardware a firewire connection to a MiniDV video Camera is used for the video source, you could omit the camera and Kino step if you have a video already and just need to convert and post.

Download and Install needed Packages

First need to make sure the needed code is installed on your Ubuntu system.

WinFF

Install WinFF from Synaptic Package Manager or from the terminal type sudo apt-get install winff.

Kino

Kino is at version 1.3.2 in the Ubuntu Repositories. First install it from there either using the command line or Synaptic, whichever method you prefer. This version will suffice for what we need to accomplish, but the latest version can be found on GetDeb (http://www.getdeb.net/) or at http://www.kinodv.org . At the time of this writing the version is at 1.3.4.

Install from Command Line

sudo apt-get install kino

FFMPEG

Use the ubuntu repositories to install FFMPEG so you will have added export features in Kino. Run the command sudo apt-get install ffmpeg.

JW Player

JW Player is a flash plugin to deliver flash video content. It is free for personal use but requires a fee for business use. It can be downloaded from http://www.longtailvideo.com/players/jw-flv-player/.

Flowplayer

Flowplayer is another plugin to deliver flash videos to the internet. As the JW Player it is also free. Download the code from http://www.flowplayer.org.

The Process

Now that we have downloaded and installed the code we are ready to start the process of capturing the video, converting it and posting it to the web. In this example we will be using a firewire connection to a MiniDV Camcorder and importing in the file using Kino.

Plug-in your camcorder into the firewire port on your computer and turn it on. Open Kino and click on Edit > Preferences and click on the IEEE 1394 tab. If the module loaded properly you should see your device listed in the drop down.

If not and you see an error you will need to make a few changes to the settings. Close the Kino Preferences dialogue, open a command prompt and type sudo modprobe raw1394, then type sudo chmod a+rw /dev/raw1394. Reopen Kino Preferences again and now your device should show.

A feature turned on by default in Kino is to Auto Split the captures. If you want the capture to be one file then you will need to turn off this feature. If not then exit Kino Preferences, if so then click on the click on the Capture tab and uncheck Auto Split Files and click OK.

Now click on the Capture tab and lets start the capture. With the use of fireware you can control the actions of the camera from within Kino. So to start the Capture click Capture.The files will be saved to /home/<id>/capturXXX.dv. When you are done capturing click on Stop.

Click on the Edit tab and you’ll see the clip has been added to the storyboard column and you can edit the file. Lets say that we are satisfied with the clip and we are ready to export it to Flash. The newer version of Kino will let us do just that.

With Kino as the export for flash do the following. Click on the Export tab and then click on Other tab in the Export Section. Input the filename, From the Tools dropdown select Flash Dual Pass (FFMPEG) and from the Profile Dropdown select either Broadband Quality FLV or Low Quality FLV and then select Export. If you are not using Kino for the import and have an existing file to convert then WinFF is used to convert to FLV

Converting Using WinFF

Open WinFF, Click on the Add button and add the file from Kino that was captured or another file to convert. In the Convert To drop down select Websites. In the drop down box next to it select Flash Video (flv) for Web (4:3) and click Convert. Note: you can also select Flash Video (flv) for Web (16:9)

Setting up JW Media Player

Step 1: Transfer the player.swf and swfobject.js file from the ZIP to your website. (Make sure that you’ve also uploaded all the necessary videos / songs / images to your site.)

Step 2: Embed the player in your HTML page with the lines of code below. Note: If you place the files in different directories, make sure to set the references in this code accordingly.

<p id='preview'>The player will show in this paragraph</p>

<script type='text/javascript' src='swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','player','400','300','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=video.flv');
s1.write('preview');
</script>

Notice the flashvars parameter above can contain a list of variables for configuring the player to use different Plugins or Skins. To quickly set up flashvars, use the setup wizard. Simply choose an example, select the variables you want to use and paste the code onto your page. It’s that easy.

Switch to our mobile site