Question

I would like play media (video) from a network stream(http) directly, hence so I have to somehow feed Android MediaPlayer with the data.

I have FileOutputStream outstream = new FileOutputStream(outputfile); which I write into the outputfile by outstream.write(buffer, 0, count);

Is there any API which takes stream as input....???.... Please help...

Was it helpful?

Solution

Android supports Progressive download and HTTP Live Streaming(only in 3.0) and both of these work over HTTP.

You can use VideoView or Mediaplayer to leverage Progressive downloading and play your videos: see this discussion.

Also, if your server, delivers segmented files(.ts) in conformance to Apple's Http Live Streaming IETF draft, you can directly supply the URL to MediaPlayer and play your video using SurfaceView. Note: that you will have to replace "http" with "httplive:" in your URL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top