Monday 11 October 2010

Linux (Ubuntu) - Capture, convert and edit Second Life videos with glc and kdenlive


Task: Capture, edit and convert Second Life videos
Operating System: Ubuntu Linux 10.04 LTS
Used software: glc, kdenlive


The 2nd video that I have captured in Second Life The Galaxy Night Club: http://www.youtube.com/watch?v=BzJ_qV-HU-U

Full instructions for Second Life videos capturing using Ubuntu Linux 10.04 and glc:


Part A.

Install glc and mencoder on your computer (running Ubuntu Linux)

1. Ubuntu (32-bit) users need following packages installed in order to compile glc:
sudo apt-get install build-essential cmake libx11-dev libxxf86vm-dev libgl1-mesa-dev libasound2-dev libpng12-dev


2. Additionally on 64-bit systems following commands are necessary:

sudo apt-get install gcc-multilib
sudo ln -s /usr/lib32/libGL.so.1 /usr/lib32/libGL.so
sudo ln -s /usr/lib32/libasound.so.2 /usr/lib32/libasound.so
sudo ln -s /usr/lib32/libXxf86vm.so.1 /usr/lib32/libXxf86vm.so
sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
sudo ln -s /usr/lib32/libpng12.so.0 /usr/lib32/libpng.so

Note: For some other Linux distributions, please follow the instructions on the link:
http://nullkey.ath.cx/projects/glc/wiki/HowtoInstall

3. Install and compile glc from the Terminal

wget http://nullkey.ath.cx/glc/scripts/glc-build.sh
chmod a+x glc-build.sh
./glc-build.sh

*while installing the package you will be prompted to choose from some options (yes / no) - please choose the default values and complete the installation

4. Install mencoder which is required in Part B, Step 6 for converting the .glc project file to .avi video

Open Synaptics Package Manager and on the left side highlight All. In the search field type mencoder, mark the box (if it is not installed yet) and click on Apply



Part B.


1. Download the Second Life Viewer for Linux from http://secondlife.com/support/downloads/?lang=en-US

Then unarchive the .tar.bz2 file in a folder on your computer (for ex. on your Desktop):

/home/username/Desktop/SecondLife-i686-2.1.1.208043/secondlife

2. Create a GLC Project folder where you will save your glc project file (.glc) and the converted .avi file:

sudo mkdir /home/username/Desktop/glcvideos

3. In my specific case I get an error when I try to extract the audio from the raw .glc file and that is why I use the command that extracts only the video in order to avoid recording unreasonably large files. When you run the command below in the Terminal Second Life Viewer will launch and GLC will start capturing media from there:

glc-capture -o /home/username/Desktop/glcvideos/test.glc -r 1 -l disable-audio -s /home/username/Desktop/SecondLife-i686-2.1.1.208043/secondlife

If you want to use the resize option while recording (-r) and to have the audio capturing enabled, just type:

glc-capture -o /home/username/Desktop/glcvideos/test.glc -r 0.5 -s /home/username/Desktop/SecondLife-i686-2.1.1.208043/secondlife

* -r -- is a parameter specifying the resize level

4. While you have the Second Life window maximized, press Shift+F8 to stop capturing media

5. Go to the terminal and type the command below in order to play the already captured video from the created project file .glc saved in your GLC project folder:

glc-play /home/username/Desktop/glcvideos/test.glc

6. Transcode the video from the .glc file into .avi file (without sound)
*The glc audio compiling option explained on http://nullkey.ath.cx/projects/glc/wiki/HowtoEncode (Part 1: transcode audio to MP3) is not working for me with videos captured in Second Life (getting error "Warning: Unsupported audio format"), that is why I am applying only the command that compresses the video:

glc-play /home/username/Desktop/glcvideos/test.glc -o - -y 1 | mencoder -demuxer y4m - -nosound -ovc x264 -x264encopts qp=18:pass=1 -of avi -o /home/username/Desktop/glcvideos/video.avi

Part C.

In this part I will show you how to add an audio track to the already captured video, how to add some effects and save the video in .mp4 format using Kdenlive ... coming soon

References:


http://nullkey.ath.cx/projects/glc
http://nullkey.ath.cx/projects/glc/wiki/HowtoInstall
http://nullkey.ath.cx/projects/glc/wiki/HowtoCapture
http://nullkey.ath.cx/projects/glc/wiki/HowtoPlayback
http://nullkey.ath.cx/projects/glc/wiki/HowtoEncode
http://www.linux.com/community/blogs/Recording-your-3D-Games-Made-Easy.html
http://primforge.com/2009-02-07/capturing-with-glc/
http://www.5min.com/Video/How-to-Render-Videos-in-Kdenlive-161784133
http://www.kdenlive.org/rendering-profiles
http://www.kdenlive.org/youtube-1280x720-3000k-2-pass
http://www.kdenlive.org/mlt-profiles



Acknowledgements:


*I would like to express my endless gratitude to the glc & kdenlive developers and contributors, also to the people that have written the amazing user guides and articles for these software packages.

*Special thanks to my friend Pav for helping me out with my blog's web design and saving me a lot of time. Many kisses !!!

No comments:

Post a Comment