I'm trying to play a video from the Internet in my app, but the video with a definition higher than 360p returned an .flv url. I have no idea to play it. Can someone suggest me some ways or a library?
PS: I need to set some headers to get the stream
Related
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.
I am recodring video via UIImagePickerController. Then I upload my video to PHP server. But Android is not able to play video after downloading it from server.
UIImagePickerController returns video in .MOV format. I save this video in .mp4 format (just by changing file extension according to Second answer in this question) . To play it in android.
In iOS i am able to play video after downloading it from server but not in android. I think this is codec issue. Android does not support all iOS video codec. Someone please help :)
What should I do so that Video is compatible on iOS and android both.
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.
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.
I have a project with a VideoView in it I am streaming a video from online using this method:
mVideoView.setVideoURI(Uri.parse("http://db.tt/ij7w1Nw"));
My videos are mp4 files downloaded from Youtube. I then upload them to my dropbox, that is where the url comes from. This works fine if I download the video and do not make any changes to it, and upload it straight to dropbox. However if I try to make any changes to it for instance convert from .flv to .mp4, or change the size, then I upload it to dropbox it no longer plays in the VideoView. I get a dialog that says 'Unable to play video. Invalid streaming data'. If I take this same exact video and put it on the SD card either manually or even by having my app download it from the url then play it off of the SD card using
mVideoView.setVideoPath(path);
it works fine. I am using Wondershare Video Converter Platinum to do the conversions and size changes.
Is there some sort of specific encoding that is required to stream an mp4 file rather than play it from a local copy? Am I getting this because of some sort of bug/error with wondershare? Has anyone else experienced this type of problem, if so how did you end up fixing it.
Thank you.
The media format guide may help you see what's available. In my experience wrapping a H.264 AVC or MPEG 4-encoded video in a 3GPP container provides the easiest integration. Android is very fickle with both audio and video streaming.