Problems playing an RTSP link... Help?

All your problems with Audio, Video and Images.

Problems playing an RTSP link... Help?

Postby medicalfix » Wed Dec 10, 2008 4:14 am

Hello,
I've been trying to play an RTSP feed containing an mp3 audio using the MediaPlayer. The player seemed to think a little and possibly timeout giving me an error 0xFFFFFFFF Now I tried many links and none seem to work! :(

Here is my code maybe I'm doing something wrong?

*Note I'm using a G1 phone using the 3G network to test this code
*Also, I've created my own server to try to use Wireshark to sniff the communications... And I do get OPTIONS, and DESCRIBE messages from the phone, but it seems that the replies from the server aren't received by the phone...

Thanks in advance!
Jona

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. //Start New Player
  2.  
  3.                         mp1 = new MediaPlayer();
  4.  
  5.                         try {
  6.  
  7.                                 updateTextField(txStream,       "Starting");
  8.  
  9.                                 mp1.setDataSource("rtsp://XX.XXX.125.33/one.mp3");
  10.  
  11.                                 mp1.prepare();
  12.  
  13.                         } catch (IllegalArgumentException e) {
  14.  
  15.                                 // TODO Auto-generated catch block
  16.  
  17.                                 updateTextField(txStream,       "Fail 1");
  18.  
  19.                                 e.printStackTrace();
  20.  
  21.                         } catch (IllegalStateException e) {
  22.  
  23.                                 // TODO Auto-generated catch block
  24.  
  25.                                 updateTextField(txStream,       "Fail 2");
  26.  
  27.                                 e.printStackTrace();
  28.  
  29.                         } catch (IOException e) {
  30.  
  31.                                 // TODO Auto-generated catch block
  32.  
  33.                                 updateTextField(txStream,       "Fail 3");
  34.  
  35.                                 e.printStackTrace();
  36.  
  37.                         }
  38.  
  39.                        
  40.  
  41.                         mp1.start();
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
medicalfix
Junior Developer
Junior Developer
 
Posts: 17
Joined: Sat Nov 01, 2008 9:55 pm

Top

Re: Problems playing an RTSP link... Help?

Postby r0b » Fri Mar 06, 2009 10:18 pm

Don't know if you solved this already but what is the format of the URL that you're trying to pass to the media player? And what is the application type of what you're trying to stream?

You may implement OnPreparedListener if you haven't tried that already.

medicalfix wrote:Hello,
I've been trying to play an RTSP feed containing an mp3 audio using the MediaPlayer. The player seemed to think a little and possibly timeout giving me an error 0xFFFFFFFF Now I tried many links and none seem to work! :(

Here is my code maybe I'm doing something wrong?

*Note I'm using a G1 phone using the 3G network to test this code
*Also, I've created my own server to try to use Wireshark to sniff the communications... And I do get OPTIONS, and DESCRIBE messages from the phone, but it seems that the replies from the server aren't received by the phone...

Thanks in advance!
Jona

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. //Start New Player
  2.                         mp1 = new MediaPlayer();
  3.                         try {
  4.                                 updateTextField(txStream,       "Starting");
  5.                                 mp1.setDataSource("rtsp://XX.XXX.125.33/one.mp3");
  6.                                 mp1.prepare();
  7.                         } catch (IllegalArgumentException e) {
  8.                                 // TODO Auto-generated catch block
  9.                                 updateTextField(txStream,       "Fail 1");
  10.                                 e.printStackTrace();
  11.                         } catch (IllegalStateException e) {
  12.                                 // TODO Auto-generated catch block
  13.                                 updateTextField(txStream,       "Fail 2");
  14.                                 e.printStackTrace();
  15.                         } catch (IOException e) {
  16.                                 // TODO Auto-generated catch block
  17.                                 updateTextField(txStream,       "Fail 3");
  18.                                 e.printStackTrace();
  19.                         }
  20.                        
  21.                         mp1.start();
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
r0b
Freshman
Freshman
 
Posts: 3
Joined: Fri Mar 06, 2009 8:04 pm

Re: Problems playing an RTSP link... Help?

Postby MrSnowflake » Sat Mar 07, 2009 3:23 pm

medicalfix wrote:*Also, I've created my own server to try to use Wireshark to sniff the communications... And I do get OPTIONS, and DESCRIBE messages from the phone, but it seems that the replies from the server aren't received by the phone...
It probably isn't possible to use UDP to send the RTSP control stuff, because you can't connect to a phone from out of your providers network. They probably use NAT.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby aor.leadapps » Mon Jun 22, 2009 2:06 pm

i am wondering whther mp3 over rtsp!!

but i successfully did aac;amr over rtsp to G1 device...

thx
aor.leadapps
-- " a online Radio" app for Android is nice onlineradio app for android
aor.leadapps
Freshman
Freshman
 
Posts: 2
Joined: Mon Jun 22, 2009 1:56 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 12 guests