Blender, graphic, software, open source, Linux LibreOffice, open source, openoffice Gimp, graphic, software, open source, Linux kernel, Linux, software, open source Linux, distributions, Ubuntu, Linux Mint, Fedora, Mandriva Jamin, gpl, library, open source matroska, multimedia, container, linux pcman, file manager, linux LuninuX, distribition, Linux, open source Linux, infographic, history

Sunday, May 29, 2011

Bodhi Linux incredibly good, lightweight, very minimal Ubuntu derivative.

Bodhi Linux is an Ubuntu-based distribution for the desktop featuring the elegant and lightweight Enlightenment window manager.

The project, which integrates and pre-configures the very latest builds of Enlightenment directly from the project's development repository, offers modularity, high level of customisation, and choice of themes.

The default Bodhi system is light -- the only pre-installed applications are Midori, LXTerminal, PCManFM, Leafpad and Synaptic -- but more software is available via Bodhi Software Center, a web-based software installation tool.

Introduction to bod Files.


The current .bods are fairly hackish package up of a whole bunch of .deb files. Jeff Hoogland
If one downloads a bod file and opens it in a text editor you will notice that it appears to be a shell script with some binary code attached to the end of it. That is exactly what a bod file is, a shell script with a self-extracting archive attached which executes an installation script contained within the archive. In this way it is comparable to self extracting Zip files which you may be familiar with if you have ever installed much software in Windows. You will also notice if you have examined a bod file the line:

# This script was generated using Makeself 2.1.5
 
This provides us with a clue as how a bod file is created. Makeself is a program which

is a small shell script that generates a self-extractable tar.gz archive from a directory. The resulting file appears as a shell script (many of those have a .run suffix), and can be launched as is. The archive will then uncompress itself to a temporary directory and an optional arbitrary command will be executed (for example an installation script). This is pretty similar to archives generated with WinZip Self-Extractor in the Windows world. Makeself archives also include checksums for integrity self-validation (CRC and/or MD5 checksums).



Updates (via Distrowatch):


Bodhi Linux Jeff Hoogland has announced the release of Bodhi Linux 1.2.0, an Ubuntu-based distribution featuring the latest development build of the Enlightenment 17 desktop: "20,000 forum posts and over 100,000 downloads later the Bodhi team and I are proud to announce our second point release - Bodhi Linux 1.2.0. Current Bodhi users can easily update their system to this latest release. This release is largely for keeping packages up to date, so the following are the core system packages that have been updated for this release: Linux kernel 3.0, Enlightenment built from SVN on 2011-09-06, Midori 0.4.0. There is more to this release than just packages though. Our document team has been working furiously to improve our documentation, both on our Wiki and our locally installed pages. Our recently published 'Bodhi Guide to Enlightenment' is also now stored locally for offline use in the Midori web browser."

See the full release announcement for more information.

Download: bodhi_1.2.0.iso (369MB, MD5).


Recent versions:

 • 2011-09-08: Distribution Release: Bodhi Linux 1.2.0
 • 2011-05-27: Distribution Release: Bodhi Linux 1.1.0
 • 2011-03-26: Distribution Release: Bodhi Linux 1.0.0
 • 2011-03-11: Development Release: Bodhi Linux 0.1.7
 • 2011-02-20: Development Release: Bodhi Linux 0.1.6

Bodhi Linux Add Software Home.

Welcome to the Bodhi Linux software page. Here you will find easy to install software for any task on your Bodhi desktop! Note that Midori or Firefox are REQUIRED for the “Install Now” method. The “Download” method will work in any browser. Please see the Installation Instructions

Software Bundles (aka meta-packages)

Nikhila Application Set
An Application Suite of full featured software.

Pratibha Application Set
An Application Suite that focuses on packages that are light on resources but high on functionality.

Software Categories

Recently Added

The Bodhi Store

Graphics

Internet

Multimedia

Office

Extra

Screenshots.




Custom Search
Adserver                   610x250 
If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:


Thursday, May 26, 2011

HandBrake is an open-source program designed to convert MPEG video.

HandBrake is an open-source program designed to convert MPEG video (including DVD-Video) into an MPEG-4 video file in MPEG-4 Part 14 (.mp4) or Matroska (.mkv) containers.

The program is used to convert DVDs into other forms so they can be viewed on iPods, iPhones and with the Apple QuickTime Player and most media players.

Originally developed for BeOS, HandBrake is now available for Linux, Microsoft Windows and Mac OS X.

Supported file types
.

Input:

    DVD, DVD image, DVD VOB files, MPEG-TS, Matroska, AVI, mpeg-4, etc
    Any DVD or Bluray-like source: VIDEO_TS folder, DVD image, real DVD or bluray (unencrypted -- removal of copy protection is not supported), and some .VOB, .TS and M2TS files
    Most any multimedia file it can get libavformat to read and libavcodec to decode.

Handbrake cannot at present encode from DRM-encrypted videos purchased from iTunes or found on DVD or Blu-Ray discs. However, if VLC is installed under a Unix-based system, encrypted DVDs can be read as well.

Output:


    Container formats: MP4, MKV, and M4V (also AVI and OGV until 0.9.4).
    Video Codecs: x264 (with H.264 output), FFmpeg (with MPEG-4 ASP output) and Theora (1 or 2 passes or constant quantizer encoding)
    Audio: AAC, MP3, Vorbis, AC-3 pass-through, or DTS passthrough. (supports encoding of several audio tracks).

Batch encoding.

HandBrake supports batch encoding through the Windows, Linux, and OS X GUI, though jobs must be queued one by one. It is also easily automated using the HandBrake CLI (command line interface). A number of third-party scripts and UI's exist for this purpose such as HandBrake Batch Encoder and Videoscripts , both of which make use of the CLI to enable queueing of several files in a directory or tree at once.


Features.

  •     Chapter selection, Chapter Markers
  •     Subtitles

        Soft subtitles (not permanently rendered to frame)
        Vobsub and Closed Captions
        SRT import and passthru
        SSA passthru or burn-in (experimental)

  •     Integrated bitrate calculator
  •     Constant Quality or Average Bitrate Video Encoding
  •     Picture deinterlacing[7]
  •     Inverse Telecine
  •     Cropping and scaling
  •     Support for VFR, CFR and VFR
  •     Video: Deinterlacing, Decomb, Detelecine, Cropping and scaling
  •     Audio: Dynamic Range Compression; Dolby Pro-Logic II mixdown of multichannel audio
  •     Grayscale encoding
  •     Live Video Preivew

Subtitles
Subtitles may be stored in different formats within media or as additional files:

  • Bitmaps (Pictures), e.g. DVD VOBSUBs
  • Text with markup, e.g. Closed Captions and SRT files.
  • Styled SSA, e.g. most anime subtitles in MKV files
HandBrake can use subtitles tracks as INPUT from the following sources:

  • From DVD’s – Either embedded VOBSUB or CC tracks.
  • User supplied SRT files.
  • From Files (such as mkv or mp4) - Embedded subtitle tracks.
HandBrake has two methods of subtitle OUTPUT:

  • Hard Burn: This means the subtitles are written on top of the image permanently. They cannot be turned on or off like on the DVD.
  • Soft Subtitles: This means the subtitles will appear as separate selectable tracks in your output file. With the correct playback software, you’ll be able to enable / disable these subtitles as required.

Subtitle Outputs

  • DVD and ASTC Closed Captions - When selected, these will be passed through from your source file to the MKV or MP4 output file.
    • CC tracks cannot be burned into the video.
    • Only 1 CC track can be read from the source.
    • CC tracks within an MP4 appear as a subtitle track, not a CC track.
  • SRT subtitle import – You can import SRT files into HandBrake through the “Subtitles tab”.
    • SRT files are pass-through only. They cannot be burnt into the video.
    • You can import multiple SRT subtitle tracks.
    • You can set an offset (measured in milliseconds) to change the start time that the first and subsequent SRT subtitles will appear. Use trial and error encoding a single chapter to obtain the correct offset.
    • You should make sure the correct character code is selected from the “Char Code” dropdown. Selecting the wrong code, will result in your output file having no subtitle track, and can cause the player to crash when playing that track.
  • SRT Passthru
    • SRT Subtitles can also be passed through from input video files.
  • DVD Bitmap Subtitles (VOBSUB)
    • With MP4, you can burn ONLY 1 subtitle track into the video.
    • With MP4, you can not pass-through VOBSUB tracks.
    • With MKV, you can pass-through multiple VOBSUB tracks. These are not burned into the video unless you choose to do so however you can only burn 1 subtitle track into the file. The rest must be passed through.
  • SSA Subtitles
    • SSA Subtitles can be passed-thru or burned into the video.
    • When burned into the video, all styling (e.g. fonts, colors, etc) is preserved.
      • Animated effects (e.g. fade in/out, karaoke) are not currently supported. (Only the middle frame of the animation will be used.)
    • When passed-thru as text, only bold/italic/underline styles are preserved. Some players may not support the simultaneous display of multiple passed-thru SSA subtitles.
Setting a Default Subtitle track

If you wish to have your player automatically select a subtitle track during playback, then you can select the “default” checkbox for the subtitle track you wish to enable. You should note that this does not currently work with Apple software or playback devices.

While this option is available for mp4 files, it does not currently serve any purpose. Default subtitle tracks will only be enabled on playback when using mkv files.

Forced Subtitles

With some DVD sources, there is a subtitle track which only displays during foreign language sections of the video. On some titles this is a unique subtitle track in the same language as the main audio track, on others it uses the standard subtitle track in the same language as the main audio track except marks a subset of the subtitles as forced.

In order to select this track, HandBrake can scan the source for subtitles that appear only 10% (or less) of the time in addition to scanning for the presence of any forced subtitles.

To enable this functionality within the HandBrake user interface, from the “Subtitles” tab select the “Foreign Audio Search (Bitmap)” option from the “Track” dropdown menu and click the “Forced” Checkbox.

If you do not get a foreign section only subtitle track in your output file, then you may have to manually find and select the correct subtitle track from the “Track” dropdown menu.

In order to determine which subtitle track to select open the Activity Window and look for the following text:


[10:08:16] Subtitle stream 0x20bd 'English': 421 hits (0 forced) [10:08:16] Subtitle stream 0x34bd 'English': 1640 hits (0 forced) [10:08:16] Subtitle stream 0x35bd 'English': 3829 hits (0 forced) [10:08:16] No candidate subtitle detected during subtitle-scan 
In this case you can see that subtitle 0x20bd should probably be selected manually. The subtitle numbers may be obtained by looking for the output of the scan, the number will correspond with where in the drop down menu that subtitle will appear in the GUI.
[10:07:40] scan: checking subtitle 1 [10:07:40] scan: id=20bd, lang=English, 3cc=eng [10:07:40] scan: checking subtitle 2 [10:07:40] scan: id=21bd, lang=Italiano, 3cc=ita [10:07:40] scan: checking subtitle 3 [10:07:40] scan: id=22bd, lang=Nederlands, 3cc=dut [10:07:40] scan: checking subtitle 4 [10:07:40] scan: id=23bd, lang=Arabic, 3cc=ara [10:07:40] scan: checking subtitle 5 [10:07:40] scan: id=24bd, lang=Bulgarian, 3cc=bul [10:07:40] scan: checking subtitle 6 [10:07:40] scan: id=25bd, lang=Hrvatski, 3cc=scr [10:07:40] scan: checking subtitle 7 [10:07:40] scan: id=26bd, lang=Dansk, 3cc=dan [10:07:40] scan: checking subtitle 8 [10:07:40] scan: id=27bd, lang=Suomi, 3cc=fin [10:07:40] scan: checking subtitle 9 [10:07:40] scan: id=28bd, lang=Greek, Modern, 3cc=gre 

Audio.


First, let's review the different sorts of surround sound you'll commonly encounter.
HandBrake offers several surround options depending on your uses.
  • The simplest method is using Dolby Pro Logic II. This is the default behavior for HandBrake. If you feed HandBrake an Dolby Digital AC3 or Digital Theater System 5.1 sound track and tell it to convert using AAC, it will default to converting or "downmixing" the track to Dolby Pro Logic II in an AAC track. This will sound fine on both stereo and surround audio systems and will play in pretty much anything. If your DVD already contains Dolby Pro Logic audio, also known as Dolby Surround, it will be preserved. If you wish, you can use Dolby Pro Logic I instead of II, by selecting "Dolby Surround" from the Track Mix drop-down menu. Be aware that, due to technical concerns, Dolby Pro Logic II is currently created as 5.0 sound. This means there is no separate subwoofer channel. Adding the sub channel can cause serious distortion, depending on how the DVD's audio was mastered.
  • The next method is called pass-through. This just copies, bit-for-bit, the soundtrack on your DVD. AC3 pass-through is possible in the .mkv, and .mp4 containers. DTS pass-through is possible in the .mkv container. QuickTime can decode AC3 audio but cannot pass it audio your optical port for use with a surround sound receiver. However, you can download a 3rd party QuickTime component from the open-source  Perian project to achieve this. If you use the .mp4 container, you can pass-through AC3 audio in VLC, Perian, or on the AppleTV, although you have to end the file name in .m4v instead of .mp4 for QuickTime and the AppleTV. Using AC3 in .mp4 this way is standards-based, but it's a new standard and not everyone is on board yet. VLC or Perian can decode DTS audio in .mkv files, but pass-through of DTS is currently broken in Perian. To use pass-through, make sure you have AC3 or DTS Passthru selected in the Audio Codecs pop-up menu.
  • You can also combine Pro Logic II and AC3 pass-through. This will give you a file that will play anywhere from QuickTime to VLC to the iPhone (using the AAC Pro Logic II track) and play in true surround sound on an AppleTV or in Perian. It is the best of both worlds, and it is only possible in the .mp4 and .mkv containers. Again, MP4 file names must, confusingly, end in .m4v for QuickTime to read them. To use this hybrid format, in the Audio tab, set the first audio track to be the track you want, in AAC sound. Then set the second track to also use the same source track, and select AC3 pass-through.
  • Another method is to create 5.1 channel AAC audio tracks. For the Track Mix, select "6 channel discrete" from the drop-down menu, and your movie will contain discrete surround sound in the modern AAC format. This takes up less space than AC3: instead of 448kbps, you can do well with 384kbps (64 kbps per channel). Its real benefit is that it doesn't make QuickTime barf. Sadly, it is very difficult to hear all those discrete channels of sound. It cannot be sent over an optical cable to a home theater amp. If you try, whether on a Mac or an AppleTV, you will only hear "downmixed" surround sound, similar to Dolby Pro Logic. To hear the discrete surround sound in all its glory, you will need to attach an analog surround sound device to your Mac. One popular device is the  Griffin FireWave. Then, you have to attach a cable to your amp/receiver for each of the six speaker channels. It cannot be done over optical/HDMI.

Activity Window and Log (Linux GTK GUI)

The Activity Window in the Linux Gui is opened (if its not already open) by clicking on the "Activity Window" icon in the toolbar. This window shows a detailed log of everything handbrake is doing. Why is this important and useful? Other than power users wanting to see what is going on in HandBrakes? heart and soul (libhb and the 3rd party contribs) it is also helpful to the average user as you can copy and paste its contents into our support forums so we can see exactly what HandBrake was doing to help answer your questions.
Note: When copying and pasting the output of the log, please enclose the log in "Code" tags when posting on the forum. (there is a button for this) It just makes the forum easier to read.

The Activity Log File

Activity logs are stored to disc after each scan or encode.

The current session is written to the file "Activity.log". Typically, this will be in the directory "$(HOME)/.config/ghb", but it is possible for the system to have a different default data directory. So the full path is also shown at the top of the activity window in the gui. A history of all encodes are also stored in separate log files. These can typically be found in the directory "$(HOME)/.config/ghb/EncodeLogs". These are text files, so you can view them with your favorite text editing/viewing tool.
Screenshots.




Download.

Ubuntu Ubuntu
Ubuntu Fedora 14
For Ubuntu deb
Available at: Ubuntu PPA page.
For Fedora 14 ONLY rpm
Download (32bit)
Download (64bit)


Custom Search
Adserver                   610x250 
If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:


Saturday, May 21, 2011

The Linux Kernel Sources.

This chapter describes where in the Linux kernel sources you should start looking for particular kernel functions.
This book does not depend on a knowledge of the 'C' programming language or require that you have the Linux kernel sources available in order to understand how the Linux kernel works. 

That said, it is a fruitful exercise to look at the kernel sources to get an in-depth understanding of the Linux operating system. This chapter gives an overview of the kernel sources; how they are arranged and where you might start to look for particular code.

Where to Get The Linux Kernel Sources

All of the major Linux distributions ( Craftworks, Debian, Slackware, Red Hat etcetera) include the kernel sources in them. Usually the Linux kernel that got installed on your Linux system was built from those sources. By their very nature these sources tend to be a little out of date so you may want to get the latest sources from one of the web sites mentioned in chapter  www-appendix. They are kept on ftp://ftp.cs.helsinki.fi and all of the other web sites shadow them. This makes the Helsinki web site the most up to date, but sites like MIT and Sunsite are never very far behind. 

If you do not have access to the web, there are many CD ROM vendors who offer snapshots of the world's major web sites at a very reasonable cost. Some even offer a subscription service with quarterly or even monthly updates. Your local Linux User Group is also a good source of sources. 

The Linux kernel sources have a very simple numbering system. Any even number kernel (for example 2.0.30) is a stable, released, kernel and any odd numbered kernel (for example 2.1.42 is a development kernel. This book is based on the stable 2.0.30 source tree. Development kernels have all of the latest features and support all of the latest devices. Although they can be unstable, which may not be exactly what you want it, is important that the Linux community tries the latest kernels. That way they are tested for the whole community. Remember that it is always worth backing up your system thoroughly if you do try out non-production kernels. 

Changes to the kernel sources are distributed as patch files. The patch utility is used to apply a series of edits to a set of source files. So, for example, if you have the 2.0.29 kernel source tree and you wanted to move to the 2.0.30 source tree, you would obtain the 2.0.30 patch file and apply the patches (edits) to that source tree: 

$ cd /usr/src/linux
$ patch -p1 < patch-2.0.30


This saves copying whole source trees, perhaps over slow serial connections. A good source of kernel patches (official and unofficial) is the http://www.linuxhq.com web site.

 

How The Kernel Sources Are Arranged

At the very top level of the source tree /usr/src/linux you will see a number of directories:
arch
The arch subdirectory contains all of the architecture specific kernel code. It has further subdirectories, one per supported architecture, for example i386 and alpha.
include
The include subdirectory contains most of the include files needed to build the kernel code. It too has further subdirectories including one for every architecture supported. The include/asm subdirectory is a soft link to the real include directory needed for this architecture, for example include/asm-i386. To change architectures you need to edit the kernel makefile and rerun the Linux kernel configuration program.
init
This directory contains the initialization code for the kernel and it is a very good place to start looking at how the kernel works.
mm
This directory contains all of the memory management code. The architecture specific memory management code lives down in arch/*/mm/, for example arch/i386/mm/fault.c.
drivers
All of the system's device drivers live in this directory. They are further sub-divided into classes of device driver, for example block.
ipc
This directory contains the kernels inter-process communications code.
modules
This is simply a directory used to hold built modules.
fs
All of the file system code. This is further sub-divided into directories, one per supported file system, for example vfat and ext2.
kernel
The main kernel code. Again, the architecture specific kernel code is in arch/*/kernel.
net
The kernel's networking code.
lib
This directory contains the kernel's library code. The architecture specific library code can be found in arch/*/lib/.
scripts
This directory contains the scripts (for example awk and tk scripts) that are used when the kernel is configured.


Where to Start Looking

A large complex program like the Linux kernel can be rather daunting to look at. It is rather like a large ball of string with no end showing. Looking at one part of the kernel often leads to looking at several other related files and before long you have forgotten what you were looking for. The next subsections give you a hint as to where in the source tree the best place to look is for a given subject.

System Startup and Initialization

On an Intel based system, the kernel starts when either loadlin.exe or LILO has loaded the kernel into memory and passed control to it. Look in arch/i386/kernel/head.S for this part. Head.S does some architecture specific setup and then jumps to the main() routine in init/main.c.

Memory Management

This code is mostly in mm but the architecture specific code is in arch/*/mm. The page fault handling code is in mm/memory.c and the memory mapping and page cache code is in mm/filemap.c. The buffer cache is implemented in mm/buffer.c and the swap cache in mm/swap_state.c and mm/swapfile.c.

Kernel

Most of the relevent generic code is in kernel with the architecture specific code in arch/*/kernel. The scheduler is in kernel/sched.c and the fork code is in kernel/fork.c. The bottom half handling code is in include/linux/interrupt.h. The task_struct data structure can be found in include/linux/sched.h.

PCI

The PCI pseudo driver is in drivers/pci/pci.c with the system wide definitions in include/linux/pci.h. Each architecture has some specific PCI BIOS code, Alpha AXP's is in arch/alpha/kernel/bios32.c.

Interprocess Communication

This is all in ipc. All System V IPC objects include an ipc_perm data structure and this can be found in include/linux/ipc.h. System V messages are implemented in ipc/msg.c, shared memory in ipc/shm.c and semaphores in ipc/sem.c. Pipes are implemented in ipc/pipe.c.

Interrupt Handling

The kernel's interrupt handling code is almost all microprocessor (and often platform) specific. The Intel interrupt handling code is in arch/i386/kernel/irq.c and its definitions in include/asm-i386/irq.h.

Device Drivers

Most of the lines of the Linux kernel's source code are in its device drivers. All of Linux's device driver sources are held in drivers but these are further broken out by type:
/block
block device drivers such as ide (in ide.c). If you want to look at how all of the devices that could possibly contain file systems are initialized then you should look at device_setup() in drivers/block/genhd.c. It not only initializes the hard disks but also the network as you need a network to mount nfs file systems. Block devices include both IDE and SCSI based devices.
/char
This the place to look for character based devices such as ttys, serial ports and mice.
/cdrom
All of the CDROM code for Linux. It is here that the special CDROM devices (such as Soundblaster CDROM) can be found. Note that the ide CD driver is ide-cd.c in drivers/block and that the SCSI CD driver is in scsi.c in drivers/scsi.
/pci
This are the sources for the PCI pseudo-driver. A good place to look at how the PCI subsystem is mapped and initialized. The Alpha AXP  PCI fixup code is also worth looking at in arch/alpha/kernel/bios32.c.
/scsi
This is where to find all of the SCSI code as well as all of the drivers for the scsi devices supported by Linux.
/net
This is where to look to find the network device drivers such as the DECChip 21040 PCI ethernet driver which is in tulip.c.
/sound
This is where all of the sound card drivers are.

File Systems

The sources for the EXT2 file system are all in the fs/ext2/ directory with data structure definitions in include/linux/ext2_fs.h, ext2_fs_i.h and ext2_fs_sb.h. The Virtual File System data structures are described in include/linux/fs.h and the code is in fs/*. The buffer cache is implemented in fs/buffer.c along with the update kernel daemon.

Network

The networking code is kept in net with most of the include files in include/net. The BSD socket code is in net/socket.c and the IP version 4 INET socket code is in net/ipv4/af_inet.c. The generic protocol support code (including the sk_buff handling routines) is in net/core with the TCP/IP networking code in net/ipv4. The network device drivers are in drivers/net.

Modules

The kernel module code is partially in the kernel and partially in the modules package. The kernel code is all in kernel/modules.c with the data structures and kernel demon kerneld messages in include/linux/module.h and include/linux/kerneld.h respectively. You may want to look at the structure of an ELF object file in include/linux/elf.h. 

Adserver                   610x250 
If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:


Pyvnc2swf is a cross-platform screen recording tool.

Pyvnc2swf is a cross-platform screen recording tool. It captures screen motion through VNC protocol and generates a Shockwave Flash (SWF) movie.


Vnc2swf comes in two versions. The older C version is outdated and not recommended. The newer Python version, pyvnc2swf, is the one to install. I installed pyvnc2swf on openSUSE 10.0, but the same download works on any platform with Python and pygame. Pyvnc2swf also requires a VNC server; you can use TightVNC, RealVNC, or UltraVNC, to name a few.


There is not much to getting pyvnc2swf up and running. A tarball is available for use on any system that supports Python -- Linux, Mac OS X, and Windows included. Once you've installed the prerequisite software, use the usual tar -zxvf pyvnc2swf-0.8.2.tar.gz to unpack the archive. You will see a directory named pyvnc2swf-0.8.2. To start pyvnc2swf, go into the newly created directory and run the script vnc2swf.py. This pops up a window with the hostname and port for pyvnc2swf to connect to. You can connect to your local host, in which case the default localhost:5900 is correct.


Once pyvnc2swf starts up, click on the Save As box and choose a name for the recording. There are three file types you can choose to save as: shape, video and VNCRec. According to the documentation, shape seems to be the preferred video format, because it is the most compatible with older versions of Flash. The video format produces the smallest size videos, but they work only with Flash 7 and up. You can convert from shape to video format later. This creates a smaller video that is compatible with older versions of Flash. VNCRec uses an older format for recording VNC sessions that is not Flash-compatible.

In practice you should be fine with the video format, but I'm going to use shape for now so we can explore using pyvnc2swf's editor.


Click Start to begin recording all of the windows on your screen. A one-minute test recording I made took up 376KB of disk space in shape format.


Pyvnc2swf provides two ways to view video. The first is by using the play.py script to play back the file. You can use this method regardless of whether you have Flash player installed.



Pyvnc2swf can also create a Web page with the Flash video embedded in it. My only problem with it is that the default behavior loops the video over and over again. To change this, edit the HTML file and change both instances of loop="True" to loop="False".



Pyvnc2swf suite comes with three Python programs:
  • vnc2swf.py - Recorder
  • edit.py - Movie editor (This is NOT a general SWF file editor. It only supports movies generated by vnc2swf.)
  • play.py - Simple movie viewer
For questions, please read the FAQ and list archives before sending me emails.



Terms and Conditions: Pyvnc2swf comes with ABSOLUTELY NO WARRANTY. This software is distributed under the GNU General Public License.


Installation.

In all platforms, the following packages are required:
  • Python (2.4 or above)
  • Pygame (1.6 or above)
  • Optional: PyMedia (1.3.5 or above - required for mpeg encoding)
In most Linux distros, these packages are readily available. In Mac OS X, you would need an additional OS X build of Pygame package.
Also, you need at least one VNC server:
  • RealVNC or TightVNC (Unix, Linux or Windows)
  • x11vnc (Unix/Linux for recording an existing desktop)
  • OSXVnc (Mac OS X)
  • GNOME Vino (This is not an independent package, but if you have GNOME desktop environment which supports remote desktop functionality, you have it.)


Recording.

vnc2swf.py program captures a VNC sessions and records it in either SWF or VNCLog format. This is a VNC client and communicates directly with a VNC server. A user need to start a VNC server in advance.



vnc2swf.py runs in two different modes: GUI (Graphical User Interface) mode and CLI (Command Line Interface) mode. In the GUI mode, start recording by clicking the "Start" button. Then choose the "Save as..." command from the "File" menu to save the recorded movie to a file. In the CLI mode, a user needs to specify the output filename from command line. Recording is started immediately. In both modes, a user is prompted for a VNC password if the server requires authentication (and unless the user doesn't specify the password file). In the CLI mode, hit Control-C to stop recording. After finishing recording, it generates two files with the specified name: a .swf and .html file. The .html file contains an HTML tag and a javascript code to provide seek bar function.




A user can choose three different methods to encode movie image: "flv", "swf5", "swf7", "mpeg" (PyMedia required), or "vnc". The first swf5 encoding (default) provides a reasonable movie size. The second encoding method, swf7 provides a smaller SWF movie. This is, however, not recommended to use within vnc2swf.py for two reasons: This type of encoding is only supported by Flash Player version 7 or newer. Also, generating a movie with on-the-fly swf7 encoding is slower so you might experience frame dropping. Actually, you can convert a swf5-encoded movie into swf7-encoded one after recording by using edit.py, so anyway you don't need to use this method when recording. The third encoding method is vnc. This method generates a .vnc (VNCLog) file, which is compatible with vncrec output file. You can convert it to a SWF movie with edit.py. A .vnc file is not a SWF movie by itself, but its encoding is the fastest.

NOTE: Unlike the C version, vnc2swf.py doesn't handle any user interaction. If you want to control the server's desktop, you need to launch vncviewer or its equivalent separately.


Syntax

  • (GUI) $ vnc2swf.py [-o filename] [options] [host[:display] [port]]
  • (CLI) $ vnc2swf.py -n -o filename [options] [host[:display] [port]]

Example

<em>(Record a virtual screen)</em> $ <strong>vncserver -geometry 640x480</strong> $ <strong>vnc2swf.py -o out.swf localhost:1</strong>  <em>(Record an existing screen)</em> $ <strong>x11vnc -localhost -viewonly -wait 10 -defer 10 -bg</strong> $ <strong>vnc2swf.py -o out.swf localhost:0</strong>  <em>(Record a remote screen)</em> $ <strong>vnc2swf.py -n -o out.flv vnc.example.com:1</strong>  
If you're using x11vnc, see also recordwin. This is a convenient script to record a particular window.


Recording Tips.

  • Use as small screen size as possible, or try to specify the smallest clipping rectangle. With a large screen, VNC's screen polling gets slower and vnc2swf also gets slower for converting bigger images. Using a small screen also helps reducing the movie size.
  • Reducing the framerate sometimes helps reducing the movie size. If the generated movie is still very big, try resampling frames or scaling the image with edit.py.
  • To record a long movie (more then 20min.), the only available option is to use flv (or mpeg if you have PyMedia). swf5 or swf7 files have a limitation and lcan have up to 16000 frames, which is roughly 22 minutes.
  • If you experience frame dropping, try changing the server options for screen polling (if any). If you're using x11vnc, try adding -wait 10 -defer 10.
  • When recording flv movie, you can dump a live stream output to stdout by speficing '-' as a filename. But currently I have no idea how to use. (broadcasting your desktop on the web?)

Options

-n
Console mode (no GUI).
-o outputfile
Specifies the output filename. This option is required in CLI mode. In GUI mode, when not specified it prompts the user for the filename. The movie encoding type is usually inferred from the filename, so the filename should end with either ".swf" or ".vnc". Otherwise, the user need to specify the output movie encoding with -t option (see below.)
-C clipping
Specifies the clipping rectangle. The geometry must be as form of "widthxheight+left+top" (e.g. "400x300+120+0"). Unlike other X11 applications, all rectangular components are required. Negative values are not supported.
-r framerate
Specifies the framerate in fps. (default=12.0)
-t encodingtype
Specifies the output movie encoding method ("flv", "mpeg", "swf5", "swf7" or "vnc"). When omitted, the encoding type is automatically inferred from the filename (*.swf = swf5, *.vnc = vnc).
-N
Disables cursor pseudo-encoding. Pyvnc2swf normally tries to use cursor pseudo-encoding to capture a mouse cursor position so that a cursor can be moved separately from a screen image and it reduces the movie size. However this might not work with some vnc servers. This option can be used for disabling the function.
-P passwdfile
Specifies a password file. If specified, its content is automatically loaded and supplied as password when a VNC server requires it. A password file contains an encrypted password string and can be created with vncpasswd. A user can directly specify ~/.vnc/passwd, which normally contains the password for the local vnc server.
-e vncencodings
Specifies the preferred encodings for VNC image transfer (this is different from movie encoding). Normally you don't need to change this option. Encodings are comma-separated integers (default="5,4,0"). Changing encodings might improve recording performance.
-S subprocess (Supported on Un*x only, Python 2.4 or above is required)
Set a command to run during recording. This option is useful for recording voice with a separated program. A command line is a space-separated sequence of arguments which are passed to a child process like a usual shell command line. However the command line is not passed to a shell and the arguments are directly passed to the child process without any substitution. A child process is started immediately after recording starts and sent SIGINT after recording finishes.
-d
Increases debug level.


Editing.

edit.py program is for editing or reorganizing one or multiple movies generated by vnc2swf.py. This program also supports converting a .vnc file into .swf movie, changing the encoding method (swf5->swf7), attaching MP3 audio file to a movie, extracting images from a movie and resampling/scaling/clipping a movie image.
edit.py currently supports only command line interface. The user must give one output filename and one or more input filename(s). Input movies are concatenated sequentially (in the specified order) and the desired effects are applied.

Syntax

$ edit.py -o outfile.swf [options] infile ...

Example

<a name="edit"><em>(Convert .vnc file into .swf with compressed video encoding)</em> $ <strong>edit.py -o out.swf -c -t swf7 input.vnc</strong>  <em>(Attach an mp3 file to .swf)</em> $ <strong>edit.py -o out.swf -a voice.mp3 in.swf</strong>  <em>(Concatenate two movies and extract the frames into another movie)</em> $ <strong>edit.py -o out.swf -f 100-200,350- movie1.swf movie2.swf</strong>  <em>(Clip the top left area of the movie and shrink it to half the size)</em> $ <strong>edit.py -o small.swf -C 320x240+0+0 -s 0.5 in.swf</strong>  <em>(Convert .swf into MPEG)</em> $ <strong>edit.py -o out.mpg input.swf</strong>  <em>(Convert .swf into .flv)</em> $ <strong>edit.py -o out.flv input.swf</strong> </a>

Options

-o outputfile
Specifies the output filename. This option is always required.
-c
Compress a movie with zlib. Compressions is supported for both (swf5 and swf7) types of movies, but usually it's most effective when applied to swf7-encoded movies.
-t encodingtype
Specifies the encoding method for an output movie. When this option is not specified, the encoding type is inferred from the output filename extention.
TypeExtensionDescription
swf5.swfSWF movie (default)
swf7
SWF movie with stream video encoding support
flv.flvFLV movie
mpeg.mpgMPEG movie (requires PyMedia)
bmp.bmpBMP image sequence
png.pngPNG image sequence
Note that swf7 encoding is supported only with Flash Player version 7 or newer.
-f frames or
-F frames
Specifies a sequence of frames presented in the output movie. When omitted, all frames are presented in the original order (default). Frames can be specified with a comma-separated list of integers. A range of integers can be also specified by using - (hyphen) sign. For example: 10,200,300-400 specifies the frames whose number is 10 and 200, plus every frame between frame 300 and 400. The beginning (or ending) frame number can be omitted (e.g. -100 or 300-). In this case, the first (or last) frame number is used as the other end of the range. -F option and -f option is same except that -F doesn't chop the audio while -f does. When you're putting audio on the movie, if you use -f and -a option at the same time, it chops an mp3 file according to the selected frames. However, when you want to cast a continuous sound (such as music) onto a whole movie, this might not be the desired effect. In such a case, use -F instead of -f.
-a mp3file
Attaches mp3 file(s) to the movie. (Adding audio to FLV format is currently not supported.) Multiple mp3 files are concatenated in the specified order. NOTE: When specifying multiple mp3 files, make sure every file has the same bitrate as the first one. And do NOT use "variable bitrate" (VBR) mp3 files, as the SWF format doesn't support them!
-s scaling
Rescale the movie image with a specified ratio which is given as a fraction. NOTE: There will be noises with non-multiple scaling (e.g. 0.7).
-C clipping
Clips the movie into a specified rectangle. The geometry must be as form of "widthxheight+left+top" (e.g. "400x300+120+0").
-K keyinterval
Insert a keyframe in every N frames. Keyframes work as hints for Flash Player and are useful for seeking a frame within a long movie. When the number of total frames exceeds 10,000, inserting keyframes in every 500 frames (-K 500) is recommended.
-r framerate
Changes the frame rate of the movie. This option itself doesn't do any frame resampling and simply changes the movie speed. When this option is omitted, edit.py tries to keep the original frame rate in the output movie.
-R resampleframes
Resample (or "thin down") a movie by picking one from every N frames.
-S skipmp3frames
Skip the first N mp3-frames of the mp3 file. When 's' is appended to the number (such as '1.0s'), it indicates the number of seconds instead of frames. This option is useful when there is a time lag between a recorded image and audio.
-B blocksize
Sets the blocksize for swf7 or flv encoding method (default=32). This must be a multiple of 16.
-b
Suppress a seekbar in a generated html file.
-l
Disables movie loop in a generated html file.
-d
Increases debug level.

Previewing.

play.py is a simple player for a .swf or .vnc file. This program might be useful for spotting the right frame number in a recorded movie. However its speed is awkward and audio output is not supported. It only supports vnc2swf-generated files and cannot play general SWF movies. The player accepts the following keys:
  • Space / Enter / mouse click: Toggle Play/Stop.
  • Left / Right / dragging a seek bar: Skip frames.
  • "q" / Escape: Quit.
  • "s": Take a snapshot. The image is saved as "inputfile-frameno.bmp".

Syntax

$ play.py [options] moviefile ...

Options

-r framerate
Specifies the framerate to play.
-s scaling
Specifies the scaling ratio with a fraction.
-C clipping
Specifies the clipping rectangle. The geometry must be as form of "widthxheight+left+top" (e.g. "400x300+120+0").
-d
Increases debug level.
Adserver                   610x250 

If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:







Recent Posts

Linux News

My Blog List

Antipixels & Counters

BlogESfera Directorio de Blogs Hispanos - Agrega tu Blog Add to Technorati Favorites BlogItalia.it - La directory italiana dei blog Il Bloggatore Find the best blogs at Blogs.com. Computer Blogs - BlogCatalog Blog Directory AddThis Social Bookmark Button page counter