Thursday, May 9, 2013

Namespaces in E4X

ECMAScript for XML (E4X) extends JavaScript with support for XML-based data manipulation by introducing new XPath-like language features. Apache ODE/WSO2 BPS has an E4X Assign activity to ease Rich Data Manipulation in BPEL using E4X. To use namespaces in E4X queries, follow the syntax namespace::localName in place of a normal element specifier. Eg: To extract the hotelRequestId from the variable submitHotelReviewRequest which has a format similar to the following: You can use a js snippet as follows:
Related Links:

Friday, May 3, 2013

Few tips to setup a Linux UPnP/DLNA Media Server for iPad

For converting files to the Apple compatible format, I use arista-transcode
..or ffmpeg
In AVI/MKV files, sometimes there are AVI files with 2 audio streams,  the first and default track is not in your preferred language, but the second track is. This causes problems when you view it in a player that does not support multiple audio tracks. Here's how to delete the unwanted audio tracks and making one the default audio, using the MKVtoolnix package.

First, get the audio track info so we know which one to keep.
mkvmerge -i input.mkv

Then copy only selected audio tracks to the new file with --atracks option. Here 2 is the Audio Track ID we need to keep.
mkvmerge -o output.mkv --atracks 3 input.mkv

My preferred Media Server is MediaTomb.
mediatomb -e wlan0
Here I have used the wireless network interface to bind to, so all the other devices on the Home WiFi can connect to this server.
It also supports transcoding to perform format conversion of your content on the fly allowing you to view media that is otherwise not supported by your player. If you like to go ahead with tinkering the configuration, find it here: ~/.mediatomb/config.xml and change 'no' to 'yes' on the '<transcoding enabled="no">' line. But for mediatomb and iOS devices it's hard to find the right configuration for live transcoding. So I'm sticking to the above manual conversion.