I want to play a remote video in a Videoview. Anybody knows a good free server to load my videos in it to later stream in a videoview? Is possible to see in a videoview Youtube videos? I have see another questions but I donĀ“t understand. Anybody can put a example to play a Youtube video or remote video for another server in a videoview?
Thank you
You can check android-youtube-player, a project to make YouTube videos play in a VideoView. The usage instructions and sample Activity code is available.
You can definitely stream video directly into a VideoView without a problem, and you set it up normally as well:
Uri pathtoVideo = Uri.parse(path);
videoView.setVideoURI(pathToVideo);
However, there are a lot of videos on Youtube that aren't mobile-friendly, and will end up throwing a "This Video Cannot Be Played" error.
The MediaPlayer on Android can only play "progressive streamable contents" which basically means: 1. the movie atom has to precede all the media data atoms. 2. The clip has to be reasonably interleaved. If it doesn't, you'll get the error I mentioned above.
Have you considered the YouTube API for android? I recently posted a tutorial on how to use the video and thumbnail views from the API here
Related
I recently created a file chooser. I got it from http://www.dreamincode.net/forums/topic/190013-creating-simple-file-chooser/ and it only shows a text saying "File Chosen - 'filename'".
I wanted it to be played in VideoView.
I tried to google but I couldn't find it.
Can you guys help me out? Thank you so much.
I think your question is already exist at there :
How to play videos from SD Card
You should pass the URI of the video that's in the SD-Card to the VideoView control.
Couple of helpful links :
http://mrbool.com/how-to-play-video-formats-in-android-using-videoview/28299
How to play a video from url using videoview smoothly?
How to play .mp4 video in videoview in android?
Video playing using Video View in android
I am working on an Android application. In my app I have to play videos in VideoView. The videos from the Vimeo is not working. Whenever I tried to load Vimeo video I am getting the error message:
"sorry, this video cannot be played".
I saw some of the similar discussions in StackOverflow. So I tried Vittamio demo. There also Vimeo videos are not playing.
In the case of youtube url we have to convert to RTSP. for example
http://www.youtube.com/watch?v=Jx3pdWBlZ34
will convert to
rtsp://v4.cache8.c.youtube.com/CiILENy73wIaGQl-Z2VgdekdJxMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp
I gave sample url is like this.
private String path = "http://player.vimeo.com/video/49462103 ";
and
private String path = "http://vimeo.com/49462103";
Is this the right way to enter Vimeo url in Android
Please help me to fix my issues friends.
Vimeo provides PRO members access to their own source files via the new API3.
They are available on every video response, under the files key. You can get video responses by requesting a specific video (single video: /videos/{video_id}) or by requesting a collection of videos (your videos: /me/videos).
You can learn more about the api here: https://developer.vimeo.com/api/start
I am developing an android application that streams and shows a couple of videos. Instead of storing videos on my server, I thought uploading them to youtube as unlisted, and getting them from youtube is a great idea. After getting the video, I want to show them in default android video player, not in youtube app or web view.
I don't have any problem when I put videos in my server (for example www.mysite.com/video.mp4), but is there any way to get the url of a youtube video?
You can upload the videos using the YouTube Data API v3:
https://developers.google.com/youtube/v3/docs/videos/insert
And setting the status.privacyStatus as unlisted
Then you can use the YouTube Android Player API to include the Video Player on your own Android App
https://developers.google.com/youtube/android/player/
To play a video, you only need the video ID, not the full url..
eg:
player.loadVideo("wKJ9KzGQq0w");
Now this is a really stupid one! Forgive me on this question please but I really don't know the answer to it. My question is What have Youtube used to play videos intheir Android app? I mean is it a WebView or Just a simple VideoView? I used VideoView to play videos from the URL associated with them but it doesn't look as nice as YouTube's VideoView (or whatever it is)
And is there any other option to play videos from a URL other than using the code below? Because it just plays video in the native video player. If the red-marked portion in the image below is a VideoView, how does it look better than the normal VideoView? Or is it a WebView? Which one is a better option (in terms of UI) to play video from a URL? I'm using GingerBread and want to play mp4 or .flv videos in a VideoView or WebView (whichever is the better option, preferably like Android's YouTube app)
Uri data = Uri.parse(movieurl);
intent.setDataAndType(data,"video/3gpp");
startActivity(intent);
Please provide some url related to some documentation about video streaming in android. I got many document on this site but all are getting total content of video from url and then playing the video but i want to stream and play video simultaneously so that i can play without consuming a lot of time. thank you
There are two techniques:
Using MediaPlayer: If you are using streaming server to fetch video then just provide your URL in MediaPlayer source. MediaPlayer will manage everything.
Manually: If you are not using streaming server for video then you need to download and play video. Use following link as example. In following link author explain audio streaming. You can use same technique for video.
http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/