The deployment of multimedia on mobile phones requires audio and video to be encoded from its original format, due to the varying screen sizes, resolutions, colors, memory, etc. Up until now, we have had to manually encode videos to all desired formats, and then name the files differently according to the device that would be used. Obviously, this is a time-consuming way to deliver mobile video, and we desire to streamline the process.
To solve this problem, we’ve researched a way to deploy a system that can automatically encode mobile video with open source solutions, namely WURFL, Alembik, FFMpeg, MP4Box, and Darwin Streaming Server. WURFL is able to auto-detect the type of mobile device through a database of user agent strings, and Alembik is able to encode video into a variety of mobile formats based on a given user agent string. FFMpegX is the software that will perform the encoding, and Darwin Streaming Server will deliver the video to mobile devices over RTSP.
We will provide a well-equipped server running linux, and you will install all the components necessary to run the system. The J2EE server will need to be deployed in a way that fits into the scheme of our network model.
Requirements of the project
We need recommendations on which software packages to install:
- Which version of Linux?
- JBoss, Glassfish, or Apache-Tomcat? What are the advantages/disadvantages of each in regards to mobile media encoding?
- Apache Mobile Filter or custom Alembik template using JSP tags?
Installation and configuration of:
- The linux server – we need you to configure it on our rack with network shares so we can mount the shared folder onto our FTP server.
- Darwin Streaming Server
- MP4Box library
We need a PHP script that will perform the following tasks:
- Send an HTTP request to Alembik’s encoding servlet with the user agent type and the location of the hosted video
- Serve a link to the outputted encoded media file
- Place a link to that media file within the WAP site. This script would be deployed on our servers within customer’s public directories.
Background information on the technology
Alembik: Alembik server is an enterprise J2EE application that is built (into EAR archive) from the following set of modules:
• alembik-api: Java interface of the server, which consists of service API, service locator framework with an EJB-based implementation and a set of utility methods,
• alembik-core: implementation of transcoding service, which includes media processor classes, User-Agent and mime-type resolution utilities along with Storage interface and implementation; additional parts are monitoring service implementation, cache and configurator module,
• alembik-server: EJB3-based services for remote and asynchronous processing as well as the clustering support (JBoss only),
• alembik-soap: JAXWS-based SOAP and HTTP service implementations, file serving engine for web rendering and administration console,
• alembik-wurfl: WURFL extension library defining the sets of capability values for video and audio codecs,
• alembik-build: main Ant build script and configuration files for assembling and deploying the server,
• alembik-client: Java client for Alembik server offering remote access with service API through EJB and SOAP (with a SOAP-based service locator implementation),
• alembik-taglib: JSP tag library with transcoding functionality,
• alembik-webapp: exemplary web application making use of the JSP tag library.
This software waits for requests containing a list of encoding jobs. Each job consists of an URL path to a given media resource and a set of parameters according to which the appointed media file should be transformed. The encoding parameters depend on the input media type. They may specify e.g. size, dimension, duration and format of the desired output file. Alembik offers two mechanisms of server-side parameterization. The first option is to pass a user-agent identifier, which will get resolved into a set of parameters according to the requesting device capabilities. In the second a job may be associated with an id of a predefined parameter set, called encoding profile, whose list is internally maintained by the server.
See [url removed, login to view] for more details about how Alembik works