Hello everyone,

Its almost the end of a ninth week of GSoC 2013. yeap! more than 2 months has been passed already. In this week i have worked for the Patient Narratives video stream capturing feature. It wasn't that much easy task. The WebRTC mediastream API isn't that much of mature tool yet. (Its actually an ongoing project by Mozilla and Chrome team) But this the most suitable option to use in my project -- since its a web based, Open source tool.

Basically WebRTC API will allow developers to create apps (which will capture web-cam video/audio recording, Streaming and things like that) simply using the power of HTML5 and JavaScript. The main advantage of using WebRTC technology is, the user will not have trouble to install Video capture softwares/drivers since it uses the Web as the platform. So everything will be take cared by the web browser. Currently latest versions of Chrome and Firefox browsers support the WebRTC technology.

Here's a quick demo about how WebRTC works : http://harshadura.github.io/record-rtc-together/



Well, the media-stream API is real cool to play with but still it lacks an essential feature specially for my project. Thats media-stream api still doesn't have the capability to return the recorded media as a single file (which contains both audio and video together). What it currently does is generate audio and video as separate blobs (files). Apparently this issue open the door for a real big mess to merge the two files later time.

So I was searching for a solution to get rid of this issue. And I found there's a popular library called FFMPEG which will allow to merge two video+audio files together. Then i tried to find a Java wrapper for it. And finally I found the best tool for the work called Xuggle which will internally process FFMPEG stuff and behave as a Java API.

So I used this Xuggle API to successfully merge the two files i generate with the WebRTC. The merging will happens on server side. after passing the video and audio. (Still there's no obvious way to handle it on client side)

So now everything works as intended! :-)