×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    1

    Unhappy Video streaming from J2ME to PC

    Hi,
    I'm trying to develop app to stream live camera view from cell phone (J2ME) to PC via wifi. My problem is sending stream to server on pc. I've tried to do something like that (which I found on some forum):
    Code:
    socketConnection = (SocketConnection) Connector.open("socket://"+ip+":"+port);
    player = Manager.createPlayer("capture://video");
    player.realize();
    recordControl = (RecordControl) player.getControl("RecordControl");
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    recordControl.setRecordStream(output);
    byte [] data = output.toByteArray();
    outputStream = socketConnection.openOutputStream();
    outputStream.write(data);
    player.start();
    recordControl.startRecord();
    but it doesn't work. Are sockets good idea or I need to use something different? Could you give me any piece of information how to manage the problem, because Im not even close to the solution. Any ideas or links will be helpfull.
    I've read a lot about RTSP and there are many examples how to downstream a video to j2me but none for streaming from phone.
    On the server part I'm going to use Xuggler library to display the video.
    Thanks

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Video streaming from J2ME to PC

    Streaming from the phone with Java is not possible. You will not be able to read the recorded video data until you stop recording.
    A workaround is to record one short video clip, stop recording, start sending that data in another thread while starting to record a new short clip in the other thread. The resulting video stream (built from separate clips) will not be smooth though...

    Hartti

Similar Threads

  1. Video Streaming using j2me
    By neelambari in forum Mobile Java General
    Replies: 2
    Last Post: 2011-05-30, 12:40
  2. J2ME Video Streaming
    By bangus in forum Mobile Java Media (Graphics & Sounds)
    Replies: 47
    Last Post: 2010-06-09, 00:10
  3. Streaming video on N95 using J2ME
    By arielbm in forum Mobile Java Media (Graphics & Sounds)
    Replies: 9
    Last Post: 2009-12-07, 07:01
  4. Can i do video streaming in J2ME
    By chandanp in forum Mobile Java General
    Replies: 1
    Last Post: 2002-09-10, 16:45
  5. Can i do video streaming in J2ME
    By chandanp in forum Mobile Java General
    Replies: 0
    Last Post: 2002-09-10, 08:31

Posting Permissions

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