How do I transfer live video streaming to server from my and

All your problems with Audio, Video and Images.

How do I transfer live video streaming to server from my and

Postby poc7667 » Sun Dec 26, 2010 3:23 pm

Hello , I have a problem about streaming my video to server in real-time form my phone.
that is , let my phone be a IP Camera , and server can watch the live video from my phone

I have googled many many solutions, but there is no one can solve my problem.

I use MediaRecorder to record . and it can save video file in ths SD card correctly.
then , I referred this page and used some method as followings

Code: Select all
     skt = new Socket(InetAddress.getByName(hostname),port);
     pfd =ParcelFileDescriptor.fromSocket(skt);

but it seems when I trigger mediaRecorder.stop , then transferring the video file.
but I want to transfer the video stream lively ,
does any one have any idea?

btw, I wrote a to receive the video stream ,
but it doesn't work . is there any error?

Code: Select all
    public class UDPServer {
       DatagramSocket theSocket = null;
       int serverPort = 1778;
       public static void main(String[] args)
          UDPServer theServer = new UDPServer();
       public UDPServer()
          try {
             // create the server UDP end point
             theSocket = new DatagramSocket(serverPort);
             System.out.println("UDP Socket (end point) created");
          } catch (SocketException ExceSocket)
             System.out.println("Socket creation error : "+ ExceSocket.getMessage());
       public void clientRequest()
          DatagramPacket theRecievedPacket;
          DatagramPacket theSendPacket;
          InetAddress clientAddress;
          int clientPort;
          byte[] outBuffer;
          byte[] inBuffer;
          // create some space for the text to send and recieve data
          outBuffer = new byte[500];
          inBuffer = new byte[50];
          try {
             // create a place for the client to send data too
             theRecievedPacket = new DatagramPacket(inBuffer, inBuffer.length);
             // wait for a client to request a connection
             System.out.println("Client connected");
             // get the client details
             clientAddress = theRecievedPacket.getAddress();
             clientPort = theRecievedPacket.getPort();
             String message = "Server - client sent : " + new String(theRecievedPacket.getData(),0, theRecievedPacket.getLength());
             outBuffer = message.getBytes();
             System.out.println("Client data sent ("+message+")");
             // send some data to the client
             theSendPacket = new DatagramPacket(outBuffer, outBuffer.length, clientAddress, clientPort);
          } catch (IOException ExceIO)
             System.out.println("Error with client request : "+ExceIO.getMessage());
          // close the server socket

I confused a long time....
thanks in advance
Once Poster
Once Poster
Posts: 1
Joined: Sun Dec 26, 2010 3:20 pm


Re: How do I transfer live video streaming to server from my

Postby Nortgram » Fri Aug 12, 2011 7:07 am

im also interested
Posts: 3
Joined: Thu Jul 21, 2011 4:14 pm


Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 16 guests