Is there any callback option for being notifieid if the video uploaded successfully? - vimeo

I'm uploading videos to vimeo using tus, when video is uploaded it's not ready to embed and displayed, so is there any callback mechanism that vimeo provide to know when the video is reday to embed and displayed ?

As per the Vimeo's official developer
documentation,
If the value of Upload-Offset is the same as the size of the video
file, we received the entire file. Consider this video uploaded.
This is how you check if the file is completely uploaded or not. You can also verify it by comparing Upload-Length and Upload-Offset and if the values are same, entire file has been uploaded.
Also, as found on StackOverflow, no callback mechanism is present but you can get status of the video being uploaded and transcoded by making a filtered request.

Related

How to stream Large size videos from google drive in vlc

I've uploaded a large size video that is almost 2gb to my google drive. I'm streaming it in vlc media player. my format for upload is https://drive.google.com/uc?id=1wLllY5K1D6tdakUqHSQBqSQpFw4KclZ1
I'm getting through shareable link. This is small size video and it's streaming but When I upload a large size video it's not able to play.
I've changed the folder permissions to public
Due to the file-size, Google cannot automatically scan for viruses.
Thanks to this, the link you are using will show a page like this:
Even if you then add the parameters from the url of the "Download Anyways" button, you would not be able to proceed since the parameters are validated against Google servers to verify that the authorization was indeed done by the user at the time of asking.
Drive is not meant for video streaming, there are other solutions for it, like Youtube.

Using google drive to stream video into html5 player

I tried to use google drive as a place to host videos, but whenever I try to use the video as a source, google never returns anything. (Not even a http response)
Example video player
<video>
<source
src="https://www.googleapis.com/drive/v3/files/<file_id>/?alt=media&key=<api_key>"
type="video/mp4"
/>
</video>
If I enter the url in the browser it successfully prompts me for permission to download.
Does anybody have any idea what to do?
// This works...
<video src="https://www.googleapis.com/drive/v3/files/fileID?alt=media&key=apiKey">
// But, even better if you have access to a worker or can otherwise output the file through a script (and modify resonse headers)
async function getFile(request) {
let response = await fetch('https://www.googleapis.com/drive/v3/files/fileID?alt=media&key=apiKey', request)
response = new Response(response.body, response)
response.headers.set('Accept-Ranges', 'bytes') // Allow seeking, not necessarily enabled by default
response.headers.set('Content-Disposition', 'inline') // Disable Google's attachment (download) behaviour, display directly in browser or stick into video src instead
return response
}
addEventListener('fetch', event => {
event.respondWith(getFile(event.request))
})
Short answer: Nope
Longer answer: Oh boy. I spent quite a long time trying to figure this one out myself! I'm working on a project called DriveStream, that aims to use purely JavaScript and Apps Script to make an organised video library of a Drive account.
The project itself works fine, but implementing video streaming did not go anywhere near as planned. I tried a few different methods. One similar to yours and the other involving getting the downloadUrl property of a file and parsing the html of the download prompt page to give me a direct link to the file. I can initiate a download of that file, and that can be seen in the network requests, but there is no way to get it to stream into a video container.
The reason that doesn't work is due to the limitations of AJAX. It can return the data from a video, but there seems to be no way to funnel that data into a video container.
In the end, I've had to compensate by having the 'Play' button of each video only link to the preview video.
https://drive.google.com/file/d/fileId/preview
It's not a bad workaround, as it can play up to 1080p encodes of anything you upload.
This should work:
<video>
<source src="https://drive.google.com/uc?export=download&id=file_ID" type='video/mp4'>
</video>
Replace "file_ID" in the link with your video ID. (to find it - right click on the Google Drive video, get shareable link. The file should be shared in order to access the file.)
It plays the source video. If you would like to change quality or to use unsupported codecs it's not easy to get google drive stream/converted files as said in previous answer. (Ajax will not let you get the link because of CORS and PHP is server side and the link contains an IP address so will not be accessible directly from client side.)
It's a long answer I will try to shorten it up..
Upload your file to the drive and using the share option make it public.
Then click on the preview option, and it will open a new tab.
Look for the vertical 3 dots (top right corner) leading to a sub-menu and select open in a new window.
As soon as you get to the new window click on the vertical 3 dots (top right corner) and this time you will see an 'Embed item' option click it.
You will get the iframe code now include it your webpage or website.
Just give it a try once!!!
I hope this helps thank you!!
I might be a bit late to answer, but if anyone's interested, I have written an answer on streaming videos from Google Drive before here. There are a few ways to go about this, but in summary, you will have to do some server-side programming (can be ASP.NET, PHP etc.) if you don't want to use Google Drive's embedded player. Alternatively, if you have large videos that you want to stream that exceed the limit of 100MB, have you looked into HLS (HTTP Live Streaming)? You can create .m3u8 playlists with segments of your video (preferably less than 100MB) and that way, you can stream your videos. I hope my answer helps!

How do I get all the preview thumbnail images of a Vimeo video

I want to show all the preview thumbnail images of a Vimeo on a pages. I'm the owner of a Vimeo Pro account but I don't see any options or an API call to get them. A file with the timestamps and an image url would be good enough.
I can't run a script to generate them myself so I was wondering if anyone found such an option?
If you are talking about the preview thumbnails that appear when you seek on a video, those are not currently available via the API.
I'll make a note though, and see if we can add them in the future.

Embed vimeo videos where token is required

I'd like to know whether there's a way to directly embed a vimeo video into a website or whether there's a way to get a stable link to the MP4 file.
E.g. this page: http://www.landfunker.de/ktv/detail.php?rubric=93&nr=86411. The video is only launched when accessing it from that page. In the source code, I see links like
fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/01/3026/7/190133161/631209312.mp4?token=587a20e2_0xece9d9d127813f2b792edb30032d4d9b0a7c484f
However, the tokens expire, right. Any tips? Any workarounds.thx
Use the Vimeo iframe embed code to embed videos on your site:
https://help.vimeo.com/hc/en-us/sections/203874347-Embedding-Videos
https://developer.vimeo.com/apis/oembed
To get the MP4 links for video files, you'll need to be a Vimeo PRO or Business member. Video file links are returned in the individual video's response from the API.
GET https://api.vimeo.com/videos/[video_id]
You can use the API's JSON fields filter to only return the video file links:
GET https://api.vimeo.com/videos/[video_id]?fields=files
Finally, note that you can only retrieve the video file links for videos on your own PRO or Business account. Vimeo does not provide a way to retrieve the video file links for videos on other user accounts.
API documentation can be found here: https://developer.vimeo.com/api/start
You can definitely embed a Vimeo video into a website - Vimeo provides instructions on their website:
To get your video's embed code, go to its video page and click the Share button. Then click the +Show options link that appears above the embed code field to reveal a preview of your embedded video with the Basic customization options. Once you've made your adjustments, you can copy the embed code and paste it wherever you'd like to embed your video.
They also provide an API based embed approach using oEmbed. There is a JavaSCript example using this here:
https://github.com/vimeo/vimeo-oembed-examples/blob/master/oembed/js-example.html
This basically calls the API with the URL of the video to embed and the response includes HTML which you append to your page.

Error #2038 when uploading videos to Facebook

Using this simple AIR app to upload images to my facebook account.
http://code.google.com/p/facebook-actionscript-api/downloads/list
Uploading images works fine using the MediaUpload_AIR example.
I modified by adding browse support for videos.
The videos seem to upload according to the progress event, but when they have finished uploading I get a error #2038 along with a http status code of 400.
Can't figure out what is happening. The video files are under 5MB in size.
Can anyone shed some light?
found the answer
When targeting the facebook graph API with videos you need to use 'me/videos' instead of 'me/photos'