How do I retrieve the image component of an iOS live photo from the Google Drive API? - google-drive-api

We fetch a lot of media from Google's Drive API on behalf of our users. We care about photos and videos and we determine which is which via the mime type. The files endpoint is what we use to do this:
https://developers.google.com/drive/v2/reference/files
However, since about mid-2016 Google Photos began backing up iOS live photos, which have a still image component and a video component. My questions is, how do I programmatically determine which is which and once I've detected a live photo, how do I access just the image component?
In practice what I've found is that live photos return as video/mp4 with a file extension of .JPG. However, the only image I have access to is a thumbnail.

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.

Vimeo privacy settings affects/inhibits download functionality when embedded on a website

Vimeo states: "Hide this video from Vimeo" will make the video unable to be accessed on the Vimeo website (unless you are logged in as yourself), but it still can be embedded on other websites. Your video can be added to albums and portfolios, but no other types of collections."
In the Vimeo settings, with 'Hide from Vimeo' selected, there is also a checkbox titled 'What can people do with your videos?' I have 'Download them' selected.
So, as far as I am aware, the Vimeo videos should be able to be embedded on my client's website, 'hidden on Vimeo' yet still 'downloadable' from my client's website.
This is not the case. We can not download from the client's website unless the Vimeo settings are set to 'Public,'
Vimeo actually inhibits the download functionality when privacy settings "Who can watch your videos?" are set to anything other than "Anyone." So you have to have public videos on Vimeo which defeats the object of paying for PRO.
The scenario: My client has sensitive videos which they use Vimeo to host (privately). These videos are streamed to private client pages on the Wordpress website using a bespoke plugin. Only the people with access to the private client area on the website should have access to these videos and they must be private everywhere else on the web. BUT, they must be downloadable from the client area.
Please help! We have spent two months developing a bespoke WordPress plugin and now this error is occurring.
We are using Vimeo PRO.
Thank you!
The "download" option in the video's settings refer to the Download button that appears on the video page at vimeo.com/[video_id]. That download setting has no bearing on its ability to be downloaded using the download link; the download link should work anywhere its served, provided that the link has not expired.
See the "Download videos" Help Center article here: https://vimeo.zendesk.com/hc/en-us/articles/229678128-Downloading-videos
There are only two supported methods to serve a download link on your website:
Use the Vimeo API to retrieve the download link from Vimeo:
https://stackoverflow.com/a/54009156/3704546
Get the download links from the video's distribution settings page:
https://help.vimeo.com/hc/en-us/articles/224823567-Third-party-player-links
These are the only supported methods to get download links; if you're using another method to get download links, the links may expire or break at any time.

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.

How to access the preview video of a movie file with Google Drive SDK?

On the Google Drive app for iOS, when I open a video file, I immediately preview the file through a low quality version of it. It's not the original file.
So do you know how to get the url of this preview video?
Thanks a lot
Use the embedLink field of the file. It contains a link to a player that streams the video (YouTube, pretty much), suitable for a mobile app.