*NIX
How to add sound/audio to a video on Linux
by Lennart on Jun.20, 2009, under *NIX
I am planning to create a ScopePort screencast soon. I had no experience with screencasts when I started to work on that topic. This is why I encountered two main problems:
- How do I create the video?
- How do I add sound to that video?
The first problem was solved easily. I tried a few screen recorders and decided to use recordmydesktop. The main advantage of recordmydesktop is that it captures everything in a raw mode and encodes it when you stop recording. That makes it possible to record your screen without bigger speed problems. Everything looks pretty smooth and is usable for a screencast.
The second problem cost me a lot of Google searching. How can I add sound to that video? Here is the way I finally used:
First step: Capture the video
No Problem. I started recordmydesktop with the following parameters to capture only the first screen, with a fake cursor (the original one from KDE4 caused some problems) and with no sound. The sleep 3 before the execution of recordmydesktop gives me some time to close the shell and get ready to record.
sleep 3 && recordmydesktop -width 1680 -height 1050 -dummy-cursor black --no-sound
Second step: Convert the captured video to AVI
The file recordmydesktop creates is in a OGG format. That is usually fine but we require an AVI file to add the sound. I converted the OGG file to AVI with mencoder (Usually available in your favorite repository):
mencoder -idx screencast.ogg -ovc lavc -oac mp3lame -o screencast.avi
Third and last step: Add the audio
Now we can edit the video file with avidemux (also usually available in your repositories). Select “Audio” -> “Main Track”.
Now select a AC3, MP3 or WAV file that should be added as the main audio track. Press okay, select “File” -> “Save” -> “Save video” and you are done. That’s it.
git: ‘init’ is not a git-command
by Lennart on Feb.06, 2009, under *NIX
You try to initialize a git repository with “git init” and get an error reply like:
git: ‘init’ is not a git-command
This happened to me on Debian Etch. You simply have a too old version of git! Uninstall your version (e.g. aptitude purge git) and download the current version from the git website.
The LHC is using KDE
by Lennart on Sep.10, 2008, under *NIX
I just read that the CERN Large Hadron Collider (LHC) that started it first “live” runs today is using KDE for at least some parts of the projects software. This screenshot of a KDE at CERN/LHC looks like a monitoring program (with a knote
):
http://www.bbc.co.uk/radio4/bigbang/gallery.shtml?select=13
I think this is a great prove for stability and flexibility of free software. I mean… The “biggest experiment of all times” seems to use KDE to at least monitor the systems. It is highly presumable that other parts of the LHC systems are using KDE, too.
Do you have other screenshots of the LHC experiment? Comments are welcome!
Check out kde.org and the blog of Aaron Seigo (the KDE hacker I got the information from)
[Edit]
I found some more interesting images:
http://www.spiegel.de/fotostrecke/fotostrecke-35141-3.html
http://www.spiegel.de/fotostrecke/fotostrecke-35141-5.html
http://img388.imageshack.us/my.php?image=ohptoftimemeasured13sepjy2.png (from slashdot.org)
How to permanently mount a samba share on GNU/Linux
by Lennart on Sep.05, 2008, under *NIX
It can be very useful to mount a samba share on a GNU/Linux system so that you can use it like a folder on a local hard disk.
It requires only 4 easy steps:
1. Check if smbfs is installed. Because smbfs is not an executable in e.g. /usr/bin you can check that by using “locate smbfs”. It is available in the repositories of many distributions. (try “aptitude install smbfs” on Debian)
2. Create (mkdir) a folder you want to mount the share in. I created /mnt/nas (because the share is on a NAS)
3. Try to mount the samba share (we will permanently mount it in the next step) by using this command:
mount -t smbfs -o username=youruser,password=yourpw //192.168.1.2/share /mnt/nas
4. If this works (ls /mnt/nas) you can permanently add the share to the fstab (so that it will be mounted on every boot):
vim /etc/fstab and add:
//192.168.1.2/share /mnt/nas smbfs username=youruser,password=yourpw
Have fun with your new permanent samba share!
How to get information about your own process
by Lennart on Sep.02, 2008, under *NIX
If you want to get Information of your own process on a GNU/Linux system you should take a look at the /proc/self/ pseudo-directory. This directory contains information of the process that is reading it. You could also find out the PID of the process and read files in the /proc/[PID]/ directory. However, the /proc/self/ directory always keeps information of the process that is reading it.
Take a look at the proc manual pages to get an explanation of the files. (man proc) The most interesting may be /proc/self/status. It is a human readable version of the most values from /proc/self/stat and /proc/self/statm.
The /proc/ directory should be well known by every GNU/Linux system programmer as it contains a lot of useful information about your system and your processes.
JavaScript Shell. Great proof of wise JS usage.
by Lennart on Aug.31, 2008, under *NIX, Worth looking at
JavaScript can be annoying. I don’t want elements in my browser to fade and wiggle. It consumes system ressources and slows down your workflow.
On the other hand wise usage of JavaScript can be helpful. I am currently writing on an article about how to use JavaScript in web applications and found this great proof of ingenious JavaScript programming while researching:
http://cb.vu/ – A virtual FreeBSD shell
[www@cb.vu]~> uname
FreeBSD
[www@cb.vu]~> uname -a
FreeBSD cb.vu 6.3-STABLE FreeBSD 6.3-STABLE #2: Wed Jan 30 16:21:05 CET 2008 c@cb.vu:/usr/obj/usr/src/sys/CB i386
Try out the VI!
Did you find some program or command that is worth to be tried out? Please leave a comment.


