Thursday, November 20, 2008

Marketing lecture and meet the news

Yesterday I had the pleasure to teach marketing for about 40 people studying a BA in Engineering. It's always a challenge to speak in front of students who like engineering and have to listen to crazy management folks. But it was amazing. They were very interested and the results were really well. I hope it wasn't only fun for me, but also for them. Perhaps a little bit.

What I didn't know. Most of them used to work for a big German company. Yes: They used to. I remember that I heard it in the news that the company would close one of its branches because it is not (enough?) profitable anymore. A few thousand employees would lose their jobs. And now those people, excellent people by the way, were sitting in my classroom. Those anonymous thousands loosing their jobs suddenly had names, faces, families, fears, ... complete lifes.

There's a great difference if you only hear the news or if you meet those people in real life. This time it was me who learned something in my lesson. But I hope the students did, too.

Sunday, November 16, 2008

Extract mp3 from flv

Tonight I tried to rip the audio track from a flv file. First I wanted to convert it into ogg but as the audio track is a mp3 stream itself I decided just to rip the mp3 data into a file (same quality as in the video file. A higher samplerate would only increase filesize).

UPDATE: Today the audiostream is often aac (not mp3 anymore). That means, you have to use mp4 instead of mp3 with ffmpeg ... -f mp4 ... .mp4).

One of those commands will do the job:
mplayer -dumpaudio in-video.flv -dumpfile out-audio.mp3
ffmpeg -i input.flv -f mp3 -vn -acodec copy output.mp3

To convert all files (*.flv to *.mp3) in the directory use one of the following commands:
for i in *.flv; do mplayer -dumpaudio -dumpfile "${i/.flv}".mp3 "$i"; done
for i in *.flv; do ffmpeg -i "$i" -f mp3 -vn -acodec copy "${i/.flv}".mp3; done

#ffmpeg: -f mp3 => force mp3 format, -vn => novideo, -acodec copy => stream-copy
# ${i/.flv} is cutting the filename $i from ".flv"

UPDATE: As the files are not always in the same format and my portable music player couldn't play mp4 I decided to convert them to ogg.
ffmpeg -i input.flv/mp4 -vn -acodec vorbis output.ogg

This script will transform all flv files in your directory into mp3 files.

1. Create a new file e.g. with kate and name it flv2mp3.sh

#!/bin/bash
for i in *.flv
do
echo "$i"
# Alternative 1
# mplayer -dumpaudio -dumpfile "${i/.flv}".mp3 "$i"
#Alternative 2
ffmpeg -i "$i" -f mp3 -vn -acodec copy "${i/.flv}".mp3
done

2. Change the right of this file:
chmod +x flv2mp3.sh

3. Goto the directory and run the script

Saturday, November 15, 2008

Wikipedia.de is down!

I'm shocked.

The German site of wikipedia is down due to a court decision forced by a member of parliament.

I doubt that this was the right way from Mr. Lutz Heilmann (Die Linke) to prevent the world from knowing something written in the wikipedia-article.

I'm looking forward to the reactions of the community.

More information:
http://www.golem.de/0811/63574.html (german)
http://de.wikipedia.org/wiki/Lutz_Heilmann (german)

Trackback: http://www.golem.de/trackback/63574

BTW: You can support Wikipedia! http://wikimedia.de/spenden

Wednesday, November 12, 2008

Hello World!

I bought a Thinkpad R61 and installed Linux (KDE4) on it. My intention starting this blog is to publish my experience. Perhaps this helps another user with his problems.