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.

CHMOD

CHMOD (abréviation de change mode) est une commande exécutable dans un environnement de type Unix qui permet de changer les permissions d’accès (spéciales ou non) sur un fichier ou dossier. Il arrive fréquemment qu’on lit dans un guide d’installation d’une application sur un serveur qu’il faut configurer un fichier ou dossier en chmod 777 ou chmod 644 ou -wx.

Sur un serveur, on trouve, sous propriétés d’un fichier ou dossier, un tableau avec des champs à cocher avec trois colonnes “lire ( r = read), écrire (w = write) et exécuter (x = execute)” et trois rangées “propriétaire (owner), groupe (group) et autres (all users)”. Lire a la valeur 4, écrire a la valeur 2 et exécuter a la valeur 1.

Par exemple CHMOD 764 veut donc dire :

  • le propriétaire peut lire, écrire et exécuter: 4+2+1=7
  • le groupe peut lire et écrire:4+2=6
  • les autres ne peuvent que le lire: 4

Il n’est pas recommandé de mettre les permissions des fichiers et répertoires sur un serveur sur 777, car tout le monde peut alors les modifier s’il a accès au serveur. Il est conseillé de mettre les fichiers sur 664 et les répertoires sur 775, sauf exceptions justifiées.

Domain name system (DNS) & management

Last Update : March 15, 2013

The Domain Name System (DNS) associates various information with domain names; it serves as the “phone book” for the Internet by translating human-readable computer hostnames into IP addresses. A DNS also stores other information such as the list of mail servers that accept email for a given domain. By providing a worldwide keyword-based redirection service, the Domain Name System is an essential component of the Internet.
The right to use a domain name is delegated by domain name registrars which are accredited by the Internet Corporation for Assigned Names and Numbers (ICANN), the organization charged with overseeing the name and number systems of the Internet. In addition to ICANN, each top-level domain (TLD) is maintained and serviced technically by a sponsoring organization, the TLD Registry.

DNS records or Zone files are used for mapping URLs to IPs. Located on servers called the DNS servers, these records are typically the connection of a website with the outside world. Requests for a website are forwarded to the DNS servers and then get pointed to the WebServers that serve the website or to Email servers that handle the incoming email.

DNS servers communicate with each other using private network protocols. All DNS servers are organized in a hierarchy. At the top level of the hierarchy, so-called root servers store the complete database of Internet domain names and their corresponding IP addresses. The Internet employs 13 root servers, named A, B, C and so on up to M, maintained by various independent agencies. When a DNS server receives a request not in its database it automatically passes that request to another DNS server or up to the next higher level in the DNS hierarchy as needed.

The mostly used DNS records in all DNS configurations are the following :

  • A record or adress record : An address record assigns an IP address to a domain or subdomain name. Example : saraproft.com. IN A 69.9.64.11
  • CNAME record : A CNAME record or canonical name record makes one domain name an alias of another. The aliased domain gets all the subdomains and DNS records of the original. Example : stuff.everybox.com CNAME www.everybox.com
  • MX record : An MX record or mail exchange record maps a domain name to a list of mail exchange servers for that domain. Example : mydomain.com. 14400 IN MX 0 mydomain.com.
  • NS record : An NS record or name server record maps a domain name to a list of DNS servers authoritative for that domain. Example : example.com. IN NS ns1.live.secure.com.
  • SOA record : An SOA record or start of authority record specifies the DNS server providing authoritative information about an Internet domain, the email of the domain administrator, the domain serial number, and several timers relating to refreshing the zone. It’s the most essential part of a zone file. It includes TTL, the duration in seconds that the record may be cached by client side programs.
  • TXTrecord : A TXT record allows an administrator to insert arbitrary text into a DNS record. For example, this record is used to implement the Sender Policy Framework specification.

RESTENA is the registration service for Internet domain names under the national top level domain LU in Luxembourg. P&T Luxembourg and Visual Online are also approved as official registrars in Luxembourg. My saraproft.xxx names have been registrated and managed in the past by SpiritDomains. The domain saraproft.lu has been registrated by RESTENA. All the domains have been transferred in the meantine to Visual Online.

DNSstuff.com provides a lot of free and paid tools to configure, monitor and fix problems with a domain or email. Google offers tools to check the MX records and the CNAME records of your own domain. Useful tutorials about setting up Google apps (and to verify ownership of domain) are available at N.E.R.D.logger.com.

Today I deployed with success Google Apps to my domain saraproft.com. Google Apps are smart applications for email, documents, sites and more. The different DNS records for my domain to set up Google Apps are configured as indicated herafter :

A record : the domain saraproft.com points to the IP address of the P&T server hosting my other domains in Luxembourg. This IP address is not relevant for Google Apps.

CNAME : The aliases for www.saraproft.com, mail.saraproft.com, sites.saraproft.com, docs.saraproft.com and calendar.saraproft.com points all to ghs.google.com. It’s important to add a dot at the end of each record parameter. To verify the ownership of the saraproft.com domain, a temporary CNAME record with a secret parameter provided by Google Apps was activated.

MX : The mail domain saraproft.com points to different prioritized mail servers indicated by Google:

  • ASPMX.L.GOOGLE.COM.
  • ALT1.ASPMX.L.GOOGLE.COM.
  • ALT2.ASPMX.L.GOOGLE.COM.
  • ASPMX2.GOOGLEMAIL.COM.
  • ASPMX3.GOOGLEMAIL.COM.
  • ASPMX4.GOOGLEMAIL.COM.
  • ASPMX5.GOOGLEMAIL.COM.

NS : The name server record points to the servers indicated by my registrar SpiritDomains:

  • dns1.spiritdomains.com.
  • dns2.spiritdomains.com.
  • dns3.spiritdomains.com.
  • dns4.spiritdomains.com.

SOA : The SOA record contains the standard data provided by the managed DNS service of SpiritDomains.

TXT : The text record includes the Sender Policy Framework (SPF) with the statement “v=spf1 include:aspmx.googlemail.com ~all” to prevent mails to be considered as spams.