Youtube API - Remove Duplicate Rejected as well as Original copy - youtube

Every now and then when I push a video through the Youtube API I do not get the success result back to my server with the appropriate video ID. (assuming some kind of random connectivity issue)
This creates an issue where my server assumes the video hasn't uploaded it so it attempts to upload it again. Which then creates a duplicate.
How would I find out and remove any duplicates as well as the 1st uploaded video so I can start the process again and upload a fresh copy?
Is there a way to tell youtube to delete the video if it can not return the ID successfully to my server?
Cheers

Related

Show video composition

I'm trying to show on my webpage a video from twilio that was recorded.
The REST call that I made from twilio (get composition) returns a binary file and I want to use it to show the video.
I can't use the url from twilio directly to the video src because it needs authentication and I do it on the back-end.
I can do it using the binary and encoding it to base64, the problem is that for large videos the webpage has a lazy load due to the download of the large file.
Also, I don't have the binary locally in my server, and therefore I'm getting the binary each time I need to see the video.
Can anyone help me to know how is the best way to show the video and to make it possible to be load by chunks with buffering? Because I can create a webpage that only downloads the binary and use it directly on the src of the video too, but with that I can't return x seconds back on the video or foward, I can only see it from the beggining to the end without missing anything.
Many thanks for the help :)
Twilio developer evangelist here.
I'd recommend that you download the video and store it yourself under a URL that you can set in a <video> element. That will save you downloading the video from Twilio each time and give you the control over the playback.

All data except for fileName disappears from fileDetails in a couple of days after uploading the video

I'm using YouTube Data API (v3) to access my own video info.
Everything worked fine, I could get fileDetails.fileSize, fileDetails.videoStreams[] etc. as I expected.
However, in a couple of days after I uploaded the video, the same API returns only fileDetails.fileName and no other info anymore.
Now returned json looks like this:
"fileDetails": {
"fileName": "test movie.mp4"
}
Here is my request URL:
https://www.googleapis.com/youtube/v3/videos?part=fileDetails&id=__my_video_id__
The video is owned by my account with which I did OAuth and got an access token.
I tried the URL on OAuth 2.0 Playground (https://developers.google.com/oauthplayground/), but I got the same result though once it returned all data when I tried it on the day I uploaded the video.
I wonder it might be related to the video visibility since I set it to unlisted so that others won't find my test video by searching.
Any info is welcome!
Edited:
The video itself doesn't have any problem. I can play it on YouTube and via YouTube iframe API also.
I'm aware that YouTube has a system which automatically detects copyright infringements, however, this issue seems to happen randomly even when we don't violate any copyright of others. (happens with our original videos too)
We finally decided to cache fileDetail on our backend.

Cloud-based automatic new youtube upload download to dropbox

Basically what I'm trying to achieve is:
-whenever a new video is posted on my channel, trigger a zap/ifttt to download it to dropbox in mp4 for backup purpose, added bonus - extract audio to mp3.
I want to do it automatically and on a free remote service, not my PC or VPS. I know it all this could easily be done locally, but I want an independent solution for a number of reasons.
The problem is, youtube api prohibits video download.
So far I have investigated web-based downloaders, but couldn't figure a way to automatically get a download link without visiting the website. cloudconvert doesn't support direct youtube download.
The closest thing I found is a web-fork of youtube-dl that allows it to run on owncloud, but I'm failing to find a free owncloud provider that allows user apps.
There should not be more than 3 short channel uploads a day, so performance and delays are not much of an issue, I'm happy to wait up to a day for the download to commence.
Any help much appreciated.
One step of the process is probably using offcloud, which can fetch your youtube video and store it on a cloud storage, such as google drive, ftp, etc. It has API

Rails streaming and uploading at the same page

I have a page where users see the uploaded videos. Above the videos, there is an "Update" form with the ability to upload videos to the collection. The form uses realtime uploading (Upload starts as soon as user chooses file). And when the upload progress is 100%. The user hits "Update" button to update video collection.
The problem occurs when the user wants to upload a file when watching a video. The upload does not progress. There are no messages or errors in server development log or client javascript console. It just hangs (the video continues playing though). The upload usually hangs at the start (5%, 20% depending on the video file size).
By the way; i use refile gem for managing realtime uploads, storage, file serving, etc. Also it should be known that, i use same rails application server (Thin 1.6.3) to serve files and accept uploads. (Maybe the server gets busy and can not accept uploads? Because if i don't start playing the video, the upload progresses smoothly and completes without a problem.)
Could anyone point me in the right direction? Where to look? Are there any parameters i should set somewhere?

Can I save a stream-only track locally for offline capability?

I am developing an iOS app that will play music from soundcloud. I want to give the user the option of an offline mode so he/she can play music even if there is no connection available.
it is technically possible to download the streamed mp3:s locally (I have already implemented it) but will Soundcloud allow me to do it? I have no intention of making these mp3:s accessible outside the app.
The problem of using a downloaded copy instead of the streamed track would be that the play would not count. Is there a way to register a play without actually playing the track?
I have tried to reach them through mail and twitter but I have got no reply yet.
Any thoughts?
Short summary of nickf:s comment above:
this is expressly disallowed

Resources