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
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.
I'm making an android app that can play audio streams from URLs.
Activity contains a simple Play/Pause button and a Seekbar.
I've managed to play the stream by running the media player as a service but now I want to achieve buffering.
Buffering in the sense that, when the mediaplayer starts, I want the stream to be saved in a buffer or a temporary location.
Also I want to show this buffered amount in the seekbar (probably as a secondary progress) & when the user drags the seekbar to any buffered point, the player should play that stream without any disruption.
So, I'm seeking a decent tutorials for this. I tried searching but not able to find a simpler solution for Version >= 2.3.
(But, if it works for 2.2 also, that be great too)
Thank You
I used the internet radio streaming posted in an answer here: Online radio streaming app for Android
And then I used some of this guy's work for implementing a visualizer: https://github.com/felixpalmer/android-visualizer
I'm having a trouble on the Samsung S3 though. Have you had any issues with streaming internet radio? It works fine on Samsung Music, Note, Note II, S II, S III mini, (even) S4 and Google Nexus phones, but supposedly because of some firmware buffer setting on the S3, it's just not streaming music on an S3.
I've gotten results like streaming after 2-5 minutes, but who wants to wait 5 minutes for a radio stream to start - no one!
I've discovered that it sometimes depends on the bitrate of the stream. For example, a 96 kb/s bitrate stream started playing instantly on the S3, while a 128 kb/s bitrate stream took 2+ minutes. Which actually just does not make sense, since one would think that the higher bitrate stream would fill the buffer quicker than the lower bitrate stream.
Do you have any advice or suggestions for me? I have questions here and here.
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
We are writing an Android App on the Samsung Galaxy Tab. We have an Endoscope (Medical Surgery Camera) as DV-input and we want to live-stream the DV Video to the Tablet.
As a streaming server, we have the VLC player and a RTSP stream. The encoding works fine, and streaming over the network(rtsp) to another computer is good (< 1s). However, if we open the RTSP stream on the Galaxy Tab, there is a lag of 6-7s.
I have tried to set down the bitrate encoding (even the lowest doesn't work, the streaming lag results the same). So I think there must be some kind of network caching or video caching on the Android itself.
I googled and didn't find a way to disable or even modify caching on the videoview / mediacontroller.
Does anyone have an idea how to tweak the Android Streaming View?
Edit:
I figured out that it must be the internal buffer size that limits the video stream velocity. The LogCat tells me that AweSomePlayer is the Videoplayer in charge. So next question: How to change the awesomeplayer buffering size? I think it's written in cpp. How can I access this precompiled code via eclipse/java/android?
Does anybody have any luck streaming a high quality video (over 1000kbps) to Android through RTSP?
We currently have low quality video streams (around 200kbps) that work wonderfully over 3G. Now we are trying to serve a high-quality stream for when the user has a faster connection. The high quality videos play smoothly in VLC, but the Android playback seems to drop frames and get blocky, even on a 4 megabit connection.
It seems like the YouTube app uses a plain HTTP download for their high quality videos. This works well and plays smoothly, but will not work for streaming live videos. Has anybody had luck streaming high quality videos to Android through RTSP?
The videos are encoded using H.264, 1500kbps, 24fps, and a 720x480 resolution. In the app, we are using a VideoView to play the videos. We are using Darwin Streaming Server, but we are open to other options if necessary.
Update 6/23/2011
Looking through Darwin some more today. So far, I am just logging the request and session information in a Darwin module.
The original Droid tries to use these settings: 3GPP-Adaptation:...size=131072;target-time=4000. Although that means it wants 4 seconds of buffer, 131Kb only holds about a second of playback at 1200kbps. I understand that 1200kbps is large, but it is necessary for a high quality video (minimal compression on 720x480).
I am trying to force the client to buffer more, but I haven't figured out how to do that yet. I'm just looking through the Darwin Streaming Server source and trying to figure out how they do things. Any Darwin experts out there?
Update 6/24/2011
As it turns out, using plain old HTTP for viewing videos on demand works well with no loss of quality. When we get to live streaming, we will have to look more into RTSP.
Well even if the network is able to transmit at that rate, you still need to decode it. What are you using for decoding? You will probably need to use a NEON accelerated video decoder so you can have a proper framerate, and a decent size buffer... the graphics processor is only as good as the bus that it is in... Also what are your encoding settings and resolution?
Edit: You are encoding those at much to high bitrate, half of that will do fine. Also you need to make sure where the issue lies. Is the mediaPlayer getting the data and failing to stream at a decent framerate, in that case you have to replace the MediaPlayer code with your own player. Is it's network issue then only solution is to lower the bitrate, 600Kbps would be just fine (or 500Kbps video, 128Kbps audio), it's 3x your 200k stream and on a screen this small, the difference is not noticeable.