Play Vimeo video in Android VideoView - 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

Related

load movie trailer in android application from imdb

Is it somehow possible, you can load the movie trailers from imdb to videoView or the native android player.
so far, what i've tried.
Iframe approach which let me load trailer in webview, which is exactly i don't want.
Here i found a link which is something a direct link to stream.
I want this to play in video view or native android control.
thanks in advance.
The link you have above is not a direct link to the video - it is actually a link to a web page which contains an embedded player, which in turn has a link to the actual trailer video itself.
You can see the link the to the video if you use the network timeline tab in a browser inspector to look at the network requests. For your example above the client (the browser running the HTML5 page you have downloaded) is requesting the video m3u8 file with the following request:
http://imdb-video.media-imdb.com/vi1225109529/1421100405014-mxwp62-1434643350557.m3u8
This is the 'index' file for a HLS format video file - it tells the client where to request the video streams. The client then downloads the video chunk by chunk which you can see as requests for TS segments - e.g. for you example above:
http://imdb-video.media-imdb.com/vi1225109529/1421100405014-mxwp62-143464335055700002.ts
If the IMDB site does not protect or restrict the video in some way (for example only allowing it play from their embedded web page) then in theory Android should be able to play a HLS file if you point the Media Player towards the m3u8 file. In practice however Android has well know issues with HLS playback so you may find it problematic - see this summary: http://www.jwplayer.com/blog/the-pain-of-live-streaming-on-android/

Download video from vimeo with out URL is geting?

I need to Download Vimeo viodes in my app having no video id. How can I get vimeo video url? Or is there any other way to download video in android?
Download capability is only provided to PRO members requesting their own videos, from their own API app.
If this is what you are looking for, you should be able to see download links on every video in https://api.vimeo.com/me/videos

Video link of unlisted youtube video

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");

Youtube video in VideoView

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

video streaming and displaying simultaneously in android

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/

Categories

Resources