11-10-2009 04:03 AM
I am developing an application that will stream live audio-video on Blackberry phones.
The streaming server captures live MPEG4-SP and AAC data and sends it via a proprietary UDP based streaming protocol.
I am having trouble finding the right means to render the MPEG4-SP and AAC elementary streams. The options I have considered and problems faced with each of them are mentioned below. Any insight on the right approach to use to solve this problem is appreciated.
1. Create an rtsp server that runs on the blackberry phone, to which the player connects via an rtsp:// link. The rtsp server runs on the phone itself and converts the MPEG4-SP and AAC data to RTP payload carrying elementary streams. The problem with this approach was that an rtsp session to another thread on the phone required 2 threads on the phone to communicate via tcp sockets using local host or the phone's IP address and socket connection between two threads on the phone did not work - as in the connection would simply fail when the phone was on a mobile network with a data plan. Is this expected behavior?
2. Buffer the audio-video data and create mp4 files periodically and pass it to the player via a custom data source. This approach worked however there is a glitch on switching between buffers. Is there a way to avoid the glitch by managing the state of the player while switching from one buffer to another?
3. Create a mp4 file in the streaming format with a hypothetically large file size. The audio-video data and its indexes are written periodically. Can the blackberry player handle the case where the mp4 data index is not present in one shot but is filled periodically over time?
Please comment in case there is some other suitable approach.
11-11-2009 08:33 AM
Let me make an attempt to put my question in a more understandable manner:
1. Is there a way to play MPEG4-SP and AAC elementary streams on Blackberry? If yes, then please point me to the right means to do so.
2. Does blackberry support streaming MP4 format i.e. a case where the entire mp4 file is not present in one shot, but is written in chunks as and when data arrives?
11-11-2009 08:48 AM
Please see the knowledge base article for what media types are supported by blackberry:
Now this link will satisfy your 1st query.
Regarding what all you have mentioned, there are 2 options,
1) Is it a static file available on the server,
2) it is actual streaming for e.g. live content (e.g. TV program)
There are 2 types
1) HTTP streaming - This is not actual streaming. In this case file is there on the server and URL is needed which points to the file as http://abc.com/def/ghi.mp4
2) RTSP streaming - RTSP protocol is used for actual streaming purpose. Here the server should be implemented in such a way that it supports RTSP. On device side the url will be something like rtsp://blahblahbla...
In both cases u get the URI of the data.
On handheld side now you have 2 options:
1) Download the file and then show it (Not streaming)
2) Get the stream and show it simultaneously. (Streaming) - Here you need to implement DataSource class which is abstract class in Blackberry API's. You need to have the proper implementation of DataSource class at your side. Which handles all the connection, and reading of the data coming from the source, and it is fed to the player in the chunks how it is downloaded. You will get the tutorial regarding this in the knowledge base, but i dont remember the exact link. If i will get will post it here.
11-11-2009 08:54 AM
See this knowledge base article.
This will tell you how to have streaming using DataSource approach. This is for audio file on similar grounds you can have a video streaming code.
11-12-2009 12:25 AM
@mailsameer - Thanks for the information.
Can you please tell me the device and the OS which you have tested the Video Streaming using DataSource.
11-12-2009 01:43 AM
I have not done any application for live video streaming,
In my case i had developed an application to play video from the server, but it was not RTSP it was HTTP,
So it was not live streaming, but normal pseudo streaming application.
I developed it on devices 4.3 and above. I may be wrong, but i just gave all the information regarding this that i know, may be it will help.
11-12-2009 01:46 AM
I tried the BufferedPlayback using http location and it is working fine for Audio files and if i do the same for Video files it is not playing. Please post if you have any idea.
07-01-2010 10:34 AM
Hi! Gud Day!
I don;t know if this is the right forum, but i just want to ask how can I watch live stream in my device?
I'm using BlackBerry Curve 8900, and i'm in the middle east (Qatar) with QTEL as my provider.
I have a subscription to The Filipino Channel (TFC mobile) but it only says "My device does not support any of the streaming technologies"
where can I download software for my device so I can watch live streaming??