JAVA BASED TRANSCODER
For handheld devices.
Easily integrate with existing
media delivery platforms
››
An
Introduction to Sparsh
JAVA BASED TRANSCODER
Preetam S. Hirole
Table of Contents
Foreword
This foreword has been kindly contributed by Preetam Hirole, the founder of the Sparsh (http://sparsh.sourceforge.net) and Sensation (http://sensation.sourceforge.net) Project.
This book is a guide to getting started with Sparsh, the java based transcoder. It will tell you how to use Sparsh.
We all want good software, but what does it mean for software to be “good”? Convenient features and reliability are what it means to be technically good, but that is not enough. Good software must also be ethically good: it has to respect the users’ freedom.
As a user of software, you should have the right to run it as you see fit, the right to study the source code and then change it as you see fit, the right to redistribute copies of it to others, and the right to publish a modified version so that you can contribute to building the community.
Today almost everyone uses the electronic devices to listen the music and watch the movies. Every device contains different format of audio/video and for transcoding the audio/video the Sparsh project gives much easier, plug able version.
The Open Source Software Movement needs your support.
Preetam S. Hirole
July 2007
Chapter 1: Introduction
1 Introduction
People really enjoy the audio/video on mobile/handheld devices. Day by day the popularity of handheld devices increases. Every devices uses different audio/video format. For converting the audio/video files we need transcoder.
The Sparsh project is one solution to easily transcode the audio/video files.
The Sparsh project specially concentrates on the mobile/handheld devices.
1.1 Sparsh in brief
People really moving to the pocket size devices. They want to enjoy the movies and music on pocket size devices. But how can they convert? They can convert using audio/video transcoder. The “ffmpeg” library is the best example of audio/video transcoder.
Again you need to know the video frame size, audio/video container etc. For that “wurfl” library is available.
This is not enough you need to write some program code. The Sparsh project is that code you need.
Objective of Sparsh is to provide java implementation of media transcoder for mobile/handheld devices using open source libraries/software; WURFL, FFMPEG, Spring, Hibernate, HSQLDB. This project in its initial releases will be aimed at providing easy integration with existing media delivery platforms.
For developing Sparsh, we are using the best open source software, which are thoroughly tested and most popular.
1.2 Major features of Sparsh
1.3 OSS used
The ffmpeg transcoder library is the backbone of this project. We are going to use this library to transcode the audio/video for mobile/handheld devices.
The ffmpeg library supports many audio/video format.
The WURFL file contains information regarding wireless devices configurations, capabilities and features. We mainly use this project to find the particular audio/video format.
This project is open-source and is intended for developers working with the WAP environment.
The Spring Framework is an open source application framework that aims to make J2EE development easier.
Spring is based on supporting an application programming model where code is written in POJOs.
Spring bring a consistency to application architecture and implementation. Spring will help developer to deal with the complexity of J2EE APIs, but its equally efficient outside a J2EE environment.
Spring achieves this through use of two recently proven paradigms, both of which it has played an important role:
Dependency Injection:
The concept of Dependency Injection is core to the Spring Framework.
A specialization of Inversionof Control, Dependency Injection is a technique that frameworks use to wire together an
application.
“ Dependency Injection is a technique to wire an application together without any participation by the code that requires the dependency.”
The client usually exposes setter methods so that the framework may inject any needed dependencies. The client now allows others to manage the life cycle of the dependencies. The client also becomes much more testable. The client has no environment-specific code to tie it to a particular framework.
AOP:
So how do we get the security checks back into the system? You can add the authorization mechanism into the execution path with a type of IoC implementation called aspect-oriented programming (AOP). Any client of the code are unaware of this enhancement to the code.
Hibernate (Java), a Java-based object-relational mapping/persistence framework
Hibernate is an object-relational mapping (ORM) solution for the Java language: it provides an easy to use framework for mapping an object-oriented domain model to a traditional relational database. Its purpose is to relieve the developer from a significant amount of relational data persistence-related programming tasks.
Hibernate's primary feature is mapping from Java classes to database tables (and from Java data types to SQL data types). Hibernate also provides data query and retrieval facilities. Hibernate generates the SQL calls and relieves the developer from manual result set handling and object conversion, keeping the application portable to all SQL databases, with database portability delivered at very little performance overhead.
HSQLDB is a lightweight Java database engine that has been around since 2001. However, because it is a continuation of Thomas Mueller's closed Hypersonic SQL Project, it has actually been around longer than 2001. In short, the product is fairly mature.
HSQLDB provides a good amount of ANSI-92 SQL-compliant features (and many enhancements from more recent SQL standards). Furthermore, most of the features defined by JDBC 2, and some from JDBC 3, are also supported.
HSQLDB's popularity has grown significantly since its inception a few years ago, and it is commonly found bundled with open source and commercial Java-related products such as JBoss, OpenOffice.org, Atlassian's JIRA, and many more.
1.4 Why the taste of open source is different?