Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 3
Registered: ‎11-09-2009
My Device: Not Specified

Live Streaming on Blackberry

 

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.

 

 

 

Developer
Posts: 132
Registered: ‎05-07-2009
My Device: Curve
My Carrier: Vodafone

Re: Live Streaming on Blackberry

Hi friend,

 

Its very difficult to make out what you are really expecting, i would like to help you, please put it in simple words.

Sameer Joshi
Blackberry developer.
New Developer
Posts: 3
Registered: ‎11-09-2009
My Device: Not Specified

Re: Live Streaming on Blackberry

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?

Highlighted
Developer
Posts: 132
Registered: ‎05-07-2009
My Device: Curve
My Carrier: Vodafone

Re: Live Streaming on Blackberry

Hi,

 

Please see the knowledge base article for what media types are supported by blackberry:


http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB05482

 

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.

 

Clear?

Sameer Joshi
Blackberry developer.
Developer
Posts: 132
Registered: ‎05-07-2009
My Device: Curve
My Carrier: Vodafone

Re: Live Streaming on Blackberry

Hi,

 

See this knowledge base article.

 

How to Stream Audio File

 

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.

Sameer Joshi
Blackberry developer.
Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Live Streaming on Blackberry

@mailsameer - Thanks for the information.

 

Can you please tell me the device and the OS which you have tested the Video Streaming using DataSource.

 

Thank you.


Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 132
Registered: ‎05-07-2009
My Device: Curve
My Carrier: Vodafone

Re: Live Streaming on Blackberry

Hi,

 

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.

 

Thank you,

Sameer Joshi
Blackberry developer.
Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Live Streaming on Blackberry

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.


Use Search. "Accept Solution" If the problem is resolved.
New Member
Posts: 1
Registered: ‎07-01-2010
My Device: BlackBerry curve 8900
My Carrier: Qtel

Re: Live Streaming on Blackberry

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??

 

-many thanks

New Member
Posts: 1
Registered: ‎07-06-2010
My Device: Bold 9000
My Carrier: Qtel

Re: Live Streaming on Blackberry

working properly on my bold 9000...:-) tfc on the go ...