tiistai 9. kesäkuuta 2009

Secrets of screencasting in Linux

"A screencast is a digital video recording that captures actions taking place on a computer desktop. Screencasts, which often contain voice-over narration, are useful for demonstrating how to use specific operating systems, software applications or website features."
Definition by: WhatIs.com


To be honest, there is nothing mysterious about screencasting on Linux operating system. Plenty of applications exist from recording your desktop to audio and video editing. But the small advice I can give is in form of applications that I've tried and found out to work best for my needs.

For me the workflow is only three phased, phases being: recording the video, editing the video and adding audio, and finally uploading the video Youtube and creating captions. Because I am not doing any voice-over narration (my english is not that good) I can skip any advanced audio editing that might be otherwise required.

Step one of the workflow is to record the video from your desktop. I've experimented with few applications and found out that application called recordMyDesktop suits my needs best. recordMyDesktop gives me stability, simplicity and performance that I require and most importantly it gets the job done. Changes are that you can find this application straight from your distributions software repository. recordMyDesktop saves the video to Ogg Vorbis Video format (.ogv) but on step two you can convert it to pretty much anything, besides at least Youtube accepts ogv-files just fine.

Step two is to edit the recorded video and add some audio to go with it. The application I use for this is called Cinelerra, it is a long standing video editing software for Linux and might actually be a bit "overkill" for screencasting needs. Previously I've edited a 7 minute making-of documentary of indie film called "Korpinkieli ja Vaeltaja" (website in finnish only) using Cinelerra.
Although it has been over three years since then, Cinelerra still feels very familiar and is now considerably more stable. Check out the tutorials on Cinelerra's website to get going, I assure you that once you get going it is very nice tool. After the video is edited it is time to add audio track. Because I'm no good as narrator, I've only added some Creative Commons music to the video.

Step three starts with uploading the video to the chosen video host. I am using Youtube, but of course there are also alternatives like Vimeo. After the video is uploaded I usually create the captions using the Youtube's caption editor. After that the video is ready for publishing.

Widening the scope

This blog started off as my personal diary, sort of, marking down my steps to Linux HTPC nirvana. Since the HTPC has been working pretty much flawlessly and I've been reluctant to fiddle with it, there has not been nothing to write about lately. So as of now I'm widening the scope of this blog to include also other things digital, besides just Linux and it's uses in HTPC.

The original intent of the blog will be tested soon. I've ordered couple new terabyte hard drives for my HTPC and they will house the new installation, actually the fourth incarnation of my personal HTPC. New drives are necessary because I don't want to lose my current setup so I've something to fall back onto in case something goes "horribly wrong". The old blog entries should come handy when I start anew, albeit this time around it will be Debian Linux not Gentoo. But more about that later on.

What those "other things digital", that I mentioned in the beginning of the entry, will be, I do not know yet. One idea is to blog about digital photography, a dear hobby of mine. Second thing is that I've been testing my mettle in screencasting lately and I would like to dedicate few blog entries to them next.

perjantai 9. tammikuuta 2009

Plans for the future

Everything has been working very nicely in my current HTPC installation since it's installation early 2008. Because of that, I think it is time to upgrade, the proverb "Don't fix it if it ain't broken" does not seem to ring any bells for me. I guess there has been too little tinkering lately.

New hardware?
Anyway, I am not planning any major hardware upgrades, I've been thinking of getting myself one of those small Logitech DiNovo Minis. But besides that I am mainly thinking about software upgrades, and plenty of them. I am still thinking of the best way to do the complete re-installation. I will be keeping the old installation as a backup, because from the past experience I know there will be some problems and delays before I get to same state of HTPC-nirvana I am with my current installation.

It remains to be seen if I figure out a way to do this without buying new harddrives, but it might be the safest bet to get two new (and bigger) drives from shop. It would also enable me to change my old Seagate disks to Seagate special DB35 or SV35 class of harddrives, which are designed to be run on HTPC, NAS or other 'embedded' systems. I have those already in my NAS and they seem to do what they promise, ie. low noise, low wattage and low temp, also because aforementioned things they should be more reliable.

New software!
On software side I have some grand plans.
First of all I want to install the latest Gentoo 2008 and the latest Linux Kernel. I want to also create RAID1 that I previously had, but also create separate LVM setup that houses recordings, this LVM shows itself as a single filesystem for VDR which can be quite difficult at times when using multiple filesystems for saving the recordings. Also LVM enables me to easily extend the space by adding new drives to LVM and thus expanding the space available for my recordings.

"Witness the power of this fully armed and ...
eh I mean "full upgraded" and operational HTPC.
"

With the new Gentoo and kernel I want to test out new ways of making the boot process even faster. Somethings called baselayout-2 and openrc should speed up it quite significantly. Who knows maybe the new kernel has better support for my motherboads ACPI and I can also enter Suspend2RAM and actually resume from it.

New kernel means that I have to once again change my kernel config, which gives my a good opportunity to take some features into use that I have previously disabled. I want to have AutoFS available to allow me easily mount Samba and NFS shares from my network, even if the shares are not available at boot time. I also will need to enable NFS support, NTFS support and FAT support in my kernel, to enable mounting of network shares and USB connected drives.

I also will probably update to latest Nvidia driver which enables hardware based video decoding, this is done with NVIDIA VDPAU support that was added in the latest stable driver 180.22. This also leads me to upgrading my Mplayer and Xine to enable support for the VDPAU. When compiling new Mplayer I need to keep in mind that I should enable mencoder make flag, that way I can use mencoder to automatically encode my DVB recordings via scripts.

Two of my main HTPC softwares are also in for a major upgrade, this is if I can wait until the 1.1.0 final of the MMS will finally by released. VDR has also received a major upgrade from my old 1.4.7 version as the 1.6 branch has gone stable. Especially the new VDR I fully expect to give me lots of headache, I run quite many plugins in 1.4.7 and I am not completely sure of their compatibility. 1.6 version of the VDR also enables me to use UTF8 finally, which should help me with filenaming problems. With these two upgrades I will also need to change my lirc setup and enhance the functionality even further.

Finally I plan to improve the fault tolerance of the system by duplicating the system partitions in that way, that if the first system fails for some reason, it will use the backup system automatically. I have done this with good results with my parents VDR setup, where the main disk is showing signs of ageing.

keskiviikko 23. heinäkuuta 2008

MMS 1.1.0 nearing completition

MMS picture browser in action.

Release candidate 7 (RC7 for short) of the MyMediaSystem 1.10 was released yesterday. This might actually also be the last RC before the final 1.10. Before final release the build needs to be tested and the bugs need to be squashed, but I have to say I so far have not found any. I have skipped last three of the RC's because my system has been working very well and I've been consciously trying to avoid fixing anything that is not broken. Also there has not been so important features (for me) to be worth the hassle. RC7 is completely different matter though and it actually has two "must have" new features that I could not just pass by.

The user interface in RC7 has had a major upgrade, it finally scales nicely to high definition TV resolutions. I use mine in 1080p (1920x1080 pixels) and previously the interface components, like text and icons were very small. But now the interface scales nicely to higher resolutions, my main menu is still a bit crowded but that is mainly because as experiment I enabled almost every feature in MMS, now I will just cut down to what I use.

Also the selection indicator in the browsers (video-, audio- and picture-collections) is now much clearer, it zooms the selected icon to be larger and it now makes it a lot easier to browse a big collection. The interface also seems to be more responsive or it might just have to do with the improved lirc-configuration, but anyway I am very pleased with the new interface.


Go here to see the complete changelog and list of new features. At the moment the download host seems to be down, but there is a working link to the source code few postings down.

Weather-plugin is old news, it was already included in previous versions,
but it now integrates to right hand corner notification area
(as demonstrated in the audio browser screenshot) with clock.

torstai 14. helmikuuta 2008

Quickie: Setting NTP

If you are doing DVB recordings via timers like I am, then you probably want to set up ntp-client to update the systemtime in startup.

During this past month that I have been slowly building my HTPC, systemtime is already ahead by five minutes. That means basically that every timer now starts recording 5 minutes too early and ends early also. I have, of course, setup extra time before and after every timer, in fact VDR does this by default. But if the time gets ahead by more than 10 minutes, my recordings start to end prematurely, which of course is not very nice.


So ntp-client to the rescue! Here is short how to, in which we are using NTP-server in Finland, please find one closer to your location.

echo "net-misc/ntp caps" >> /etc/portage/package.use
emerge -a ntp


Edit /etc/ntp.conf and change the server to one close to your location. For us Finns it is "server fi.pool.ntp.org".

Edit /etc/conf.d/ntp-client and change the NTPCLIENT_OPTS to following (again this server is in Finland)

NTPCLIENT_OPTS="-s -b -u fi.pool.ntp.org"

Test the ntp-client by issuing date commands before and after starting the ntp-client. System time should be updated. If it works, set it to run every boot by adding it to default runlevel.

date /etc/init.d/ntp-client start date rc-update add ntp-client default

If running time sync every boot is not enough for you, then you can set up the ntpd. But do not setup the ntpdate to be run by cron, here is why.

tiistai 12. helmikuuta 2008

Installing HTPC software (part 3)

In this entry we will have a look at how to install VDR (Video Disk Recorder) on Gentoo.

This time we are not going to utilise Gentoos excellent emerge-tool, but we are going to do it manually. Main reason for compiling VDR by ourselves, is that this way we get the version we want, with patches we want. For the first time it may be easier to install VDR via emerge, but later on, if you want to play more with VDRs plugins, I suggest that you compile it by hand.

Patching VDR can be little bit tricky, so I am going to use my old pre-patched version of 1.4.7 VDR source code. As with MMS there is also unstable release of VDR 1.5, this time however I am going to install the old and proven-to-be-stable version. You should probably download vanilla source code, that way you can patch it yourself if you need to and if not, you can keep the changes to minimum.

First thing is to take care of the dependencies, emerge libcap and jpeg. Those two are required for VDR to compile. Now download the source code (I am using root to run VDR, bad policy, I know) in to /root, then extract it. Now I have following directory /root/vdr-1.4.7 and I will create following symlinks, these are also needed for compilation. After that you can just issue "make && make install" in VDR directory.

ln -s /usr/src/linux /root/DVB
ln -s /root/vdr-1.4.7 /root/VDR


Compiling the plugins is a bit more involved. You must extract your plugins into /root/VDR/PLUGINS/src directory. That is not enough though, you also need to create a symlink for every plugin, removing the version numbering. For example this is what you would do for subtitles-plugin

cd /path/to/vdr/PLUGINS/src
wget http://virtanen.org/vdr/subtitles/files/vdr-subtitles-0.5.0.tgz
tar xvfmz vdr-subtitles-0.5.0.tgz
ln -s subtitles-0.5.0 subtitles


Do the same for all your plugins and modify the process accordingly, then just run "make plugins" in /root/VDR . If everything compiles correctly you need to copy the resulting files in /root/VDR/PLUGINS/lib to /vdr/lib, create the latter if it is not there already. (Notice that if you are compiling xineliboutput-plugin then you need to run "make install" in xineliboutputs own directory.)

Now you are set to go, meaning you can start the hard part, configuring VDR and plugins.

In next entry, configuring VDR and adding the needed scripts.

tiistai 5. helmikuuta 2008

Installing HTPC software (part 2)

OK kids, today we are learning how to install the MMS (that is short for My Media System kids) the ´Hard way´.

Nice screenshot showcasing new feature, movie thumbnailing.

Kidding aside, installing the latest, unstable release 1.1.0, is not that hard either. Thanks to nice people in Gentoo (and MMS) community we already have mms-1.1.0-rc1.ebuild available. Using the ebuild the installation is pretty easy, although it has few more steps to it, than the basic stable installation I talked about in part 1 of "Installing HTPC software".

First thing we need to do is create a local portage. Make sure you have /usr/local/portage directory available and create it if not. After that add the following line in to your /etc/make.conf, if it is not already there.

PORTDIR_OVERLAY="/usr/local/portage"

Then create the following directory structure

/usr/local/portage/media-video/mms

In the directory mentioned above, run following command to download the ebuild. (Sorry about the small print, but the blogger.com loses few letters from it if it is any bigger.)

wget ftp://83.142.84.214/gentoo-ebuild/mms/mms-1.1.0_rc1.ebuild

Then you need to make few changes to package.keywords and package.use files. The first one adds CPU-type detection for MMS package installation and another one tells emerge to use latest available version of MMS.

echo "media-video/mms cpudetection" >> /etc/portage/package.use
echo "media-video/mms ~*" >> /etc/portage/package.keywords


Next we "digest" the ebuild to create correct Manifest, then we are going to emerge the MMS.

ebuild mms-1.1.0_rc1.ebuild digest
emerge -av =media-video/mms-1.1.0_rc1


Now emerge should run its course and you should have functioning MMS as a result. Configuration files reside in /etc/mms directory, so start from there, some configuration is needed in several files. You should be able to figure out the needed changes, which of course, depend on your setup.

Before we can actually run the MMS we need to install X server, all we need is the most basic of graphical mode. I for example have no need for a desktop environment like KDE or Gnome. Installing basic GUI is as easy as typing "emerge xorg-server" after that you need to configure the graphics settings in /etc/X11/xorg.conf, but I will leave that to you, since every hardware configuration has it´s own settings. However here is a sample xorg.conf for Mirai DTL-642E500 television with Nvidia graphics adapter.

Once the xorg.conf is ready, easiest way to start MMS with X is to edit /etc/xinitrc file this file gets executed when X is started. So add a line like one below to start MMS automatically on X startup.

/usr/local/bin/mms

More on my MMS configuration in next entry (or one after that), you should be able to go on by yourself, configuring your /etc/mms settings to way you like.


Disclaimer: Thanks for the ebuild and advices on how to get it to work goes to Vitalogy in MMS forums.