Migrate videos from Vimeo to S3 - amazon-s3

I have a large quantity of videos on my Vimeo account that I would like to migrate to my AWS S3 account.
Rather than go through the time consuming process of downloading from Vimeo to my local machine then uploading from my local machine to S3, is there a way where I can do a direct transfer from Vimeo to S3?
If possible, I would want to create a script to iterate through each video via Vimeo API and set up the path to where it would go into S3 then initiate a direct transfer. Any ideas or suggestions would be much appreciated!

If you have a PRO account or higher, you can use the API to get download links for videos on your account, including download links for the original source file. Those download file links should be able to be used for importing into S3. Note that the links provided via the Vimeo API are expiring HTTP 302 redirects to the video file resource, so make sure you take note of the expiration time also provided in the response.
Download links are returned with the rest of a video's metadata, so I suggest using the fields parameter to only return the metadata needed.
http://developer.vimeo.com/api/common-formats#json-filter
https://developer.vimeo.com/api/reference/videos#GET/users/{user_id}/videos

Related

Most efficient way to send image to frontend

I have images stored in Google Cloud Storage. Whenever my frontend (Swift) requests a certain image I would like to send the image as quickly and efficiently as possible from my backend.
Conveniently, Google Cloud Storage has direct image links for every image.
Is it most efficient to send a multipart/form-data the same way I send an image captured by a user in the front end to the backend? Or is it more efficient to send the URL of the image stored in the cloud where the frontend can proceed to download the image from that URL?
This can indeed be done through a signed URL which provides limited permission and time to make a request. With signed URLs authentication information is contained in their query string, allowing users without credentials to perform specific actions on a resource.
I would like to point out however that Signed URLs can only be used to access resources in Cloud Storage through XML API endpoints.
Since you are using Swift for your frontend I would also like to direct you to explore Google APIs for iOS, such as CocoaPods.

How to upload videos on Youtube using AWS S3 as Video Source

I have a VIDEO CMS hosted over AWS EC2 where user can upload videos and later share on Facebook and Youtube. I push videos to S3 after uploading and delete it from EC2.
Now I want to use S3 to share videos to both social networks. However FB provides a way to upload videos directly from S3 but Youtubes need video to be physically present on server.
I have not found any solution yet.
Thanks in advance for your help.
If it is not compulsory your video should be shared on youtube from amazon S3, you can directly upload your video to youtube by using youtube api, either javascript or other backend you are using. It will be much easier way. S3 doesnot provide any way to upload your video on youtube.
Also you will have to manually check for new videos added to s3 and need to manually upload to youtube.
You will have to upload video on youtbe just after user/ you uploads on EC2. It will be dynamic.
You can get Youtube vidoe insert api resource from here
https://developers.google.com/youtube/v3/docs/videos/insert

Storing a remote hosted image on S3 directly using java sdk

I know I can download the image on server and then upload again to S3 or any other cloud hosting service, but is there any way to store the image asset directly on s3 by supplying URL of asset instead of a file, because I don't want to add unwanted download and upload on my server.
Note: I am assured that the URI will be 99.9% up and image file will also be there. And I am OK to use services other than S3 if they have such a feature.
No. There is no API call for Amazon S3 that will retrieve content from another location.
You must supply the content as part of the API call.

Soundcloud API Download

I am asking this here because Soundcloud does not have support. I going to build a website that people can purchase audio files from using Soundcloud to download the files (and stream before buy). I want to be able to access the download file link in the Soundcloud API without the download link being enabled and showing on the Soundcloud UI. I can't seem to find this info in the Soundcloud API docs. I am going to have a Paypal redirect after the payment to the download link. I know this is a weird way of doing this but I have certain criteria I have to meet. I would host the audio files on my server but they are huge. Anyone have experience with this or can help?
im not sure its possible to do what you want. (very easily at least)
there would be no way for the purchaser to access the 'download' track on soundcloud directly unless downloads are specifically enabled for that track.
really the only way to not host the files and still be able to provide the download would be to use the api to download or proxy the track from soundcloud to your server, using your credentials (because you always have access to your own tracks, download or stream). mind you this would use 2x the bandwidth usage (the server getting the track from soundcloud, and the client downloading the track), and storage space would only be impacked on a temporary bases. but. this is a pretty hacky way and not really a good/proper solution.
you can:
-compress/re-encode the audio as to not use as much disk space
-pay for more storage space at your web host, its usually pretty cheap thse days.
So you want to charge on something free? Well, I think all the downloader out there are middleware where they stream the track from soundcloud and response to client as attachment upon request, one of many examples is http://wittysound.com. Cheapest way to get thing done is providing direct link to soundcloud server like what http://soundflush.com does

Amazon S3: how to use/load an mp3 file simultaneously

I'm using Amazon S3 to store some mp3 files.
My web application, uses the Soundmanager2 javascript library to load the files from the Amazon bucket, and play them to users.
When the first user clicks on an mp3, soundmanager starts playing the file, and as intended, caches the rest of the song as it is being played.
Problem is, if a second user clicks on the same mp3, he must wait until the first user caches the whole song, which is unacceptable for my website.
I understand that Amazon S3 somehow 'streams' the file exclusively to the first request. Is there a way to be able to use that file simultaneously, i.e. users be able to play the same mp3's at the same time?
Also, would the CloudFront functionality solve this issue?
Thank you for your help!
Alex
(By the way, my application is built on Ruby on Rails 3, and hosted on Heroku)
There is no limitation in S3 that restricts simultaneous downloads of a single object.
I would suggest that you use a tool, like Charles, to inspect the HTTP requests and see if another service is causing the second client's request to be delayed.