×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    8

    Question Playing RTSP stream of sdp extension ?

    Hi everyone. I'm currently doing my final year project and I'm really short of time. I'll really appreciate your help.
    I want to recieve the rtsp stream and play it in my nokia e65 ( symbian s60 v3 ).
    I do the streaming from my laptop with VLC media player with proper encoding for mobile ( I do the stream of my webcam, in other words it's live content ), I checked if it works or not from another pc in my network, and I can recieve the stream when I try the link "rtsp://ipaddress:554/webcam.sdp" with quicktime .

    I checked if my phone supports rtsp and sdp, and get the result as it supports rtsp protocol for "application/sdp" file type.

    so I started my mobile application, but I get the problem "Cannot create player for rtsp://ipaddress:554/webcam.sdp".
    Can you please check my code ? or provide me with some other alternatives to do this.

    I've checked internet for some kind of application like this but all I got was streaming applications for video on demand systems. I never saw someting for sdp and live content streaming.

    If you've succeeded doing something like this, please contact me, tell what you've used while doing something like my project, challenges etc.

    here's the VLC batch script for rtsp streaming ( works on quicktime which's on pc , but not with realplayer on my nokia e65 )
    Code:
    call "C:\Program Files\VideoLAN\VLC\vlc.exe" dshow://vdev="Chicony USB 2.0 Camera" adev="" -vvv --audio --sout "#transcode:rtp" --sout-rtp-dst="192.168.1.4" --sout-rtp-name="MHSS" --sout-rtp-sdp="rtsp://192.168.1.4:554/webcam.sdp" --sout-transcode-vcodec="mp4v" --sout-transcode-vb="400" --sout-transcode-width="144" --sout-transcode-height="176" --sout-transcode-fps="15" --sout-transcode-aenc="ffmpeg" --sout-transcode-acodec="mp4a" --sout-rtp-mp4a-latm --sout-transcode-ab="32" --sout-transcode-samplerate="16000" --sout-transcode-channels="2"
    here's my code for video

    Code:
    //imports here
     
    public class VideoCanvas extends Canvas implements PlayerListener, CommandListener {
     
    	private Command start;
    	private Command stop;
    	private Command back;
    	private Command exit;
    	private String url;
    	private String status;
    	private String status2;
    	private Player player;
    	private VideoControl control;
     
    	public VideoCanvas(String url) // the url is "rtsp://ipaddress:554/webcam.sdp"
    	{
                    start = new Command("Start",Command.OK,0);
                    stop = new Command("Stop",Command.OK,0);
    	        back = new Command("Back",Command.OK,0);
    	        exit = new Command("Exit",Command.BACK,0);
    	        status = "Press left softkey";
    	        status2 = "";
    	        player = null;
    	        control = null;
    		this.url = url;
    		addCommand(start);
    		addCommand(stop);
    		addCommand(back);
    		addCommand(exit);
    		setCommandListener(this);
    		this.setFullScreenMode(true);
    	}
     
    	public void commandAction(Command c, Displayable d) {
    		if(c == start) {
    			start();
    		}
    		else if(c == stop) {
    			stop();
    		}
    		else if(c == exit) {
    			Main.midlet.notifyDestroyed();
    		}
    		else if(c == back) {
    			Main.mobileDisplay.setCurrent(Main.loginForm);
    		}
     
    	}
     
    
    	protected void paint(Graphics g) {
    		g.setColor(255,255,255);
    		g.fillRect(0,0,getWidth(),getHeight());
    		g.setColor(0,0,0);
    		g.drawString(status2,0,0,Graphics.LEFT|Graphics.TOP);
    		g.drawString(status,getWidth(),getHeight(),Graphics.RIGHT|Graphics.BOTTOM);
    	}
     
    
     
    	public void start() 
    	{
    		try {
    		    player = Manager.createPlayer(url);
    		    player.addPlayerListener(this);
    		    player.realize();
     
    
    		    // Grab the video control and set it to the current display.
    		    control = (VideoControl)player.getControl("VideoControl");
    		    if (control != null) {
    		    	control.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,this);
    		    	control.setDisplaySize(176,144);
    		    	int width = control.getSourceWidth();
    		    	int height = control.getSourceHeight();
    		    	status2 = "Before: SW=" + width + "-SH=" + height + "-DW=" + control.getDisplayWidth() + "-DH=" + control.getDisplayHeight();
    		    }
     
    		    player.start();
    		}
    		catch(Exception e) {
    			Alert erro = new Alert("Erro",e.getMessage(),null,AlertType.ERROR);
    			Main.mobileDisplay.setCurrent(erro);
    		}
    	}
     
    	public void stop() {
    		if(player != null) {
    			player.deallocate();
    			player.close();
    		}
    	}
     
    	public void playerUpdate(Player p, String s, Object o) {
    		status = s;
     
    		if(p.getState() == Player.STARTED)
    		{		
    			int width = control.getDisplayWidth();
                int height = control.getDisplayHeight();    	
    			control.setDisplayLocation((getWidth() - width)/2,(getHeight() - height)/2);
    			control.setVisible(true);
    			status = s + ": DW=" + width + "-DH=" + height + "-SW=" + control.getSourceWidth() + "-SH=" + control.getSourceHeight();
    		}
    		repaint();
    		setTitle(status);
    	}
     
    }
    Last edited by lunatictr; 2009-11-25 at 15:29.

  2. #2
    Registered User
    Join Date
    Oct 2009
    Posts
    8

    Unhappy Re: Playing RTSP stream of sdp extension ?

    anybody who have an idea ? or anybody who have done something like this ? no one ?

    whatever, I've also tried the stream with n95 8g. I can get the audio, but I cannot get the video. any idea on that ?

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    5

    Re: Playing RTSP stream of sdp extension ?

    Hi lunatictr,

    How's your project going? is it done yet? maybe you can check on below site to solve your issue:
    http://wiki.videolan.org/Documentati..._Mobile_Phones


    FYI, Im currently developing a similar project like yours. I have some question for u:
    1) Are you running on Mac or Windows?
    2) how you do the stream the live video from webcam to your phone?
    3) Also would you mind guiding me with steps of doing this?

    Hope u can help me answering those questions. Thanks in advance.

  4. #4
    Registered User
    Join Date
    Oct 2009
    Posts
    8

    Re: Playing RTSP stream of sdp extension ?

    Quote Originally Posted by rayz90 View Post
    Hi lunatictr,

    How's your project going? is it done yet? maybe you can check on below site to solve your issue:
    http://wiki.videolan.org/Documentati..._Mobile_Phones


    FYI, Im currently developing a similar project like yours. I have some question for u:
    1) Are you running on Mac or Windows?
    2) how you do the stream the live video from webcam to your phone?
    3) Also would you mind guiding me with steps of doing this?

    Hope u can help me answering those questions. Thanks in advance.
    Hi rayz90,

    My project is done, I've graduated

    1) Running on linux -> Ubuntu 9.04
    2) By RealPlayer, I give a command to run the RTSP link by Java in my code
    3) send me your e-mail address as private message I can send you my thesis report, codes etc.

  5. #5
    Registered User
    Join Date
    Dec 2009
    Posts
    5

    Re: Playing RTSP stream of sdp extension ?

    Congratulation! I have sent u a message containing my email. Thanks.


    If u didn't get the private message that i send, here's my email: rayme_z[at]yahoo.co.uk

    thanks again.
    Last edited by rayz90; 2010-03-23 at 11:20. Reason: adding email address

Similar Threads

  1. Playing RTSP stream of sdp extension ?
    By lunatictr in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2009-11-19, 14:08
  2. Gap playing RTSP stream in S60
    By Tiger79 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2009-08-18, 09:02
  3. Problem with Audio Stream - stops playing
    By michi2805 in forum Audio
    Replies: 2
    Last Post: 2009-04-15, 11:19
  4. Recording in Amr Format
    By losym in forum Symbian Media (Closed)
    Replies: 12
    Last Post: 2009-03-26, 06:41
  5. Cannot get rtsp stream to play on N93
    By orpheus in forum Streaming and Video
    Replies: 0
    Last Post: 2007-02-20, 21:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×