What is the best API for video streaming on Android? The Video is basically MPEG 2, kept on server, I want to stream to my Android phone which is having the decoder and our own player.
(decoding is happening on the phone itself).
The requirement is the delay should be as minimum as possible for smooth decoding and play back.
What about Gstreamer, is it a most efficient way?
Any suggestions?
Rgrds,
Heshsham
may example given at http://code.google.com/p/html5webview/source/checkout helps you
Related
I need to stream rtsp-video from IP camera in local network to my android app. It's very easy to use VideoView and play it as url, or SurfaceView and play stream on it with native MediaPlayer. But when I stream that way - I've recieved a 6-second delay when my phone is buffering that video. As I read, there is no way to change buffer size of MediaPlayer. But I saw several apps that stream video from my camera in almost real-time. I've read a lot about this - cause I'm not the first one who encountered this problem - but didn't find any useful info.
Many thanks for any help!
I'm using vlc-android, it works well to play my cameras' rtsp links:
https://github.com/mrmaffen/vlc-android-sdk#get-it-via-maven-central
The delay is about 1 second.
From documentation: "Adaptive Streaming - Automatically adapts to either congestion or bandwidth availability". But this works only when player starts (I use VideoView). If the intrenet speed falls while playing video - nothing happens but it is preferable that player switch video quality base on curren internte speed. So, questions:
Does android video player supports switching video quality in real time while playing video?
If yes, how to implement this?
Thank you for your attention.
Update:
For example Youtube google tv app. If bandwidth changing while playing video, player automaticaly switches to appropriate video quality without any delays.
What I have to do to make it work? I am using VideoView and it is works only when I start player.
Thank you.
Typically you would implement your own subclass of the VideoView that utilizes some form of QoS to monitor network bandwidth. If you are working on a Google TV application you can use the GtvVideoView (which supports smoothstreaming). To understand more about this you can read up on it here: https://developers.google.com/tv/android/articles/hls?hl=en
I'm trying to create an app to stream live TV. Currently the problem I'm facing is that after say 10 minutes of playing, the video will freeze but the audio will carry on. This is on a 1.3mbps stream. I also have lower streams, such as a 384kbps stream, that might last an hour or so, but will still do the same. I've tested this with a local video, that is high quality (file size is 2.3gb) and that has no lag and doesn't freeze at all, so it must be something to do with the way HLS is streamed to android.
Does anyone have any idea on how to solve this problem?
Thanks
I am evaluating the possibility of displaying a continuous H.264 live feed (RTSP) on an Android device (2.3+ or even 4.0). I need the delay time (source to display, can assume source encoding to have zero delay) to be within 1 second or so. Wonder if anybody has done this already? What would be a good approach to achieve this?
Thanks in advance
Michael
Maybe you could just give it a try. H264 is supported by android and is even hardware-accelerated on the latest generation of (upper and middle class devices). There is the MediaPlayer class, which can be used to play video files and it also supports the streaming of http and rtsp URIs.
I am currently working on an android application in which i have to stream the mobile camera footage live to a public URL. I have managed to convert the .MP4 format to .FLV format so that the video stream can be viewed in a browser using a flash plugin. However, the lag in the stream is about 10-15 seconds. Can anyone suggest dome compression techniques or other tricks and tweaks so that i can reduce the lag time?
Thanks!
Use JW player for faster playback. Also reduce buffering by using suitable flashvar.
refer http://www.longtailvideo.com/support/jw-player/13/embedding-flash.
If you are streaming over WiFi you may face more delay.