Rectangle 27 0

It works for simple cases, but only when it is not required to make some custom preparations for requests to get a stream.

This tutorial shows an example of manual streaming emulation for an audio but it can be a little refactored to play video:

(be sure to use FileDescriptor when setting dataSource, the API was changed slightly from those times).

I followed that blog and it works only for audio files. It doesn't work for video file, To check whether progressive streaming works or not i wrote a sample program where it will download only half video and start playing half downloaded video file, it gives error message saying can't play this video.

android - Using VideoView for streaming or progressive-download video ...

android videoview
Rectangle 27 0

Yes, there is a difference in the formats supported for streaming and those supported for local playback. I had to do quite a bit of experimentation to find a format that would work on all the Android devices in our office and work via streaming.

What format was that? I'm only targeting the Galaxy tablet but I'd like to be as compatible as possible.

How about supplying information on what specifically worked? Please?

It would be nice to share your conclusion! :p

encoding - Android VideoView streaming - Stack Overflow

android encoding streaming mp4 videoview
Rectangle 27 0

I solved the issue. The problem was the resolution of the videos; All devices support up to 480 x 360 px in SD and only some of the devices support up to 1280 x 720 px in HD.

Android RTSP live streaming with videoview - Stack Overflow

android videoview rtsp codec
Rectangle 27 0

The VideoPlayer is a wrapper for MediaPlayer and SurfaceView, it's more easy to implement video player with VideoView than with a MediaPlayer, if the video files are stored in the internal storage of the app use content provider or store them as world readable, otherwise it will not work

streaming - What are the difference between MediaPlayer and VideoView ...

android streaming android-mediaplayer videoview
Rectangle 27 0

Finally I found out my problem the problem wasn't with the code but the media I have used wasn't standard according to google's doc.

video streaming - How to stream and download a media from local storag...

android video-streaming videoview nanohttpd progressive-download
Rectangle 27 0

is it possible to play video as progressive download, or by streaming, simply by using setVideoPath or setVideoURI, as in VideoViewDemo in the API samples?

It should. It certainly works with MediaPlayer, and VideoView is just a ~200 line wrapper around MediaPlayer and a SurfaceView.

The VideoViewDemo code suggests using setVideoURI for streaming, but I'm not clear what kind of URL I should be using.

http:// and rtsp:// can work, if the video was encoded properly.

Does someone have an example URL for a video that can be streamed to the Android emulator using the VideoViewDemo code?

This video works with MediaPlayer, except on the Nexus One.

EDIT: Actually, that link works with the Nexus One as well.

The following page has several mp4 files can be used as test URIs for Android video streaming: people.sc.fsu.edu/~jburkardt/data/mp4/mp4.html

can you give me some url to play progressive download.In your link i am not able to find url

android - Using VideoView for streaming or progressive-download video ...

android videoview
Rectangle 27 0

I've been able to play smb:// shares over the network in a VideoView by:

I realise this seems convoluted (and I agree) but it's the only way I've managed to get it working (and working well, with seeking, etc.). I'd be interested if there are better solutions.

Hey thanks a lot, was having a look the JCIFS lib as well, let me try it out..

Hi, I have a same problem.... I've been smbfile in my project and get it inputstream, and I also inport NanoHttpd to build simple http server, but I dont know how to get "localhost/myvideo, Can you teach me or give me a simple code... Thanks a lot!!!

streaming - How to stream video across LAN in android VideoView - Stac...

android streaming smb
Rectangle 27 0

Your code seems good, I think the problem comes from the server side. I don't know how did you use your server. But try use your own server. Please setup an Apache web server to test your local video. The tutorial to set up Apache is here

If you don't want to use your own server, please use the online mp4 link here, this is the test file I was using.

The easiest way to test this link is using a web browser to open the link to check whether the file is accessible, just copy paste the URL to the browser.

Also you can test that link on your android side, if you already have the "adb". use the command:

adb shell am start -a android.intent.action.VIEW -d http://169.228.179.91/username/abc.mp4

video streaming - Play a mp4 file in android videoview - Stack Overflo...

android video-streaming videoview android-video-player
Rectangle 27 0

You could possibly read the stream yourself to a local file and point the VideoView to that. I'm not sure however how much you're allowed to store. Also, will the VideoView react well the fixed size of the file as it was pointed to. You could possibly create the file in correct size, but then you will have to make sure that video is not read beyond the point you have cached.

I think that this could be a little bit expensive method... I though that the videoview could have the features that I need but I am not aware of... Thank you for your answer anyway. I will take a look on the VideoView's source code and see if I can do something...

Cata did u find a solution for this buffering size increase problem? I am facing a similar issue...

streaming - android VideoView increase buffering - Stack Overflow

android streaming video-streaming videoview
Rectangle 27 0

add the Internet permission to the manifest file

<uses-permission android:name="android.permission.INTERNET" />
rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov

http://www.wowza.com/_h264/BigBuckBunny_175k.mov

android - Unable to play YouTube video in VideoView using RTSP streami...

android streaming rtsp videoview
Rectangle 27 0

Playing of mov files is not supported on the android. mov is an apple format, and there is not a default video codec in android to play them. Reference

Thank you. I guess that is my issue. Will convert the stream to the formats on the documentation. :)

java - VideoView Streaming: Audio works but video is black - Stack Ove...

java android videoview
Rectangle 27 0

Use MJPEG stream, instead of RTSP. After lots of research, Ive found an MJPEG viewer class that plays live stream near in real time (depending on your network connection).

video streaming - Android VideoView RTSP delay - Stack Overflow

android video-streaming rtsp videoview rtmp
Rectangle 27 0

I didn't found a answer, but i can say that it is a htc problem. I tested it on S3 and it worked like a charm, so the problem must bee with a htc.

Im having this with Samsung and Emulators

video streaming - android videoView java.io.filenotfoundexception no c...

android video-streaming videoview rtsp
Rectangle 27 0

We had this and discovered that it was a firewall issue. Seems like UDP is being blocked. Saw somebody else on another post who said that it worked for them with a mobile data connection, but not wifi. Probably the same issue there - wifi firewall settings.

android - Unable to play YouTube video in VideoView using RTSP streami...

android streaming rtsp videoview
Rectangle 27 0

VideoView can only Stream 3gp videos but i recommend this code to stream your video

public void onCreate(Bundle savedInstanceState){
setContentView(R.layout.main);
String videourl = "http://something.com/blah.mp4";
Uri uri = Uri.parse(videourl);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.setDataAndType(uri, "video/mp4");
startActivity(intent);
}

android - Using VideoView for streaming or progressive-download video ...

android videoview
Rectangle 27 0

The player measures the time it takes to get each segment, if it took too long it will try to pick a bandwidth where it can get a segment or more before it plays it. And the most common error is buffering delays. You should look in the log file to see what the player is doing when playing content.

If the above is not helpful, this might help.

can you show me a code to process it?

t. Bit try this url and see if it

If you would like to follow HLS standards, the content type of the media should be in the format of m3u8. m3u8 is supported by Android 3.1 and above.

of cources, my format url is .m3u8. You right! Lag is buffering delays. But with mobiles have high performance. Videos isn't lag. So. You know a reason why?

I find that HLS performance varies wildly across different Android devices and versions. Try Vitamio library, it allow you to use HLS feeds. Have not tried it myself

java - Using Videoview or mediaplayer to play http live streaming vide...

java android videoview
Rectangle 27 0

VideoView is essentially a View that is tied to a MediaPlayer to make it a lot easier to implement videos in your app. If you aren't doing much custom work, VideoView is the way to go.

That said, you can also pass the RTSP link off to the system to use the most appropriate app for playing the video, which is even easier to do:

String url = "rtsp://yourrtsplink.com/blah";
Uri uri = Uri.parse(url);
startActivity(new Intent(Intent.ACTION_VIEW, uri));

Video should be tested on a device, since emulator playback is poor, and you should also be aware that RTSP requires an extra port to be open, which is blocked by some firewalls.

streaming - What are the difference between MediaPlayer and VideoView ...

android streaming android-mediaplayer videoview
Rectangle 27 0

html5 is default, so that means no rtmp. HTML5 video is inferior to flash video in many ways.

Play RTMP video streaming on android videoview - Stack Overflow

android
Rectangle 27 0

VideoView can only Stream 3gp videos but i recommend this code to stream your video

public void onCreate(Bundle savedInstanceState){
setContentView(R.layout.main);
String videourl = "http://something.com/blah.mp4";
Uri uri = Uri.parse(videourl);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.setDataAndType(uri, "video/mp4");
startActivity(intent);
}

android - Using VideoView for streaming or progressive-download video ...

android videoview