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
Developer
arunsingh
Posts: 52
Registered: ‎11-03-2008
My Device: Not Specified

For Mark Sohm : Regarding RTSP Streaming

[ Edited ]

Hi,

 

I am developing a RTSP video streaming application in blackberry, that will connect to a Darwin based Server. This server supports RTP over TCP through port 8554. The application connects to the server through HTTP and requests a RTSP video URL. The application, then, passes this RTSP URL to the JDE's native Player control. The code implementation is as below:

 

//---------------------------------------------------------------------------------------------------------------------------------

Player m_player;

VideoControl m_videoControl;

 

 

            m_player = javax.microedition.media.Manager.createPlayer("rtsp://<IP_ADDRESS>:8554<ADDITIONAL_PARAMS>");

           m_player.realize();

           m_player.prefetch();

           m_videoControl = (VideoControl) m_player.getControl("VideoControl");

           if (m_videoControl != null)

           {

               m_videoField = (Field) m_videoControl.initDisplayMode (VideoControl.USE_GUI_PRIMITIVE,                 "net.rim.device.api.ui.Field");

               m_videoControl.setVisible(true);

               m_bFullScreen = true;

           } 

            m_player.start();

//---------------------------------------------------------------------------------------------------------------------------------

 

We tried the following scenarios to test streaming:

 

SCENARIO

SERVER

BLACKBERRY CLIENT

(Bold 9700, OS Version 5.0)

RESULT

Scenario 1

Public network (without firewall)

In public network (Wi-Fi)

[Success] Media Player is able to play video stream through the RTSP URL.

 

Scenario 2

local network

In same local network (Wi-Fi)

[Success] Media Player is able to play video stream through the RTSP URL.

 

Scenario 3

Public network (Behind firewall; Port 8554 open for RTSP communication)

In a different public  network (Wi-Fi; without firewall)

[Failure] Media Player is not able to play video stream through the provided RTSP URL.

 

 

The streaming server supports RTP over TCP. I also tried the above three steps using VLC player and it was successful in all the three cases.

My understanding : VLC player first tries with RTP over UDP, if fails then tries with RTP over TCP. And if it further fails, it tries RTP using HTTP tunneling. It seems that blackberry's media player is only trying RTP over UDP as in scenario 1 and scenario 2 but if it fails with UDP, it is not switching over to TCP (scenario 3).

Query : Is there any way to inform the Blackberrys' native player control what option to choose for RTP ? VLC player does provide these settings and in default mode tries all the three; one by one. 

Please use plain text.
Developer
simon_hain
Posts: 16,137
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: For Mark Sohm : Regarding RTSP Streaming

you can send personal messages on this forum. just saying.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: For Mark Sohm : Regarding RTSP Streaming

[ Edited ]

You have a typo in your chart. You label #3 a failure but then say it was able to play. Btw, I'm pretty sure you have no control over RTSP settings at all.

Please use plain text.
Developer
arunsingh
Posts: 52
Registered: ‎11-03-2008
My Device: Not Specified

Re: For Mark Sohm : Regarding RTSP Streaming

Thanks mreed, corrected the typo. If you have any idea, does the media player support all the three modes of RTP streaming (RTP over UDP, RTP over TCP & RTP through HTTP tunneling)? and does it try these modes in a sequence one by one whenever required?

 

Thanks

Please use plain text.
Administrator
MSohm
Posts: 14,569
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: For Mark Sohm : Regarding RTSP Streaming

RTSP/RTP streaming over UDP and TCP with fallback is supported.  As long as a TCP socket for RTSP is successfully established with the darwin server, streaming over TCP should eventually be tried.  So based on the description, scenario 3 should be successful. Is it possible VLC ended up using RTSP over HTTP?

 

What is the full, 4 digit BlackBerry device software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.

 

What error or exception do you see when the stream fails?  Can you post an event log and/or output from the debug window?  You can capture the event log using the following command:

 

javaloader -u eventlog > mylog.txt

 

Where mylog.txt is the name of the file you wish to save to.  Note that you can't use that command while the debugger is attached.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
arunsingh
Posts: 52
Registered: ‎11-03-2008
My Device: Not Specified

Re: For Mark Sohm : Regarding RTSP Streaming

Thanks M Sohm

 

The server that we are using does not support RTSP over HTTP, so VLC cannot get any data from server using RTSP over HTTP.

 

The 4 digit Blackberry device software version is 5.0.0.351

 

I am getting the "MediaException -  Error Initializing Media"

 

Pleae also let me know that where can I run the command to generate the log file for the device?

 

 

Please use plain text.
Administrator
MSohm
Posts: 14,569
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: For Mark Sohm : Regarding RTSP Streaming

If you are using Eclipse javaloader is located in this directory:

 

.\Eclipse\plugins\net.rim.ejde\vmTools

 

If you are using the BlackBerry JDE, it is found in this directory:

 

.\BlackBerry JDE\bin

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
arunsingh
Posts: 52
Registered: ‎11-03-2008
My Device: Not Specified

Re: For Mark Sohm : Regarding RTSP Streaming

Hi,

 

Below is the eventLog generated at the time of video play -

 

guid:0x97C9F5F641D25E5F time: Thu Jan 01 05:30:00 1970  severity:0 type:2 app:System data:JVM:INFOp=21df4dfd,a='5.0.0.351',o='5.1.0.98',h=4001507
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:28 2011  severity:0 type:2 app:net.rim.tcp data:open tcpsocket://demo-14.videonext.com:80;interface=wifi
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:28 2011  severity:0 type:2 app:net.rim.tunnel data:Open-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:28 2011  severity:0 type:2 app:net.rim.tunnel data:STac-MagicRudyAPN.rim
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:28 2011  severity:5 type:2 app:net.rim.tcp data:OPEN
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:28 2011  severity:5 type:2 app:net.rim.tcp data:TXsb   217
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:28 2011  severity:5 type:2 app:net.rim.tcp data:TXss
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:29 2011  severity:0 type:2 app:net.rim.tcp data:disc   1
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:29 2011  severity:0 type:2 app:net.rim.tcp data:clos 217/794
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:29 2011  severity:0 type:2 app:net.rim.tunnel data:Clos-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:29 2011  severity:0 type:2 app:net.rim.tunnel data:Open-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:29 2011  severity:0 type:2 app:net.rim.tunnel data:STac-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:29 2011  severity:0 type:2 app:net.rim.tunnel data:Clos-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:29 2011  severity:0 type:2 app:net.rim.tunnel data:Open-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:29 2011  severity:0 type:2 app:net.rim.tunnel data:STac-MagicRudyAPN.rim
guid:0x3FD36A1EBA7BA42B time: Fri Feb 11 16:45:30 2011  severity:5 type:2 app:net.rim.media data:OpnS src.com.newgen.mainApp.startUp:VID
guid:0x3FD36A1EBA7BA42B time: Fri Feb 11 16:45:35 2011  severity:2 type:2 app:net.rim.media data:MdEr   1000
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:39 2011  severity:0 type:2 app:net.rim.tcp data:open tcpsocket://demo-14.videonext.com:80;interface=wifi
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:39 2011  severity:0 type:2 app:net.rim.tunnel data:Open-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:39 2011  severity:0 type:2 app:net.rim.tunnel data:STac-MagicRudyAPN.rim
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:40 2011  severity:5 type:2 app:net.rim.tcp data:OPEN
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:40 2011  severity:5 type:2 app:net.rim.tcp data:TXsb   218
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:40 2011  severity:5 type:2 app:net.rim.tcp data:TXss
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:41 2011  severity:0 type:2 app:net.rim.tcp data:disc   1
guid:0x316C1626A9DDC375 time: Fri Feb 11 16:45:41 2011  severity:0 type:2 app:net.rim.tcp data:clos 218/795
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:41 2011  severity:0 type:2 app:net.rim.tunnel data:Clos-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:41 2011  severity:0 type:2 app:net.rim.tunnel data:Open-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:41 2011  severity:0 type:2 app:net.rim.tunnel data:STac-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:41 2011  severity:0 type:2 app:net.rim.tunnel data:Clos-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:41 2011  severity:0 type:2 app:net.rim.tunnel data:Open-MagicRudyAPN.rim
guid:0x3B91E1630F0745BC time: Fri Feb 11 16:45:41 2011  severity:0 type:2 app:net.rim.tunnel data:STac-MagicRudyAPN.rim
guid:0x3FD36A1EBA7BA42B time: Fri Feb 11 16:45:42 2011  severity:5 type:2 app:net.rim.media data:OpnS src.com.newgen.mainApp.startUp:VID
guid:0x3FD36A1EBA7BA42B time: Fri Feb 11 16:45:48 2011  severity:2 type:2 app:net.rim.media data:MdEr   1000
guid:0x97C9F5F641D25E5F time: Fri Feb 11 16:45:53 2011  severity:0 type:2 app:System data:JVM:INFOp=21df4dfd,a='5.0.0.351',o='5.1.0.98',h=4001507

 

Please use plain text.
Administrator
MSohm
Posts: 14,569
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: For Mark Sohm : Regarding RTSP Streaming

This seems a tunnel problem or wifi network configuration. It looks like it failed to create a tunnel for streaming. Please verify your WiFi configuration.

 

Were you able to open the same URL in the BlackBerry Browser?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Contributor
tarunjindal
Posts: 12
Registered: ‎09-17-2010
My Device: Not Specified

Re: For Mark Sohm : Regarding RTSP Streaming

We are trying streaming to BB using Wowza and have placed it behind internet LoadBalancer.

 

We got 1935/554 ports opened and can stream via VLC fine but when it comes to blackberry - it doesnt play the video - although we do get initial session established - get length of the video etc shown on the device player.

 

Wowza says it is because of BB trying to use UDP ports - (which are not open on internet).

 

OS version is 5.0.0.732  

 

Cant blackberry fall back on  TCP/IP ?. Is there any other solution possible wo having to open all UDP ports ?

 

Is there a way to instruct BB player to use only TCP/IP or pick from a smaller pool of UDP ports ?

 

Thanks,

Tarun

Please use plain text.