Android :: Buffering While Reading H264 Video (Using HTTP Protocol)
Oct 13, 2010
I'm developing an application on Android 2.2. This application have to read some h264 videos using HTTP protocol. To read a video, I'm using following methods :
// INIT PART mMediaPlayer = new MediaPlayer(); mMediaPlayer.reset();
mMediaPlayer.setOnErrorListener(this); mMediaPlayer.setOnBufferingUpdateListener(this);
mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.setOnSeekCompleteListener(this);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
// SET DATASOURCE mMediaPlayer.reset(); mMediaPlayer.setDataSource(url);
mMediaPlayer.prepareAsync();
In prepareAsync callback : public void onPrepared(MediaPlayer mediaplayer) { mMediaPlayer.start();
}
View 2 Replies
Jul 8, 2010
i have a camera Activity after which i take a picture and saving it to gallery and uploading to the server My upload code is not working, i need help on this? // image capture
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(intent, 0);
//image Saving
if (requestCode == 0 && resultCode == RESULT_OK)
{ Bundle extras = data.getExtras();
Bitmap b = (Bitmap) extras.get("data");
ImageView mImg;
mImg = (ImageView) findViewById(R.id.head);
mImg.setImageBitmap(b);
// save image to gallery
Shot = "HeadShot"; //Long.toString(System.currentTimeMillis());
MediaStore.Images.Media.insertImage(getContentResolver(), b, Shot, NAME);
//Upload to the server public void Upload(String url, HttpEntity imgdata) throws Exception, Exception {
DefaultHttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(url);
post.setHeader("Content-Type", "bitmap; charset=utf-8");
post.setURI(new URI(url));
post.setEntity(imgdata);
HttpUriRequest request = post;
HttpResponse response = client.execute(request);
HttpEntity entity = response.getEntity();
return entity.getContent();
View 1 Replies
View Related
Mar 16, 2010
I'm trying to send messages generated by Google Protocol Buffer code via a simple HTTP scheme to a server. What I have currently have implemented is here (forgive the obvious incompletion):
HttpClient client = new DefaultHttpClient();
String url = "http://192.168.1.69:8888/sdroidmarshal";
HttpPost postRequest = new HttpPost(url);
String proto = offers.build().toString();
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
nameValuePairs.add(new BasicNameValuePair("sdroidmsg", proto));
postRequest.setEntity(new UrlEncodedFormEntity(nameValuePairs)); try { ResponseHandler<String> responseHandler = new BasicResponseHandler(); String responseBody = client.execute(postRequest, responseHandler);} catch (Throwable t) { }I'm not that experienced with communications over the internet and no more so with HTTP - while I do understand the basics... So my question, before I blindly develop the rest of the application around this, is whether or not this is particularly efficient? I ideally would like to keep messages small and I assume toString() adds some unnecessary formatting.
View 1 Replies
View Related
Aug 6, 2010
Is there a way to change the buffer size in the media player on Android? I'm trying to stream video to mobile devices over rtsp. It works fine, but on android v1.6+ the buffer overflows leading to degraded video quality. Is there any way to configure the media player to use a bigger buffer, or take any other measures to prevent overflow?
View 3 Replies
View Related
Oct 14, 2010
I'm playing video on Android using media player via RTSP. The player takes about 12s to buffer before it starts playing. Anyone know how I can convince the player to buffer less? I have full control over the RTSP server and the SDP it returns.
View 1 Replies
View Related
Jun 4, 2010
I have an app that displays a video using VideoView. The layout consists of a Clock and a VideoView laid out in a simple vertical LinearLayout. Here's my code snippet that I use:
VideoView mVideoView = new VideoView(this);
mVideoView.setVideoPath(myVideoURL);
mVideoView.requestFocus();
mVideoView.start();
Since the buffering of the video takes about 8-10 seconds, the layout comes up with the Clock, but the VideoView stays blank. What I want to achieve is this:
- Display an ImageView for the 10s while the video is buffering
- Detect when the video is ready to be played (onPrepared?)
- Show the Clock and VideoView and start the Video
View 1 Replies
View Related
Dec 14, 2009
I have a problem streaming live video files. When I stream a file say of duration 5 minutes, it stops after streaming 2 to 3 minutes and enters in to endless buffering state. The VideoViews's OnBufferingListener is endlessly executed, however it shows that the buffering is not progressing anymore : MediaPlayer's buffer says it has buffered for example 90% whereas when I call videoView.getBufferPercentage(), I get something very low, like 1% or 5% ... After a while in the buffering state, the application crashes. It seems like the buffering is taking all the memory.
View 2 Replies
View Related
Mar 27, 2010
Using the Android SDK, is it possible to play a video stream using the MMS protocol I am streaming video from a PC using windows media. I can use Windows Media Player to play the stream by just inputting the following URL in Windows Media Player mms://192.168.223.194:8081. Is it possible to play the same stream using the Android SDK?
View 1 Replies
View Related
Dec 3, 2009
I am currently involved with developing a streaming media player for android. For testing purpose I have HTC HERO , HTC G1, and droid. I could stream audio and video both for only HERO. On G1 and Droid I get this error "Player Engine AO did a leave , error = 101 ", surprisingly this comes as soon as describe response is sent to the client!. So far I have not able to find out the exact cause of this error. Should it imply that (on droid and G1) Video type H264 is not supported for streaming? (RTSP).
Firmware details.
HERO >> 1.5 G1 >> 1.6 droid >> 2.0
RTSP streaming for only aac works fine on all the devices.
View 3 Replies
View Related
Apr 1, 2013
I can start streaming a video perefectly. However, if i pause it to go do something, or to let it pre-buffer, and i play it again, it will play for a little then stop. I look at the seekbar and it says its fully buffered. However, its not and it doesnt play anything and just sits their saying its buffering.
My guessing, well first attempt and finding the culprit, is that the service that is processing the video gets prematurely terminated and restarted thus returning that the buffer is complete.
View 3 Replies
View Related
Jun 6, 2013
I know the zeiki TB782B is cheap decent tablet but the video buffering from streaming websites is just a killer some sites are better than others Its not my internet speed that's good,but is there anyway I can improve this issue by downloading an app or some kind of hack or update?
View 1 Replies
View Related
Feb 16, 2010
I am writing a media player application in Android when I calling a mp.prepare() it is giving a IllegalStateException. The same RTSP URL working with VLC or quick time Media Player.
View 2 Replies
View Related
Jul 26, 2010
I need HTTP/RTSP Video Streaming with Android. Any Ideas ?
Is that possible to go with JMF with Android ? Any Working examples ?
Already tried with
http://davanum.wordpress.com/2007/12/29/android-videomusic-player-sample-from-local-disk-as-well-as-remote-urls/
Its not working with my case. Are there any specific types of videos that Android can stream?
View 1 Replies
View Related
Jul 9, 2010
I am working on an Android application which is supposed to play videos over HTTP on Android devices. Before we setup a server to host the video files just wanted a few things clarified: As per the developer documentation, Android supports .mp4 and .3gp container formats for video.
The audio-video codec used for our media files is H.263(video) and AAC LC (Audio). I did a little experiment and passed URL of one of the video files to the MediaPlayer class and got the following error: Command PLAYER_INIT completed with an error or info PVMFErrContentInvalidForProgressivePlayback.
From the docs, I came to know that for progressive playback, the video's index (e.g moov atom) should be at the start of the file. How do we make our videos Android-ready? What are the different considerations that we need to make?
View 4 Replies
View Related
Jul 9, 2010
I am working on an Android application which is supposed to play videos over HTTP on Android devices. Before we setup a server to host the video files just wanted a few things clarified: As per the developer documentation, Android supports .mp4 and .3gp container formats for video. If we use H.263(video) - AAC LC (Audio) audio-video codec used for our media files will we be able to play the video by passing the URL to MediaPlayer class?
I did a little experiment and passed URL of one of the video files(.mp4) to the MediaPlayer class and got the following error:
Command PLAYER_INIT completed with an
error or info
PVMFErrContentInvalidForProgressivePlayback
From the docs, I came to know that for progressive playback, the video's index (e.g moov atom) should be at the start of the file. Questions:
1. How do we make our videos Android-ready?
2. What are the different considerations that we need to make?
View 1 Replies
View Related
Nov 4, 2009
Did anyone try playing audio/video through http/rtsp. I am having a problem with either of the approach.... I am getting an error Command PLAYER_INIT completed with PVMFError I some cases I got Command PLAYER_INIT completed with PVMFErrorContentInvalidForProgressiveDownoload.
Can some one explain what is the problem. The code snippet I am using is given below. Code...
The code works fine when I say mVideoView.setVideoPath("/sdcard/vv.3gp"); but not able to play if I give a rtsp/http urls. In case of http it says PVMFErrorContentInvalid for progressive download.
Can some body tell me what is the problem. Can you please post the code if someone has been successful in playing audio/video through http/rtsp.
View 8 Replies
View Related
Nov 18, 2010
I am New to android my intention is to play video using Http. But i am "Http Request Failed 404" Exception when iam trying to run my application in emulator.
can any one know this error?
View 3 Replies
View Related
Feb 3, 2012
I have recently bought a Tablet with Android 2.2 OS and I want to stream my 1000+ movies compressed with divix and h264. All have the AVI file extension. They are shared on my home network. My goal is to be able to stream these files to to my tablet. After searching most the day for which app to use I have come to the conclusion that there are many different way to accomplish this, some good, some bad.
I loaded Skifta on my PC and tablet and can now see the files but it says It cant play the file. Best way to accomplish this as google turns up 20 ways from sunday to stream AVI but which is best. I do like the fact that Skifta can access ones videos even away from home in a wireless hotspots. I was also looking at VLC but don't want to purchase something that won't work.
View 1 Replies
View Related
Aug 7, 2010
I am trying to dump h264 encoded bitstream to a file(video recording usecase). I had added the code for the file dump in the OMX FillBufferDone () callback. [Fillbufferdoneprocessing() function in pvmf_omx_enc_node.cpp] In the dump, what I observed is that the start code is not present and I think the SPS and PPS sequences are getting dumped. I am unable to playback the dumped stream. I am using 'ffplay' player.
View 3 Replies
View Related
Jun 21, 2010
I have tried to play several H.264 720p video samples on my EVO, and I get sound but no video. Two examples are the Simpsons trailer and the Fantastic Four trailer at H.264 Demo Clips | H264info.com I get no error, and I have tried the Android media player and several others (which are no doubt using the same API's underneath). Is it expected that video will not play for these files? Obviously the phone's screen would not be able to play them in full detail but I didn't expect that it could not play them at all. What is the point of having 720p resolution over HDMI when the phone can't play videos at that resolution? Or is it that it supports some particular type of H.264 and these videos aren't supported? Or is it actually trying to output directly through HDMI and I see nothing since I don't have it hooked up? UPDATE: I trans coded these sample trailers using Handbrake, and even when I end up with a LARGER file size they do play at 720p. But if I use the high quality preset, they do not work even at a low butyrate at 720p. So it's something about the "advanced options" that determines whether the EVO can play it or not.
View 10 Replies
View Related
Jun 24, 2010
After looking at comparison videos of the quality of 720p video compared to that of the Samsung Galaxy and Iphone 4g, should we be asking HTC for a true HD codec for compression? We have a very powerful device in the EVO 4G, but it is clear that there are a few shortcomings in terms of the software tools provided to unlock that power.
View 2 Replies
View Related
Jun 24, 2010
Our device has the ability to record up to 720p video, but is bottlenecked by an outdated compression method. This post is to start an OFFICIAL Petition for HTC to offer us an update that will allow us to gain full access to this feature. We are only asking that our EVO's be given the ability to compress HD content properly. Chime in to join this OFFICIAL Petition.
View 49 Replies
View Related
Nov 29, 2009
I wanted to share my method of converting my windows 7 media center TV recordings to h264 for the Droid. This may work for Vista, but assumes that you have the media pack, so your files are .wtv files (not dvr-ms).
I use MCEBuddy 2.0 Beta 11. This is a small service to convert the wtv to mp4. I Edited the mcebuddymencoder.conf file and change the H264 mencoder settings to this.
Code:
View 16 Replies
View Related
Apr 11, 2010
When I use the VideoView to play the RTSP streaming, the VideoView will buffering some cache buffer. Is there any method to tell the VideoView DON'T buffer? My code:
String VideoUri = "rtsp://192.168.5.121:6666/live/h264"; mVideoView = (VideoView) findViewById(R.id.video_view); mVideoView.setVideoURI(Uri.parse(VideoUri)); mVideoView.start();
View 5 Replies
View Related
Jun 3, 2010
I am using VideoView to display a video in my app. The problem is that, once the layout gets created there is lag of almost 10-30 seconds before which the video starts to play. I can see in LogCat that the video is buffering during the lag. Is there a way I can minimize this lag, or tell MediaPlayer to play the video sooner?
View 1 Replies
View Related
Oct 19, 2010
Is double buffering makes any sense on android? Can it be implemented?
View 1 Replies
View Related
Sep 1, 2010
If you click on the top left corner, on the logo of whatever channel you are listening to, it gives you an options menu for buffering. But I really don't know what all these numbers and settings actually mean. You click on a "Start Buffer" and there are just 5 numbers to choose from. Can anyone explain what all these settings are?
View 1 Replies
View Related
Jun 9, 2009
Do anyone here having experience of applying double-buffering in Android 2D animation/ games? I'm sure this is a pretty basic functionality people will discuss about when writing games on Android, but seems like the source I found on web was pretty little. The only one I found is using OpenGL blit (intro by Chris Pruett in Google IO 2009 session). If I want only a 2D, how do I do that?
View 14 Replies
View Related
Jun 2, 2010
I am using MediaPlayer to play a video in my app. The video takes a while to buffer and the videoview is blank for that time. Is there a way to start the buffering when the user is in the previous screen, so that when he comes to the video playing screen, the video is ready to play?
View 2 Replies
View Related
Jan 1, 2013
How do i remove the buffering sound from an radio app for android? My phone is rooted. I transferred the app to my pc and then I used apktools for extracting. The extracted .apk contains a few maps with a lot of xml and smali files and a few image files. I could'nt find any audio files in any of these maps (which could be the irritating loading sound that i want to remove).
View 3 Replies
View Related