Crop or padd a video

Last update : August 2013, 2013

Sometimes it’s necessary to crop or padd a video to change the aspect ratio and the resolution. The size of a video image is measured in pixels for digital video, or horizontal scan lines and vertical lines of resolution for analog video. In the digital domain standard-definition television resolution is specified as 720/704/640 ×480 for NTSC and 768/720 × 576 for PAL or SECAM. However in the analog domain, the number of visible scanlines remains constant (486 NTSC/576 PAL) while the horizontal measurement varies with the quality of the signal: approximately 320 pixels per scanline for VCR quality, 400 pixels for TV broadcasts, and 720 pixels for DVD sources. Aspect ratio is preserved because of non-square pixels.

High-definition televisions are capable of resolutions up to 1920 ×1080 pixels.

Aspect ratio describes the dimensions of video screens and video picture elements. All popular video formats are rectilinear, and are described by a ratio between width and height. The screen aspect ratio of a traditional television screen is 4:3. High definition televisions use an aspect ratio of 16:9.

Some common used video resolutions and aspect ratios are :

  • 128 : 96 > 4 : 3
  • 176 : 144 > 11 : 9
  • 240 : 176 > 4 : 3
  • 320 : 240 > 4 : 3
  • 352 : 288 > 11 : 9
  • 480 : 272 > 16 : 9
  • 640 : 480 > 4 : 3
  • 720 : 480 > 3 : 2

To keep the aspect ratio of a video without distortion when changing the resolution, you often need to crop or to padd the video (delete or add pixels on top, bottom, left and right side). I use the great video-tool Super from eRightSoft to do this job. The current version is v2013.build.57 released on July 13, 2013.

DVD Video media

Last update : November 4, 2013

DVD Properties

DVD

DVD

DVD Video is a consumer video format used to store digital video on DVD (DVD-ROM) discs, and is currently the dominant form of consumer video formats in the world.

A DVD contains 3 type of files: VOB, IFO and BUP.
A VOB file (Video Object) is a container format contained in DVD-Video media. It’s the core file of a DVD and contains the actual Video, Audio, Subtitle, and Menu contents in stream form. VOB is based on MPEG-2 program stream format, however, VOB files are a very strict subset of the standard. An overview to show the logical structure of VOB files is given on the MPUcoder website.

An IFO file (InFOrmation) stores information about Chapters, Subtitles and Audio Tracks. It contains important navigational information, such as where a video chapter begins, and where audio and subtitle streams exist within the movie (VOB) file. IFO files are not encrypted.

A BUP file (Back UP) is a backup of the IFO file and is used in the event that the corresponding IFO file is unreadable, perhaps due to a scratch on the surface of the disc.

A DVD contains the following data files :

  • VIDEO_TS.IFO : The ‘Video [Title Set] Manager Information Set’ is a configuration file that defines the disc structure and also includes region coding information and aspect ratio etc
  • VIDEO_TS.VOB : The ‘Video [Title Set] Object file for VMG Menu’, this file works like a bookmark to tell the player that it is the start of the disc.
  • VIDEO_TS.BUP : Backup file of the’ Video Manager Information Set’ (VIDEO_TS.IF0).
  • VTS_01_0.IFO : The’ Video Title Set Information Configuration` file for the first lot of VOB files, it also tells the player how to proceed when using the on screen menu system
  • VTS_01_0.VOB : ‘Video Object Set for Video Title Set Menu’, the first video and audio stream sequence to be played usually the on screen menu system. These files may contain several streams of audio/video “multiplexed” (MUX) together (eg. chapters/language selections)
  • VTS_01_0.BUP : Backup file of the’ Video Title Set Information’ file (VTS 01_1.IFO)
  • VTS_01_1.VOB : The first ‘Video Title Object Set’ file, the main file containing the picture and audio streams. It is usually split into three to four files, each with ascending filenames; for example VTS_01_1.VOB, VTS_01_2.VOB, VTS_01_3.V0B and so on. No VOB file is to exceed 1GB in size, with a maximum total of five VOB files in sequence on a single layer disc (DVD 5) and no more than nine on a dual layer disc (DVD 9). VOB files have a naming standard VTS_xx_yy.VOB (xx = Title number, yy = Section number).

A DVD can also include additional Video Title Sets that include the IFO, VOB and BUP with ascending filenames such as VTS_02_1, VTS_03_1 and so on. These are usually the extra features that come with the title, such as documentaries and behind-the-scenes footage. Each title has at least 2 VOBs (one for the menu and one for the main feature) and exactly one IFO and BUP file.

An freeware editor IfoEdit (version 0.971) for IFO-files is available at www.ifoedit.com. A complementary program PgcEdit (version 9.3) with more possibilities, called the swiss knive of DVD edition, is available at the videohelp.com website. A guide how to create IFO files from VOB files with IfoEdit is available at the digital-digest website.

A very detailed description (in german) about DVD’s is available at the dvd-tipps-tricks website.

DVD Resolution

Whether a Display Aspect Ratio (DAR) of 4:3 or 16:9, the native resolution of a DVD is 720 x 576 pixels (5:4) for PAL/SECAM (Europe) or 720 x 480 pixels (3:2) for NTSC (US). The DAR is registrated in the IFO-file and handled by the television or the DVD player to present the video in the correct aspect ratio.

For PAL, a 4:3 video ist stretched to 768 x 576 pixels, a 16:9 video is stretched  to 1.024 x 576 pixels. For NTSC, a 4:3 video is resized to 640 x 480 pixels, a 16:9 video is stretched to 854 pixels.This process is called anamorphic widescreen.

If the DVD shows Panavision (ratio 2.20:1), CinemaScope (2.39:1) or other widescreen films (1.66:1, 1.85:1, 2:35:1, 14:9, …), hard-matting or black bars adding techniques (letterboxing) are used to include the image within the 16:9 format.

DVD authoring

DVD authoring is the process of creating a DVD video that can be played on a DVD player. DVD authoring software must conform to the specifications set by the DVD Forum group in 1995. The specifications are complicated due to the number of companies that were involved in creating them.

There are a lot of DVD authoring, encoding and burning programs available: professional, commercial, proprietary, free of charge and open source software. Among the free programs, I prefer  DVD Flick (only for Windows available), developped by Dennis Meuwissen (pseudo : Exl). The latest version is 1.3.0.7.

DVD Forum

The DVD Forum is an international organization composed of hardware, software, media and content companies that use and develop the DVD formats. It was initially known as the DVD Consortium when it was founded in 1995.

DVD Formats

The following main DVD formats are available :

  • DVD-R : recordable ; capacity 4,7 GB; approved by the DVD-Forum
  • DVD-RW : rewritable ; capacity 4,7 GB; approved by the DVD-Forum
  • DVD+R : recordable ; capacity 4,7 GB; developed by the DVD+RW Alliance
  • DVD+RW : rewritable ; capacity 4,7 GB; developed by the DVD+RW Alliance

There are a number of significant technical differences between the dash and the plus format, although most DVD drives can handle both formats and most users would not notice the difference. The write time for a full disc depends on the maximal speed supported by the media; the current maximum speed (Sony DVD) is 24x (31.68 MB/s).

Flash Video (FLV) : delivery and encoding

Last update : Januray 30, 2013

Due to the popularity of the Adobe Flash player, Flash video (FLV) was the standard of choice for Internet Video publishers in the past. Publishers could choose between three methods of delivering video content.

  • Progressive Download
  • Streaming
  • HTTP pseudo-streaming

Downloads are easy and work with any server, but do not offer content protection nor seeking to undownloaded parts. Streaming servers offer these functionalities, but have to be installed and managed. Since serverside access and knowledge are not available to every developer, there exist an in-between solution of HTTP pseudo-streaming through the use of small serverside scripts. A detailed tutorial about HTTP video streaming has been written by Jeroen Wijering, the renowned developer of the JW player and cofounder of LongTail Video and Bits on the Run.

The streaming protocol for Flash video is RMTP (Real Time Messaging Protocol). RTMP is a proprietary persistant protocol developed by Adobe Systems for streaming audio, video and data over the Internet, between a Flash player and a server.

The RTMP protocol has three variations:

1. The “plain” protocol which works on top of TCP and uses port number 1935
2. RTMPT which is encapsulated within HTTP requests to traverse firewalls
3. RTMPS which works just like RTMPT, but over a secure HTTPS connection.

The HTTP pseudo-streaming works through a very simple mechanism. It’s a progressive download using server side scripting to allow random access to parts of the video that have not yet been loaded. A well known php script for HTTP pseudo-streaming was xmoov, developed by Eric Lorenzo Benjamin jr. The FLV video must contain keyframes metadata which can be added with a patcher like FLVMDI.

The second issue for delivering flash video on the web is the encoding. An in-depth comparison of available codecs is presented by Jan Ozer in an article published on the website digitalcontentproducer.com.

Flash video uses three different codecs:

  • The Sorenson Spark codec, introduced in Flash version 7, (Sorenson H.263) was used a lot (e.g. at YouTube, Google Video, MySpace). This codec was also found in most freeware / shareware software that encodes FLV.
  • The TrueMotion VP6 codec developed by On2 Technologies was introduced in Flash version 8. It was a famous proprietary codec used in the Flix encoding tools offered by On2. Two versions of the VP6 were available: VP6-S was recommended for HD (high-definition) production, and VP6-E was the best for SD (standard definition) production.
  • The industry-standard H.264 video codec is icluded in Flash since version 9r115. This codec is also known as MPEG-4 Part 10, or MPEG-4 AVC (for Advanced Video Coding). With H.264, DVD-quality online video is very well possible. An advantage of the H.264 codec is that it is also used in a lot of portable devices, such as the iPod/iPhone, Sony PlayStation Portable (PSP) or Nokia N series smartphones.

A comparison of the quality of H.263 and 264 codecs is presented by Jeroen Wijering on the Bits on the Run website.

I use the commercial version of Jeroen Wijerings video-player (licence No 2007.3264). My video files are hosted on the Amazon S3 servers, the preview pictures are hosted in the same folder as the video player on another server by using a relative path for the corresponding flashvariable. Since 2010 I use the Amazon Cloudfront service to stream flash videos.

TWITTER : what are you doing ?

Twitter is a service for friends, family, and co–workers to communicate and stay connected through the exchange of quick, frequent answers to one simple question: What are you doing?
You can use 140 characters or less to send your thoughts, observations, and goings-on in your day. Whether you’re “eating an apple” or “looking foward to the weekend” or “Heading out of town”, it’s twitter-worthy. Twitter messages are called tweets.

Hashtags are a community-driven convention for adding additional context and metadata to the tweets. An online hashtag is created by prefixing a word with a hash symbol: #hashtag.

Followers (followers_me) are those who have elected to receive tweets from a twitter, following_me are friends whose tweets a twitter is following.

Twitter can be used on the web or with a mobile phone (SMS), it’s interworking with Facebook and it’s supporting an API to develop specific applications. Twitter offers an search and advanced search webpage to find out what’s happening in the world beyond your personal timeline. To search, filter, and otherwise interact with the volumes of news and information being transmitted to Twitter every second, Twitter Search helps to filter all the real-time information coursing through their service.

Twitter is a privately funded startup with offices in the SoMA neighborhood of San Francisco, CA. Started as a side project in March of 2006, Twitter has grown into a real-time short messaging service that works over multiple networks and devices.

Detailed informations are available on Wikipedia.

Layers over objects using z-index

last update : june 13, 2011

I noticed that a layer with an embedded webpage as an object is not covered by an other layer having a higher z-index in Internet Explorer, whereas it is correctly displayed in Firefox. The same problem has been reported in the webmasterworld forum. I found a workaround (see www.artgallery.lu/expositions/expo_samuel_martin.html) to integrate the text from the second layer in the embedded webpage, but this works only without links.

Another tough nut to crack for developers is the z-index working with Flash, because the Flash Player always writes the SWF on the topmost layer of the page, regardless of z-index order. It works with swfobject if the parameter wmode is set to opaque (see an example on the website of Leslie’s Artgallery).

A demopage showing how z-index works is available at the tjkdesign.com website.

Email Encoder and Spam Blocker for Web Forms

Spam is a great problem for all website owners. A simple method to stop email harvesters from picking up e-mail addresses from web pages consist in encoding the email address in hexadecimal characters. By encoding the entire e-mail address including the “mailto” portion, most e-mail harvesters (except the most sophisticated) can’t find it. If they can’t find it, they can’t send spam to it.

A free hexadecimal email encoder is offered on the website from K’nechtology Inc

To protect web-forms from spam abuse, more sophisticated solutions are required. Spam Blocker For Web Forms is  a powerful, easy-to-use application ideal for protection of web forms from being parsed and used for sending spam emails. Includes adjustable spam filters and anti spam source code protection. I use a registered version since more than a year with great success.

Spam Blocker For Web Forms is developped by Dmitry Konovalov from White Stranger Group. The current version is 1.1, a single user license is available for 40 US$, a business license for 60 US$.

Oplayer : mobile media player

Last update : January 30, 2013

In 2001, I tested the first version of the Oplayo Mobile Video Player on mobile phones with Symbian operating system. My first test phone was the Nokia 7650. The videos were converted from standard video files into Oplayo’s MVQ format using the Oplayo Media Designer. The videos typically required a mobile data connection with 26 kbps bandwith and used the HTTP protocol for streaming.

Oplayo has been at the forefront of mobile media development and became a global leader in non-standard encoded mobile video technology. In 2010 the Oplayo domains were acquired by MediaWireless.

SWISH : alternative Flash animation tool

SWiSHzone.com is the world leader in alternative Flash™ animation tools. The philosophy of SWISHzone Pty Ltd is to make Flash authoring accessible to everyone, with software that is both easy to use and affordable.

Founded in 1999 and based in Sydney, Australia, SWiSHzone’s product range has grown from a single text animation tool to a suite of products that make it easy to create Flash-based video, photo albums, PowerPoint™ presentations and more. The flagship product SWiSH Max is a professional Flash authoring tool with enough power and flexibility for the most demanding of users.

XTNDConnect PC from Sybase iAnywhere

Sybase iAnywhere – Desktop synchronization of PIM to mobile devices

XTNDConnect PC is a software application that allows you to easily synchronize your contacts, calendar, tasks, email and notes between your mobile devices and popular PC applications. XTNDConnect PC greatly improves your effectiveness and productivity without requiring the involvement of IT departments.

Available in 17 languages and validated in the market with more than 50 million copies distributed, XTNDConnect PC is fast, flexible and easy to use. It is available directly for customers or can be customized for OEM/ODM implementations.

XNTD was developed by Extended Systems Inc. Founded in 1984, Extended Systems was acquired by Sybase Inc in 2005.