Monday, May 24, 2010

Convert AVHCD to AVI and burn as VCD

Getting AVHCD from a video camera into a PC a making it into a VCD. This is a weekend project.
Next, AVIs are great for the PC, however, to distribute to people who do not use PCs to watch movies or just to have a larger screen, it is better to convert the AVI into a VCD.

Step 1: Copy the files from the AVHCD camera
CAMERA: /media/disk-1/PRIVATE/AVCHD/BDMV/STREAM
PC: ~/Documents

Step 2: Convert to AVI.
Future action can consider direct preparation for MPG. Here it is in AVI because there was a need for me to prepare in various format apart from MPG or VCD.

Start KDENLive
- File -> Save As ->
- Project -> Add clip
- In the Project Tree window, drag the clips into the ti
meslots (bottow window)
- Click Render button ->AVI DV

Step 3: Get the converter programme called vcdimager
$ sudo apt-get install vcdimager

Step 4: Convert to mpg and the cue / bin
ffmpeg -i inputfile.avi -target pal-vcd outfilename.mpg
# create the cue and bin files. The label did not allow for spaces.
vcdimager -t vcd2 -l"Martha-Swimming-May-2010" -c vcd2.cue -b vcd2.bin outfilename.mpg

Step 5: Using K3B, choose project for Burn Image
Insert a blank CDROM
Image to burn ->Select the .cue file.

Image type ->Cue/bin

Click "Start"


===========
Using:
K3B version 1.68.0
KDE 4.3.2
CDRDAO 1.2.2
VCDimager 0.7.23
Kubuntu 9.10
===========

Sunday, May 23, 2010

Add Screensavers in KDE4

Screensavers are graphics that replaces the normal desktop screen when it is idle too long (it depends on the user setting). This should reduce the burnout of the screen and also hides the desktop contents from passing eyes.

Default install of Kubuntu did not have any of the nice screensavers. Check the screensavers by choosing the KMenu ->system Settings
Choose the General tab ->Desktop ->Screen saver


To install additional screensaver, use the Software Management such as KPackagekit or synaptic and install

kscreensaver-xsavers-extra

This can also be done at the terminal by typing
$ sudo apt-get install kscreensaver-xsavers-extra

This installs
kscreensaver
kscreensaver-xsavers
kscreensaver-xsavers-extra
libgle3
netpbm
xscreensaver
xscreensaver-data
xscreensaver-data-extra
xscreensaver-gl
xscreensaver-gl-extra

Install optional items;
$ sudo apt-get install xfishtank qcam streamer

Saturday, May 22, 2010

Start programming with QT4

If you ever are into open source software, eventually contribution of codes becomes part of the cycle. Trolltech from Oslo, Norway popularised the QT, which is a set of programming libraries that is used to develop graphical applications. In Linux, there is the KDE desktop manager that uses the QT libraries. Other popular applications that use QT are Opera,

Here is a guide to get started with QT programming (qt4 in this case) on Kubuntu 9.10. You will need the demo and the Graphical development tool

A. Setting up the environment
Step 1: Install the libraries and compilers. This include libraries such as "QLabel" and QLayout from the QtGui
$ sudo apt-get install build-essential kdelibs4-dev libqt4-qt3support libqt4-assistant

Step 2: Install the demos
$ sudo apt-get install qt4-demos

Step 3: Configure Linux to compile with qt4 instead of the default qt3
$ sudo update-alternatives --config qmake

Step 4: # install the Graphical development tool
$ sudo apt-get install kdevelop


Step 5: Read info on QT4 through the manuals at /usr/share/qt4/doc/html/index.html
$ assistant-qt4

B. General programming setup of project, compiling and execute

Step 1: Create the source files. E.g. .cpp, .h, etc.
Just copy from the demo files in /usr/lib/qt4/examples. I will use files from the example tabdialogs.
$ cp -r /usr/lib/qt4/examples/dialogs/tabdialog/ ~
$ cd ~/tabdialog

Step 2: Create the project file. The project file (.pro) define headers, sources, form and other files which the application consists of.
$ qmake -project

Step 3: Compile
$ qmake
$ make

Step 4: Run the programmes.
$ ./tabdialog

Alternatively, use the KDevelop to manage the project. Start KDevelop and open to .pro file.
$ kdevelop

C. References
  1. http://zetcode.com/tutorials/qt4tutorial/
  2. http://sector.ynet.sk/qt4-tutorial/my-first-qt-gui-application.html
  3. http://qt-apps.org/
Wishing you all the best in QT4 programming!

Tuesday, May 4, 2010

Scanning the hard disk status

The hard disk performance effects how people perceive their Linux box. If you say a system is slow, what is causing this? There are many reasons, among them are;
too many programmes running, lower processing speed of hardware, insufficient resources, etc.

You can use basic linux tools to give readings on the hard disk for benchmark purpose. Here are among commands that anyone can use via a terminal;

  1. Get timing of cache and device reads on inactive systems. This means nothing else is running during the test.
    hdparm -tT /dev/sda
  2. Shows the files opened by processes.
    lsof
  3. Monitor balance between input/output load of physical disk using the sysstat package. iostat -x
  4. Space on mounted devices.
    df -h
  5. Monitor load on a Linux system, default every 10 second updated.
    atop

Details on how to use the above commands can be found in the respective man pages.

Now you can tell someone, my disk is faster than yours.

Blog Archive