How I play my rtsp videos on android webview? - android

I mean I have a link like this: http://15....../a.stream
I write this code to see the video on android :
VideoView wv = (VideoView)findViewById(R.id.videoView1);
wv.setVideoURI(Uri.parse("rtsp://15........./a.stream"));
MediaController controller = new MediaController(izle.this);
wv.setMediaController(controller);
wv.start();
This code works first.But one day the same code say :
Cannot play video
Sorry,this video cannot played.
My first question is why that alert me like that?
second question is maybe i play video in another way maybe it is work.Like if I play video in webview maybe it is work? How I play the rtsp video stream on webview?
Thanks...

You can't play rtsp in webview. Only Flash(rtmp) stream play in browser with flash player.If streams is rtsp, then browser will open it in the external video player.
HTTPS progressive streams are only supported under 3.0+.

WebView plays rtmp as well as rtsp if your device has somehow flash working on it. It won't play without that so API version is important because flash player used to work on earlier APIs.
The best way to stream live in Android is to use Vitamio. It's the best solution out there. It can play numerous stream formats including rtmp and rtsp.

Related

Any ideas on how can i stream m3u8 video in android

I am working on Android TV app and have to stream some videos. I am facing problem in playing m3u8 videos in videoview. Videoview is not working fine in all the devices. So I tried GoogleExo player and Vitamio - it seems like both does not suppport m3u8 videos.
Does anyone know how to play m3u8 videos on android?
By m3u8 if you mean HLS videos, Google's ExoPlayer supports that. Also if you don't want to use ExoPlayer, android mediaplayer api has limited support for HLS stream from android 4.0.
I would suggest if you can spend some money on purchasing some thirdparty players, they'll give the best playabck experience and features. Refer the following players
NexStreaming
Akamai
Brightcove
JW Player - Its built on top of exoplayer

How can I play each type of video in a view in android

I am working on an android application and my application is having a functionality to upload multiple type of videos in app. The videos can be from any sources like Youtube, Vimeo or can be uploaded from device. So, I want to play each type of videos in my application whether they are uploaded from any type of resources.
If I use VideoView, it supports only some of the extensions and it can't play youtube and viemo uploaded videos as well. I have to use Webview to play youtube and vimeo videos.
Is there any view which can play all type of videos or can someone help me in creating a video player view which can play each type of video.
I don't have much idea about videoview, please help me if anyone know about this so that I can create a view which can play all type if video formats.
Thanks a lot in advanced.
There seems no universal video player for all video sources/types.
The Android built-in VideoView can play rtsp and HLS streams, take a look at Android: How to play RTSP or HLS video streams
To play rtmp video streams in Android, you can use a number of libraries such as Vitamio: refer to Android: How to play RTMP video streams
The VideoView used to be able to play youtube videos, but now you cannot. You need to use YouTube Android Player API now. Refer to Android development: Play Youtube video in your app, “Can’t play this video” and troubleshooting instead.

Can not play rtsp stream from Youtube

i'm trying since a few days to play Youtube rtsp streams in my Android app,
but only get Errors from Android MediaPlayer instance - unable to open file.
I've tried to open 3gp files, it can play. Tried to open other rtsp streams found
around the internet - all can play, but Youtube dont.
Tested the video urls in Windows VLC player - the player cant play a YOutube video
streamed with rtsp protocol.
Is there something wrong with YT rtsp streams so no player can play that Urls?
Thanks for a small hint what can i try to do ;)

How to stream videos from any url in android application?

I want to use media player to play videos from any url. I found that, youtube video can be played using rtsp url, but no other videos, like vimeo video, can be played in app. Is there any method to do it?
Unfortunately Vimeo doesn't provide support for RTSP, you could use flash to this end since Android support flash, and can be easily add with a WebView and simple HTML
Also, please keep in mind that playing Vimeo videos through a non-Vimeo player usually constitutes a violation of their TOS.

Android: Live Stream Video URL Player

We are trying to develop an app for Android where you can play a live streaming URL. I tried several approaches using the MediaPlayer and StreamPlayer... but no luck with the URL playing.
I can of cause play a static MP4 or MP3 file using the URL (hosted on a server) but when I try to play a stream URL it doesn't play or give an error.
Any thoughts?
Mp3 stream works well on Mediaplayer from Android 2.2 and above. If you want to play the Content below 2.2 then its better to use local proxy server implementation. check Npr . Which uses the same approach.
If you want to play wma audio you should convert that into PCM and play it. check aacplayer. In aacplayer project he gets wma content from mms:// stream and plays it . You can edit that to play only wma content. But i haven't tried playing any wmv videos.

Categories

Resources