Notes on ScopePort

Tag: audio

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”.

How to add sound/audio to a video on Linux

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.

Leave a Comment :, , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!