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
I think u can find solution from this:
ReplyDeletepackage 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();
}
}
There's a similar question with some good answers.
ReplyDeleteIf you don't get solution up till now, then i will help you.
ReplyDeleteright click on the packet (in wireshark) and select decode as option. Then select rtp. Now you can see RTP packets in wireshark.