Windows – Convert YouTube Videos for the PSP using Handbrake

Windows 8 Logo

I recently dusted off my old Play Station Portable (PSP) because I wanted to watch some YouTube videos on it.

On my PC I used the Download Flash and Video Firefox extension to download 360p .mp4 videos from YouTube but when I opened Handbrake to convert my videos I found that there is was longer a PSP profile available.

The Handbrake settings that I used are as follows:

First select the Universal profile and then make these changes under Output Settings:

  • set Anamorphic to None
  • set the Width to 480
  • check the Keep Aspect Ratio check-box.

HandBrake_psp_output_settings

Note: Even though the Container is set to Mp4 the Destination File extension is set to .m4v. Change the Destination File extension to .mp4.

Click on the Video tab and then click the Avg Bitrate (kbps) radio button.

  • set the Avg Bitrate to 768.

HandBrake_psp_quality_settings

If you end up with a .m4v video when the conversion is complete you can simply change the extension to .mp4 before transferring it to your PSP.

Source: http://www.maximumpc.com/article/features/handbrake

xbmcbuntu 11 (Eden) – YouTube Plugin 3.1 Playback Issue

I recently installed the TubeToTV extenstion for the Chromium browser in Ubuntu 12.04 so that I could send YouTube videos from my laptop to my xmbc Media Center. I was surprised when I got a Playback error message.

I soon found that the issue was not with the TubeToTv extension but with the YouTube (3.1) Plugin on xbmc.

Fortunately a kind fellow called anteo had already stepped in to fix the extension – so I can now play YouTube videos on xbmc and use the TubeToTV extenstion too!

The fix is as follows – open a terminal and shh into your xbmc:

ssh user@ipaddress

Use the username and IP adddress of your xmbc.

Retrieve two plugins using wget:

wget https://dl.dropbox.com/u/33024933/plugin.video.youtube.zip
wget https://dl.dropbox.com/u/33024933/script.module.simple.
downloader.zip

Update: The above links are no longer working and so I have uploaded the files to dropbox myself:

Next uninstall the YouTube 3.1 plugin from xbmc and then install the two plugins that you just downloaded.

Many thanks to anteo for the fix!

Ubuntu Server 10.4 Lucid – Installing VIMP (Community Edition)

Some time ago I was looking for an open source YouTube clone when I came across something called osTube. When I recently vistited the osTube site again I found that osTube development had been discontinued. Its successor is ViMP which bills itself as the solution for Social Media, Web TV and Video Communities. It has a host of features and the good news (for me) is that it handles H.264/MP4.

Just to be clear though the ViMP Community edition is not open source – the code is encrypted by a PHP encoder called Source Guardian (which must be installed to use ViMP). Hopefully you are OK with that?

You will need to register at the ViMP site to download it (the current version is 2.0.6). Extract the ViMP tar-ball and you will find an Installation Guide for Debian in the doc folder. Most of this guide is good for an Ubuntu installation but we will make some changes for our Ubuntu install.

My starting point is a virtual machine with a minimal Ubuntu Server installation with the SSH role. So, let’s install ViMP:

Fisrt update repositories:

sudo apt-get update

Install nano (terminal based text editor) and wget (file downloader):

sudo apt-get install nano wget

Install Apache2 web server:

sudo apt-get install apache2

Enable mod_rewrite and then restart Apache2:

sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

Install PHP5:

sudo apt-get install libapache2-mod-php5

Install additional PHP packages:

sudo apt-get install php5-cli php5-mysql php5-gd php5-xsl php5-curl

Install the MySQL database server:

sudo apt-get install mysql-server

You will be prompted to provide a root password for MySQL. Make a note of this password for later!

Add the Medibuntu repository to your server:

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

Install the transcoding software:

sudo apt-get install mplayer mencoder ffmpeg flvtool2

Install video codecs for popular proprietary formats:

For 32 bit,

sudo apt-get install w32codecs

or for 64 bit,

sudo apt-get install w64codecs

Create directories for ViMP installation:

sudo mkdir -p /var/www/showvid/data
sudo mkdir -p /var/www/showvid/logs
sudo chown -R www-data:www-data /var/www/showvid

Create a configuration file for the Apache virtual host:

cd /etc/apache2/sites-available
sudo nano showvid

Copy and paste the following into the /etc/apache2/sites-available/showvid file you just created:

<VirtualHost *:80>
DocumentRoot "/var/www/showvid/data/web"ServerName showvid.com
ServerAlias www.showvid.com
<Directory "/var/www/showvid/data/web">
AllowOverride All
RewriteEngine On
Options -Indexes FollowSymLinks
</Directory>
ErrorLog /var/www/showvid/logs/error.log
CustomLog /var/www/showvid/logs/access.log combined
LogLevel error
</VirtualHost>

Save the file  and exit nano.

Enable the showvid virtual host and restart Apache:

sudo a2ensite showvid
sudo /etc/init.d/apache2 reload

Disable the default virtual host and restart Apache:

sudo a2dissite default
sudo /etc/init.d/apache2 reload

Next we need to configure some PHP values. Edit both of the files listed below and change the upload_max_filesize, post_max_size and memory_limit values as per the bullet points:

sudo nano /etc/php5/apache2/php.ini
sudo nano /etc/php5/cli/php.ini

• upload_max_filesize = 1024M
• post_max_size = 1024M
• memory_limit = 512M

Restart Apache:

sudo /etc/init.d/apache2 restart

Create a MySQL database called showvid:

sudo mysqladmin -p create showvid

Enter your MySQL password.

Enter the MySQL console as the root user:

mysql -u root -p

Enter your MySQL password again. You should now be at the MySQL prompt:

mysql>

Create a user called showvid. Change <password> in the first command below to a strong password for the showvid user. Make a note of this password.

CREATE USER showvid@localhost IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON showvid.* TO showvid;
FLUSH PRIVILEGES;
exit

Change directories to your user directory:

cd /home/<username>/

Upload ViMP to your server – I used WinSCP to do this.

Copy the ViMP tar-ball to /var/www/showvid/data/ and then extract it:

sudo cp vimp.framework-<version>.tar.gz  /var/www/showvid/data/
cd /var/www/showvid/data/
sudo tar xvzf vimp.framework-<version>.tar.gz
sudo rm vimp.framework-<version>.tar.gz

Make the symfony file in /var/www/showvid/data/ executable:

sudo chmod +x symfony

At this point we would normally be able to execute the symfony file but because we are using the Community edition of ViMP we must install SourceGuardian. To do this we will need to know the version of PHP that we have installed:

php -v

Now that we know what version of PHP we are using we can copy and extract the Source Guardian loaders that are supplied with ViMP.

First create a temporary directory to work in:

cd /home/<username>/
mkdir temp
cd temp/

Now extract the file /var/www/showvid/data/data/loader.tar.gz to the current directory:

tar xfz /var/www/showvid/data/data/loader.tar.gz

For the next step you will need to look in either the Linux_x86-32 folder (if your installation is 32 bit) or the Linux_x86-64 folder (for 64 bit). Assuming that you are running PHP 5.3.2 like me you will want the Source Guardian ixed.5.3.lin loader file .

Now that we have matched a loader to our version of PHP we need to make a folder in /usr/lib/php5/ that we can copy the Source Guardian loader to.  The format of the folder is year, month, date +lfs. I don’t think that it really matters what date we choose, so I used the one provided in the Debian installation guide:

sudo mkdir /usr/lib/php5/20060613+lfs

Copy the loader file ixed.5.3.lin to the /usr/lib/php5/20060613+lfs/ folder:

sudo cp Linux_x86-32/ixed.5.3.lin /usr/lib/php5/20060613+lfs/

Create a Source Guardian configuration file:

sudo nano /etc/php5/conf.d/sourceguardian.ini

Add the following two lines to sourceguardian.ini:

[sourceguardian]
zend_extension=/usr/lib/php5/20060613+lfs/ixed.5.3.lin
Restart Apache:

sudo /etc/init.d/apache2 restart

Source Guardian installation is now complete.

Change directory back to /www/showvid/data and run symfony – just make sure that you change <password> to the password you defined for the showvid user earlier on:

cd /var/www/showvid/data
sudo ./symfony framework:init mysql://showvid:<password>@localhost
/showvid

Finally we need to set up a cronjob that runs every minute to convert uploaded videos to the right format. Edit the crontab:

sudo crontab -e

Copy and paste the following line at the bottom:

*/1 * * * * /var/www/showvid/data/scripts/sync_new_uploads.sh > 
/dev/null 2>&1

You can now access ViMP with a web browser. The password for the admin account is ‘admin’ – so you might want to change that after you log in.

That’s it, now sit back and enjoy your own video community!

solution for Social Media, Web TV and Video Communities