We're currently looking at using Vimeo Pro to upload videos for a website we're developing. What we want to do is, once a video is uploaded, record the data to an SQL database so we can embed the video to specific pages using database calls rather then hard coding.
So what I need to know is, can Vimeo return the code I need so I can record it?
To embed a video you need to generate an embed code through Vimeo's oEmbed endpoint.
The oEmbed endpoint works off of the on site Vimeo URL, which is provided in the "link" field on any video response (such as GET /videos/{video_id})
I would recommend storing the Vimeo URL, not the embed code, since the embed codes might change and improve over time.
Related
I'm trying to upload videos to my Vimeo account via their API using the TUS approach.
I've managed to get the first step working fine, using POST https://api.vimeo.com/me/videos to create the video placeholder in Vimeo, and getting a response which includes the video upload.upload_link
The second step requires the binary data of the video to be patched to the upload link returned in step one using PATCH{upload.upload_link} along with some specific headers, which is fine, but what I'm struggling to work out is where and how exactly to include the binary data, as it doesn't really say in the Vimeo API documentation.
Do I just put the binary data in the Body, on it's own? Or do I need to insert it between some code in the body? Or do I set a parameter and add it as a key value, and if so what is the key?
Also, I'm assuming it should be a binary string and not base64, is that correct?
Any help or guidance on this would be much appreciated.
You put the binary data directly in the request body. Vimeo API uploading uses the tus upload protocol. There is more information about the PATCH request at https://tus.io/protocols/resumable-upload.html#patch
I want to create an application capable to play YouTube video's audios and also save the downloaded content in a local cache, therefore when the user decides to resume or play the video again, then it doesn't have to download part of video again but only download the remaining part (User can decide what to do with the cache then, and how to organize it).
It is also very convenient for mobiles (it is my main focus) but I'd like to create a desktop one too for experimental purposes.
So, my question itself is, does YouTube provide any API for this? I mean, in order to cache the download content I need that my application download the content and not any embed player (also remember that it is a native application). I have a third-party application in my Android system that plays YouTube videos, so I think it's possible unless that the developers use some sort of hack, again this is what I don't know.
Don't confuse with the web gdata info API and the embed API, this is not what I want, what I want is to handle the video transfer.
As far as I know, there is no official API for that. However, you could use libquvi to look up the URLs of the real video data, or you could have a look at how they do it and reimplement it yourself (see here).
very new to uploading videos to Vimeo and trying to figure out if it is the right avenue. I have a customer that is looking to upload about 1000 videos in HD quality after a specific event.
The would like to be able to just FTP the videos to me and then on my end I need to create a script/program/whatever to get the videos to Vimeo and provide tags, album designation, descriptions, etc. And they want to be able to specify the thumbnail from the video.
My questions:
Is this possible? It appears through the API that everything except specifying the thumbnail from the video is possible unless I am missing something.
Is there a better way? Are there 3rd party apps that already do this that work well so I don't have to re-invent the wheel?
Thanks!
As you mentioned, everything except for specifying the thumbnail is currently available. In the near future (no time frame) Vimeo will support this through the new API (https://developer.vimeo.com/api).
I'm not aware of any third party code that already offers this functionality.
I am currently creating a youtube downloader and I have the code to retrieve video thumbnails, however I want to find out a way to retrieve the video title and possibly the video size etc. If anyone can help please answer :D
I would concider you use version 3 of the Youtube API. I don't suggest parsing the html of a youtube page, you never know when they will change the format and you'll be downloading too much information. The API is much more stable.
If you look at the video section .
https://www.googleapis.com/youtube/v3/videos?id=BaW_jenozKc&part=snippet
(I can't test it on this computer)
By changing the part (or adding multiple part) you can get all the information you need about a video. Since the result is returned in json, you can use it with pretty much any programming language.
Also, read the Gettting Started. Youtube limits the number of query unless you register your application and get a developper key.
You need to read the .NET YouTube API documentation, specifically the YouTube API v2.0 – Retrieving Data for a Single Video section.
You will need to query for a single video by the video's ID and then the pieces of data in the ATOM feed that comes back to you are:
feed/entry/Title for the title of the video
feed/entry/media:group/yt:duration for the length of the video
There does not appear to be a value returned for the size of the video, however.
Try the youtube API:-
https://www.youtube.com/get_video_info?video_id=BaW_jenozKc
It should return something along the lines of:-
"&title=youtube-dl+test+video+%22%27%2F%5C%C3%A4%E2%86%AD%F0%9D%95%90".
Credits to youtube-dl:-
https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py
Im making a website with user-generated content (pictures/videos) and I want to host videos that users upload to youtube on my channel, is there any way I can do this via youtube api?
What are the best practices for such thing?
Thanks!
The best practice is not to allow uploads directly to your channel, but rather to upload them to an intermediary server where you have a tool that allows you to check the content for abuse before it programmatically uploads the video. This prevents abuse and keeps you using reasonable quota caps.
Another good idea is to allow users to upload to their own channels and, via your app, to use the playlist API to automatically add their videos to your playlist.