Is it possible to get streaming url with Vimeo API? - vimeo

I have my own video player with in my app and want to play in it if I can get a video url. Is it possible with Vimeo API?
In my app I will allow users to search for videos and play it on my media player on mobile.

API requests authenticated as a PRO user will have access to that users video files. This includes the transcoded files and an HLS link. You can find these urls in the video representation, returned by many different api calls. Specifically under the files key, you will find an array containing the url and additional metadata. Make sure to pick your video based on the resolution, and not the quality, because the quality can have duplicate
The most relevant api call is GET https://api.vimeo.com/me/videos, because this will return a list of all videos owned by the authenticated user (which happen to be the only videos with available video files).
Video files are not available for basic or Plus users, and are not available for users beyond the one making the request. For those videos you should use the embed codes we provide in the API request (under the key response.embed.html, or through oEmbed.

If your videos are set to public you can hit the endpoint...
https://player.vimeo.com/video/{your_video_id}/config.
This will return a json. In the nested field request > files > progressive, you will have objects that contains streaming urls.
There is also dash and hls streaming formats under the files node, but not sure if all players will support those formats.

Related

Streaming video in HTML5/JS

I currently have an IPTV subscription and as a fun little side project I decided to create a multiplatform IPTV app. However, I'm running into some trouble when trying to stream video.
The .m3u playlist I am currently using has streaming links, however they do not end in .m3u8 as I am usually accustom to.
When I do a get request to the link in insomnia, it begins to download content with a MIME type of video/mp2t.
I have tried using hls.js along with a few other html video players however I cannot seem to get it to work.
The playlist does work with VLC!
I feel like I am missing something, just not sure what.
Thanks!!
If your IPTV service has content that the service provider wants to restrict then they may encrypt the content, use DRM and/or obfuscate the access to the manifest files and segments streams.
The reason they do this is to ensure that only their apps can be used to playback the content - this does not always have to be just for paid services as the content owner may require the content to be encrypted even for free IPTV services.
You can still do your experiment and build your multiscreen project using test streams which are available online - there are both DASH and HLS online streams available in a number of places. see here for a useful list:
https://bitmovin.com/mpeg-dash-hls-examples-sample-streams/

What is the right way of consulting vimeo CDN for custom player?

using the api against /videos/ID I get a bunch of links, select the corret format and them i'm good to play on my own website.
But it's slow, i'm not on USA and it's slow for my customers.
(I'm a vimeo PRO subscriber)
Recently, checking a similar website, I've noticed that their urls are generates like
https://13-lvl3-pdl.vimeocdn.com/01/1924/4/....
And mine are generated like
https://fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/01/4067/6/...
The first one, that i could not discover how to get on my own videos, is really faster and lower latency.
Any light on this would be very appreciated.
These urls are dynamically generated on the server. There is no programatic way that you can change which CDN url you receive.
Please reach out to vimeo.com so they can dig more into why it performs so slowly for you.
After upload and process video by vimeo it generates HD,SD and HLS links.
Sometime speed depends on many factors like hosting environment, player used for stream videos,Internet bandwidth etc etc.
So first check following things:
1) Are you using third party player for stream your videos?
2) Are you using HLS video link for stream video?
3) What is your hosting environment in terms of server response time?
Some Suggestion to achieve better video streamming:
1) Get best Hosting plan which has better server response time.
2) Use vimeo default player for stream videos.
3) If you are using third party player than use HLS vimeo generated link with Third party HLS player.
Some HLS player links
http://www.hlsplayer.net/
http://osmfhls.kutu.ru/
http://www.flashls.org/latest/examples/chromeless/
http://dailymotion.github.io/hls.js/demo/
http://www.dash-player.com/demo/hls/
You can absolutely select which CDN you can load your videos from. Vimeo uses three CDNs and you can set a cookie that will indicate to the player which cdn to use. Check out this link: https://player.vimeo.com/flags
Here you can select the cdn and it sets the cookie I was mentioning. You can set this cookie for your users on your website and the video will be fetched from that cdn.

How to access low definition videos of my own through Vimeo API?

I would like to access my own videos through Vimeo API and to download low and high definition versions that Vimeo encoded.
I have a Premium account on Vimeo.
I didn't find it in their doc :(
Is there a way? I would like to avoid encoding videos myself in different sizes...
Thanks!
First off, you'll need to be a Vimeo PRO member to get the direct video file URLs.
Using the latest API, do an authenticated GET https://api.vimeo.com/videos/[clip_id]. In the response you'll see an attribute named files that contain the HD, SD, and mobile transcodes that Vimeo generates. These URLs are meant for use with other video players (JWPlayer, or simply with the <video> tag, for example).
If you want to get the URLs to use for downloading (providing a download link on your site, for example) do the same authenticated GET https://api.vimeo.com/videos/[clip_id] to find the download attribute in the response. These URLs expire, and with them you'll see an expires attribute with the date and time.
Note that to get the download URLs, not only must you be authenticated as the clip owner, the API app itself must also be created by the clip owner.

getting videos in google drive (and Microsoft onedrive) to show in a video tag?

I have a website that has a web page with a html5 video-tag, and the user can supply a URL, and it will play in the video-tag.
The webpage uses JavaScript commands that control the video-tag - for instance, it can pause the video, move to a different point in the video, etc.
It works fine with the cloud. Videos stored on Microsoft Azure can be used, for instance (Azure gives you a way to get a URL to any video on your cloud storage, and streams it too).
However, I have users that store videos on Google-drive, and also on Microsoft One-Drive.
From what I can see, I can play these videos, but only in a page (probably with Google's own player in it) on their site.
It seems that there is no way to get a URL to these videos that I can put in a video tag.
Without the ability to do that, I can't use the javascript commands that work with the html5 video-tag.
Is there any workaround?
Or am I missing something?
Thanks.
For playing videos that are stored in google-drive using your app:
you need oauth2 credentials to access the user's drive, but assuming you have the oauth part covered :
you can create a drive application as a google appengine app and deploy it in a part of your website.
enable the drive-sdk and set the open-url to your website (that you have verified)
-> basically this tells drive to redirect towards your website whenever the user clicks on the video (from his drive)
when drive redirects to your website a json file will be sent, you'll have informations such as fileId from there i think you can execute the method files().get() to retrieve the necessary information for you to play the video
I advise you to take a look at this course in codeschool.

Download Video using Vimeo API

Is it allowed to use the vimeo API to search and download videos from vimeo?
Can you download all type of videos or only a particular category?
If I would like to download all video, do I need a special approval from them (or special account) to be able to do so?
Edit: I would like to know if it's possibile using the current API
Downloading source files through the API is only available under three conditions.
You are the owner of the video
You have a PRO account
You are the owner of the API App.