Youtube API: Revert video thumbnail to the default thumbnail - youtube

I am trying to revert the thumbnail of youtube videos, via the v3 API, to the thumbnail that is automatically generated by YouTube from a screenshot of the video when it's uploaded.
So, basically, I wanna delete the custom thumbnail I uploaded.
The documentation, as far as I can tell, only shows how to set a new thumbnail by uploading an Image, but has nothing on how to delete/revert thumbnails.
https://developers.google.com/youtube/v3/docs/thumbnails/set
Any pointers appreciated.

The only thing I can think of is that you grab one of the three automatically generated thumbnails:
http://img.youtube.com/vi/{video_id}/1.jpg
http://img.youtube.com/vi/{video_id}/2.jpg
http://img.youtube.com/vi/{video_id}/3.jpg
You could then upload either of them via the API. Unfortunately, they are in very poor quality. Maybe there is a way to get a high-quality version of them?

you can use this below url too, It gives you a good quality thumbnail
https://ytimg.googleusercontent.com/vi/{VIDEO_ID}/mqdefault.jpg
Actually You cannot get the other images at full size. Only /0.jpg or default image is large rest will be in thumbnail size.

Related

og:image not being updated when browsing different youtube videos

I seen something strange when browsing youtube videos. The og:image does not change as I keep browsing from one page to another. The og:image always points to the first youtube video. Of course, if I manually refresh the page, I see the correct og:image information.
YOUTUBE use nodejs for their site. Nodejs is a javascript enable server site script, as nodejs is a non blocking code, that means it first updates that part of webpage which takes less time to execute and vice versa.og:image contains, default video thumbnail. You can use url of thumbnail to get og:image.
For the high quality version of the thumbnail use a url similar to this:
https://ytimg.googleusercontent.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg
For videos which have high quality you can use below url. For HQ videos.
For the maximum resolution version of the thumbnail use a url similar to this:
https://ytimg.googleusercontent.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg

how to get remote service videos thumbnails for ios in appcelerator?

I am developing ios app in appcelerator studios .In that app i need to show thumbnails of remote service videos . I am getting videos data through JSON object. I am getting thumbnails for only one video rest of them also i am getting but those are append to first video of the JSON object.
can any one help me how to show thumbnails for remote located videos ?
Thanks in advance.
I'm not sure if I fully get your question, but from your title I take that you want to generate thumbnails for remove videos?
For this you can use the following API:
http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Media.VideoPlayer-method-requestThumbnailImagesAtTimes
This does mean that you have to load in every single video (the view itself does not need to be visible to the user) which is quite heavy. So if at all possible it is better to get them from wherever you get the videos from, or use some middleware to generate and cache them there.

JW-Player use video thumbnail as featured image

If I upload external media (in particular a Youtube video) for use with the jw-player wordpress plugin... how do i use the thumbnail as my featured image ... so i can show thumbs in say the excerpts that link to the post where the full video is available.
the jw-player plugin seems to save the youtube screenshot as meta data, but the meta data is
associated with the attachment page and not w/ the post i am adding to my blog.
If that is the case, you can use <?php wp_get_attachment_metadata( $post_id, $unfiltered ) ?>. You'll need to look through the returned array to find that image and display it.
http://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata

How should I start this Ruby on Rails app?

I want to create an app in Ruby on Rails that when a user pastes the link of a video, the thumbnail is embedded, and when the user clicks the thumbnail, the video is embedded with ajax. How should I start developing this functionality? I plan on using Embedly. My first question is how do I use it? I've read the documentation, but there are a bunch of different tutorials and I'm not sure which one to use. And specifically how do I get the thumbnail and the video? Also, should I have a separate model for both the thumbnail and the video? Or should the thumbnail be a field in the video table? What should I be storing in my database?
I would really, really appreciate any help.
Embed.ly API gives you a pretty wide range of options. Thumbnail is also included in the return hash. All you need to do is capture the url your users paste, plug it into this API url, and parse the returned hash for the thumbnail image.
You can then easily use the jQuery plugin to generate the embed link when the user clicks on the thumbnail.
$.embedly('http://www.youtube.com/watch?v=LfamTmY5REw',
{maxWidth: 600,
elems: $('#element'),
success: function(oembed, dict){
alert(oembed.title);
});
Note that in this function elems property is where you want your video to be embedded. oembed parameter contains the hash, which includes the thumbnail image link. So you can do everything in this one call. Embed the video as soon as the user pastes the link, and simply hide the embedded video until the user interacts with the thumbnail image.
You should probably save the thumbnail url as a field of the same model as everything else.

youtube video upload with uploadify and paperclip custom processor ruby on rails?

I have a file uploader that currently uploads images / pdf with a nice progress bar using uploadify and saves to S3 using paperclip.
I want to upload videos the same way but instead of to s3, i want to save to youtube.
Is there a processor or something that i can use to save to youtube ?
Would i be able to see the progress via the progress bar ? would this show all the progress of uploading it straight to youtube ?
Or is there a better way ? I dont want to store videos or convert them myself.
thanks alot for the help in advance
rick
You'll have to create a post processor that takes the video and uses the YouTube Data API direct uploading method to upload the file:
http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html#Direct_uploading
If you want to see the progress bar you have to upload the file to your server before sending it to youtube, and it will only reflect the progress of uploading it to your intermediate site (too much work for the sake of showing a progress bar, if you ask me), otherwise you can send the file straight to youtube and I don't think you'll see any progress bar, but you won't waste double bandwidth. In any of this cases I don't think you'll need to worry about converting the file yourself as long as the format is supported by youtube.

Resources