Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts

Monday, December 13, 2010

Creating a screencast in Ubuntu Linux

To create a screen cast in Ubuntu we need three softwares
  • recordmydesktop for capturing and recording the desktop
  • gtk-recordmydesktop, a graphical frontend for recordmydesktop
  • mencoder for encoding the recorded video to xvid or any other format.

If you also need to record your voice in the screencast then you will need a properly configured sound card along with a decent microphone. You can test your microphone and sound card settings using Sound Recorder.

You can install the softwares using the following command:
sudo apt-get install mencoder recordmydesktop gtk-recordmydesktop
after installation completes run gtk-recordMyDesktop from Applications->Sound & Video menu

If you want to record your full desktop then simply press record and recording will start. You will see a small square in the Notification Area.
This shows that recordmydesktop is currently recording. When you are done and want to stop recording just click on this square and recording will stop. This square will then turn into a red circle and recordmydesktop will start encoding the captured video. It will take some time before it finishes, after that you can find the recorded video in your home directory.
But if you dont want to record complete desktop but only want to capture a single window then you can click on Select Window button and then click on the title bar of the window that you want to record and recordmydesktop will only record the selected window.
If you dont want a specific window but you want the recording to be limited to specific screen area then you can select that area from gtk-recordMyDesktop's preview area. Just left click and drag your mouse to select the desktop area for recording.
recordmydesktop produces files with .ogv extension. I dont know what codec it uses but the files are big e.g a 10 min recording my take upto 60-70 MB. To covert these files into divx use following commands
mencoder your_file.ogv -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=658:pass=1 -oac pcm -o /dev/null
mencoder your_file.ogv -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=658:pass=2 -alang en -oac mp3lame -lameopts br=96:cbr:vol=6 -o your_file.avi
This will convert the ogv files into avi with xvid video and mp3 audio. After that you are done and your screencast is ready. If you want to edit this avi file to add some effects or any thing you can use Pitivi video editor which comes by default with Ubuntu (10.04 onwards)

Saturday, December 11, 2010

Linux Tutorial 1 - Installing Ubuntu

This is my first attempt at creating a screencast, a video tutorial explaining the installation of Ubuntu Linux.

Part 1: Installation




Part 2: Post Install

Tuesday, November 30, 2010

About .bashrc .bash_profile .profile .bash_login and /etc/profile

Have you ever wondered what is the purpose of ~/.bashrc ~/.bash_profile ~/.bash_login ~/.profile and /etc/profile files in Linux.

Bash is the default shell on most of the Linux distributions like Fedora and Ubuntu. If you take a look at man pages for Bash, you will get the following explanation:
When bash is invoked as an interactive login shell, or as a  non-interactive  shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.  
...
When  an  interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exist. 
Interactive shell is the one which is not running because of a script and lets you enter commands to interact with it. Login shell is the one where you are asked for user name and password before you can enter commands. An example of an interactive login shell is the one that you get after you login to a system using ssh. An example of non-login interactive shell is a shell that you get when you run terminal from menu item or some icon.

So when you login to a Linux system, first commands from /etc/profile (if it exists) will get executed. Then the system will look for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and execute commands from the first of these files that it founds. And when you open Konsole/Terminal from KDE or GDM, first commands from /etc/bash.bashrc (if it exists) will get executed and then commands from ~/.bashrc (if it exists) will get executed.

So if you want to execute a command for all users then you will need to add it to /etc/profile but if you want a command executed for a specific user then you can add it to .profile, .bash_profile, .bash_login or .bashrc in his/her home directory.

Please keep in mind that KDE and GDM are not login shells so there behavior is different. I dont know about KDE but GDM first executes command from /etc/profile and then from ~/.profile.