Skip to main content

Streaming Video From Android



I'm trying to stream video from the Android phone, which should be watched in an mediaplayer. I've been looking at http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system which seems to be a dead end since it send the raw file data, and not a streamable format.





Then I tried using some code from SipDroid, more specific; parts of VideoCamera.java, RtpPacket.java and RtpSocket.java, which gives a stream on UDP, however these is not playable in i.e. mplayer(can't detect the codec). Wireshark tells that it is a UDP packet and not a RTP packet so something might be missing?





I'm kind'a stuck, have you any suggestions how to get past this bump?



Source: Tips4all

Comments

  1. I think u can find solution from this:
    package com.Videoplaying;

    import android.app.Activity;
    import android.net.Uri;
    import android.os.Bundle;
    import android.widget.MediaController;
    import android.widget.VideoView;

    public class Video extends Activity {
    private MediaController mc;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    VideoView vd = (VideoView) findViewById(R.id.VideoView);
    String LINK = "http://daily3gp.com/vids/747.3gp";
    mc = new MediaController(this);
    mc.setMediaPlayer(vd);
    Uri uri = Uri.parse(LINK);
    vd.setMediaController(mc);
    vd.setVideoURI(uri);
    vd.requestFocus();
    vd.start();
    }
    }

    ReplyDelete
  2. There's a similar question with some good answers.

    ReplyDelete
  3. If you don't get solution up till now, then i will help you.
    right click on the packet (in wireshark) and select decode as option. Then select rtp. Now you can see RTP packets in wireshark.

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?