Da li je moguće generirati sličicu za Youtube video? Da! Korisno je prikazati sličice s vezama na bočnim trakama ili zamijeniti kôd za ugrađivanje Youtubea videozapisom u vašem RSS feedu ili e-pošti. Ovo je već značajka nekih e-mail platformi, poput Dodatak za WordPress bilten. Pokušaj pisanja vlastitog generatora sličica na Youtubeu mogao bi biti popriličan zadatak.
Dobra vijest je da ne morate generirati sličicu, Youtube vas čeka nekoliko.
Evo URL-a videozapisa - primijetite ID videozapisa?
http://www.youtube.com/watch?v=BXIqyWu8uSg
Evo slika u nekoliko veličina i okvira, imajte na umu da je video ID ugrađen u URL:
- http://img.youtube.com/vi/BXIqyWu8uSg/0.jpg
- http://img.youtube.com/vi/BXIqyWu8uSg/1.jpg
- http://img.youtube.com/vi/BXIqyWu8uSg/2.jpg
Jednostavan način ugradnje sličica u bočnu traku bio bi ručni unos URL-a slike kao prilagođeno polje, zatim prilagodite svoju temu tako da prikazuje prilagođeno polje ako postoji.
Doug, I’m not sure I’m clear on what you are saying here. I could really use thie feature. Are you saying you can just take your YouTube video URL and append /0.jpg to it to get a thumbnail? Is this a dynamic image?
Your example goes up to /2.jpg. Is that frame 2? What does the 0, 1 or 2 represent? How high can you go?
Sorry for all of the questions but this really piqued my interest. Thanks!
Zdravo Patric,
No, you can’t just append a /0.jpg – notice the subdomain and the path are a bit different. No, the image is not dynamic, it’s static. I’m not sure what the number represents but 0 is a large image, 1 and 2 appear to be smaller images that are from different frames.
Doug
Just wanted to say thanks very much for this! I adapted my code to your suggestion and it worked.
Just wanted to say thanks very much for this! I adapted my code to your suggestion and it worked.
Brilliant, just what I was looking for. Pity the thumbnails are only 120×90
Hi Ben! Thanks for stopping by… if you check out the 0.jpg, the size is 480px by 360px.
Thanks, it is great.
Such a practical info! thank you so much!:D
You bet Delia!
Thanks for this. BTW, can we define the width and height of the images?
Unfortunately, no. YouTube sets the height and width automatically.
Wow, it’s great! never thought about it.