I'm interested in getting a preview image of a youtube video for my application
I'm using the url to the previews:
http://img.youtube.com/vi/EqWRZrupLrI/0.jpg
but this has little two black rows, up and down, and I wish it were bigger.
I have read that the 0 is the bigger picture.
anyone know if it is possible to obtain a url with a better image?, for my project, I need the image is on a url
I appreciate the help
Regards :)
0.jpg is the full-size 480p thumbnail and there is no bigger thumbnail except for full HD videos (maxresdefault.jpg).
But why do you expect a bigger thumbnail for such a video ? Your video example has a resolution of 240p, the thumbnail is already much bigger than the video resolution.
Each of every image has 4 category like
https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
Also you can get more image size by this
-- For default
https://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
-- For high quality
https://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg
-- For medium quality
https://img.youtube.com/vi/<insert-youtube-video-id-here>/mqdefault.jpg
-- For max size
https://img.youtube.com/vi/<insert-youtube-video-id-here>/maxresdefault.jpg
Please check the following SO post:
How do I get a YouTube video thumbnail from the YouTube API?
YouTube thumbnail link doesn't work in all cases
It will surely solve your problem. I recommend to query the youtube api to get the thumbnail with max resolution.
Related
I have use ffmpeg and mp4parser to add image watermark on video.
both works when video size is small like less than 5MB to 7Mb but
when it comes to large video size(anything above than 7MB or so..)
it fails and it doesn't not work.
what are the resources that helps to adding watermark on video quickly. if you have any useful resources that please let me know?
It depends on what exactly you need.
If the watermark is just needed when the video is viewed on the android device, the easiest and quickest way is to overlay the image with a transparent background over the video view. You will need to think about fullscreen vs inline and portrait vs landscape to ensure it lines up as you want.
If you want to watermark the video itself, so that the watermark is included if the video is copied or sent elsewhere, then ffmpeg is likely as fast as other solutions on the device itself. If you are able to send the video to a server and have the watermark applied there you will have the ability to use much more powerful compute resource.
I wish to add a frame to the end of a video just after it has been captured so I can make a timelapse video as the images are acquired.
So the idea is to take an image, use ffpmeg to make the video by adding each image just after it is aqcuired.
I've seen many questions about adding a set length of time of a logo type image or how to compile a whole bunch of single images to a video but not this.
Anyone got a good idea of what to try?
I want to get all of the different images that YouTube stores for all of my videos from my channel Guitar3covers
For a certain video https://www.youtube.com/watch?v=I03uuxgpWd8
the video id is: "I03uuxgpWd8". I can get the same image from both http://img.youtube.com/vi/I03uuxgpWd8/0.jpg
and http://img.youtube.com/vi/I03uuxgpWd8/hqdefault.jpg. I want to get all the images stored by YouTube.
There are actually only 4 different images which is why you are getting the same image. Most are various sizes of 0.jpg, except for 1.jpg, 2.jpg and 3.jpg which are screen caps from different stages of the video.
For reference, YouTube stores 9 thumbnails for each video:
http://img.youtube.com/vi/I03uuxgpWd8/0.jpg (480x360px)
http://img.youtube.com/vi/I03uuxgpWd8/1.jpg (120x90px)
http://img.youtube.com/vi/I03uuxgpWd8/2.jpg (120x90px)
http://img.youtube.com/vi/I03uuxgpWd8/3.jpg (120x90px)
http://img.youtube.com/vi/I03uuxgpWd8/maxresdefault.jpg (1920x1080px)
http://img.youtube.com/vi/I03uuxgpWd8/sddefault.jpg (640x480px)
http://img.youtube.com/vi/I03uuxgpWd8/hqdefault.jpg (480x360px)
http://img.youtube.com/vi/I03uuxgpWd8/mqdefault.jpg (320x180px)
http://img.youtube.com/vi/I03uuxgpWd8/default.jpg (120x90px)
Just replace the video ID (I03uuxgpWd8) for each video. Note that if the video quality is less than the quality of the thumbnail, YouTube will not store an image for that size, so you may need to check for nulls.
Can anyone tell me the dimensions of the thumbnail image rendered by the Chromecast default receiver? I can't find this documented anywhere, and my current images are squashed. (I guess I could find out by trial and error, but if there's an official answer I'd love to have it.)
Cheers
Nic
It is actually in the developer docs:
Note: The video image art is 96x143 pixels and the first image resource associated with the media metadata is selected for display. Images are scaled to fit the expected dimensions
HTML 5 implementations are different across various browsers. In firefox, the image specified by the placeholder attribute will be shown until the user clicks play on the video. In chrome, the placeholder image is shown until the video is loaded (not played), at which point the first frame of the video is shown.
To reconcile this issue, I would like to set the first frame of the video to the placeholder image so that the experience will be the same in both browsers.
I would preferably do this using ffmpeg or mencoder. I have very limited experience using these however, so if someone could point me in the right direction, I would be much obliged.
Thanks!