Skip to content

TheHippo

if (i=1) throw null;

Downloading

I used a small python script youtube-dl for downloading the video data.

  • It is available in the Ubuntu repositories
    sudo apt-get install youtube-dl
  • If you encounter some problems you also could do a source checkout from BitBucket (requires that Mercurial is installed):
    hg clone http://bitbucket.org/rg3/youtube-dl/
  • Download the video from a terminal:
     youtube-dl http://www.tube.com/watch?v=videoid
  • After the download you will find a videoid.flv in your folder

Getting the audio data

For extracting the audio data I used ffmpeg.

  • If you haven’t installed it already:
    sudo apt-get install ffmpeg
  • We will extract the audio data to a simple wave file. This file is gonna be large, so make sure you delete it afterwards.
    ffmpeg -i videoid.flv output.wav

Converting to MP3

For converting the wav file to a mp3 file I used lame.

  • Run (the “-b” arguments sets the bitrate of the mp3):
    lame -b 192 -h output.wav output.mp3

Notes

  • There a lot of other ways to get the data. Instead of lame you could use mplayer, but this way I alway ended with broken mp3 files.
  • Instead of converting to wave file you also could create a mpeg video and then create the mp3 file directly from this video.
  • Lame and also ffmpeg have tons of options available from the command line, which could increase speed and quality of the conversation.

In the last time I am back to a lot of server development. This also means a lot of database engineering. For the most the time I have used PHPMyAdmin for nearly every I have to work with a MySQL database. After a while a got a little bit disappointed, because PHPMyAdmin is a kind of bloated and sometimes it’s just take to long to perform a simple operation. continue reading…

Minefield icon

I make no secret of that I am a big fan of the Firefox web browser. Except of a few things that I will name later I am/was always impressed by the speed improvements that are made over the past few years, which seems very important to me, because many pages you use in you daily life are more and more based on heavy JavaScript functionalities. A few days ago I decided to give a try to the newest development version of the Firefox – named Minefield – and make some tests. continue reading…

Today I tried to load a animated loading animation as a gif image into the Flash Player and discovered that he is not able to play them. It only shows the first frame.
My loading.gif:

loading.gif

So how to convert this gif animation into a swf file, which the Flash Player could play? (And of course I only want to use open source tools.) It was very easy: continue reading…

Just for fun I looked at the headers generated by website I made and where I am responsible for the administration of the Apache server I discovered this:

HTTP/1.1 200 OK
Date: Sun, 06 Sep 2009 11:44:56 GMT
Server: Apache/2.2.8 (Ubuntu) DAV/2 SVN/1.4.6
X-Powered-By: PHP/5.2.4-2ubuntu5.7
Connection: close
Content-Type: text/html

Actually I think no one needs to know which PHP version is running on this machine and that there also a Subversion is running on that machine. Even the name of the operating system and the version of the Apache is not needed in most cases.

So how suppress these information?

continue reading…

In my last post I wrote about some problems that I had with my virtual server that freezes under heavy load. The improvements I suggested worked really nice but the server still sometimes freezes – not often as before but it still happened. So I “googled” around and also asked at ServerFault.com.

It seems that keeping up the the apache mpm_prefork and mod_php will not be the solution anymore. Most sites suggested to use mpm_worker instead, because it uses less memory (and my problem was, that my Apache consumed all my memory). On the other hand there could be some problems with thread-safety, but I liked to give it a try. PHP will not me used as an Apache module any more. Instead we will run PHP as a FastCGI script. continue reading…

After leaving my last company I rented a small virtual server at 1und1. I took the XL vHost package which contains:

  • 20 GB Raid 5 Storage
  • 512 MB RAM, max 2 GB RAM
  • 2 TB Traffic

At this time I thought it would be nice to install every thing by myself, so I choose a plain “Ubuntu 8.04 LTS 64 bit minimal” as operating system for my vHost. I installed Apache2, PHP5, MySQL and all the stuff I needed. It all works fine and I was really impressed by the speed of this virtual server.

Then I moved sportinleipzig.de, which I made during the time at my last company to this new server. This page does not have a very high traffic (200 unique visitors a day), but a lot of content (at least 5000 “static” pages). After 2 days the server crashed the first time, whereas crash means, that he is still alive, but does not respond to anything more then a simple ping. I restarted the server over the admin panel. Half a week later the server crashed the next time. Investigating the cause for these crashed I found out a few interesting things. continue reading…

On the last blog I wrote for was an article which described who to install eAccelerator on a Ubuntu server. As this blog entry had a lot of visits I decided to put it on this blog again:

PHP is not the fastest scripting language, that truly a fact. Except from optimizing the scripts there a few possibilities to speed everything up. One is to install a byte code optimizer and cache on your server. They cache the byte code created by the PHP parser and try to optimise it. So every time some one requests for a page on your server the script does not have to be parsed again. This brings a speedup of 120 – 250% depending on you script. There are several byte code caching program available, the one I like most is eAccelerator. Sadly eAccelerator is not available through the Ubuntu repositories so you have install them yourself. Here is a short description how to archive this!
continue reading…

Welcome to my blog!

After a while I decided to start a blog again and here is my first post.  (I think this is the third try, so we will see how long this experiment will  last.) Most of the blog entries will be about typical nerd and computer stuff like linux servers, programming, etc. I hope there will be some interesting topics for you.