Howto create a youtube video from mp3/ogg audio using a picture

If you want to create a youtube video from an audio file, here is how to do this.
All you need is the audio file, a single picture, and ffmpeg.

First find out the lenght of the audio file in seconds, you’ll need it. Here is an example with a 420 seconds file:

ffmpeg -loop_input -i picture.jpg -vcodec mpeg4 -r 25.00 -qscale 2 -s 480x360 \
-i audiofile.mp3 -acodec libmp3lame -ab 128k -t 420 video.avi

This will create a Hi-Res MPEG-4 video with 128k audio. The trick here is to use that one picture and loop it for -t seconds.

Howto use KDE4’s device notifier to play a DVD in SMplayer

Just finally figured this one out! It’s possible to add an entry to KDE4’s device notifier, so you can just click & play a DVD in SMplayer. Awesome!

You need a very recent SMplayer and Mplayer, latter one compiled with dvdnav support.

  1. In SMplayer’s preferences, go to mouse & keyboard -> mouse, and for left click select "Activate option in DVD menus".
  2. Create a file called smplayer-playdvd-predicate.desktop
    in $KDEDIR/share/apps/solid/actions, here that means /usr/kde/svn/share/apps/solid/actions/smplayer-playdvd-predicate.desktop, with following in it:
[Desktop Entry]
X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND OpticalDisc.availableContent == 'Data|VideoDvd' ]
Type=Service
Actions=open;

[Desktop Action open]
Name=Play DVD with SMplayer
Exec=smplayer dvdnav:////%d
Icon=smplayer

Now restart KDE, insert a DVD in your drive, or load DVD ISO image in cdemu, wait for the device notifier to pop up, and select.

Device notifier play DVD in SMplayer

That’s it!

Search for a good audio player

For a long time i’ve been a fan of simple WinAMP-style music players, and went the XMMS -> BMP -> Audacious way. Then, with my collection growing over the years, I got to like library driven players, with Amarok 1.4* being the best regarding music management capabilities.

Running KDE4 I decided to get rid of kdelibs-3 and everything depending on it, inkluding Amarok 1. So I need a new music manager/player.

This is what I tried out so far:

  • Amarok 2

Somehow it looks cool. But managing music isn’t as cool as it was with Amarok1.

  • Banshee

I couldn’t figure out how to simply drag & drop files from the file browser to the play queue

  • Listen

Looks most promising regarding the UI layout and feature set. Unfortunately the libraray can only be one single folder, and well after reading in my 32000 files, Listen was up at consuming 1.2GB RAM and crashed right away when trying to play one. (I used current SVN)

  • XMMS2 + Esperanza

if XMMS2 only had a good ALSA plugin and didn’t exhibit memory leaks after running a day….

  • MPD + Sonata

Actually this combination is just perfect. Really. I easpecially like the "browse library by filesystem" feature. This would be it, if I just could figure out how to add files from the file manager to the current playlist. Drag & drop doesn’t work.

  • Exaile

Really nice too. Tried the 0.3 branch, and I’m really looking forward to it.

Howto: Convert avi/mov/any video to Flash/flv on Linux

Recently I wanted to convert a Quicktime .mov video to Flash .flv in order to post it on this page, for the fun of it.
First thought: uuuh how do I do this on Linux? But it’s pretty simple, thanks to ffmpeg. Works fine with anything that ffmpeg can play, so avi, mpeg, wmv or whatever.

It’s as simple as:

ffmpeg -i input.avi -s 320x240 -ar 44100 -o movie.flv

There is also a nice tool to add metadata info like duration etc to flv files, called flvtool2.

cat movie.flv | flvtool2 -U stdin movie.flv

Now your flv has duration info and is ready for the website.