When a user shares a video from youtube or google video, it would be nice if there was a way for automatic thumbnailing since yt and gv already have thumbnails created. I am not a programmer by any means but thought there could be useful code found in http://helmetcameracentral.com/2006/01/11/videobloggerplugin/ , video blog plugin for wordpress that might have some useful code that can implement this feature for the video module. Cheers, Ivan
| Comment | File | Size | Author |
|---|---|---|---|
| #36 | mycode.txt | 418 bytes | ChatFriendz |
| #19 | youtubethumb.patch | 1.24 KB | anarcat |
| #12 | video_image_autothumb.patch | 8.35 KB | jyamada1 |
Comments
Comment #1
Veggieryan commented+1 on this
this is crucial. Its a pain in the @$$ to add these manually. most users never do.. and you end up with an ugly video gallery.
i'd put cash towards this.. contact me.
thanks
ryan.
Comment #2
mudanoman commentedHey Ryan,
I am currently working to find someone to do this. I will email you, but we should collaborate our efforts.
Cheers,
Ivan
Comment #3
fax8 commentedguys, this is definitely a good feature to have...
What is the status of this? Do you finally had it to work?
If so please roll out a patch.
Thanks,
Fabio
Comment #4
mudanoman commentedFabio,
Did you get my email with the attached version. Email me if otherwise.
Peace,
Ivan
Comment #5
fax8 commentedOh.. yes I got it... I didn't understood you were the same person.
Thanks,
Fabio
Comment #6
Veggieryan commentedany update on this?
the module is basically unusable for youtube videos.
it makes more sense to create a CCK type and just use the embed code.
its more functional and easier than manually taking screenshots to make thumbnails!
Comment #7
911 commentedIs there a automatic Thumbnail Patch for version 5.x-1.x-dev? Would be nice to attache here.
Comment #8
teamrob commentedAny update on this? Auto thumbnails for teasers from absolute urls maybe using ffmpegg?
I will donate 20$ for this
Comment #9
teamrob commentedI looked into this further. Currently it doesnt look like you can get google video thumbs unless you want to hack some wierd parser that would probably only work temporarily.
For youtube you just need an api and then parse the data
http://www.youtube.com/dev_api_ref?m=youtube.videos.get_details
There is a video cck module http://drupal.org/project/video_cck that is supposed to do this but it does not work for thumbsnails and its unknown if this is even being developed anymore.
How hard would it be to include some of that snazzy api data into the video.module, it would be great for teasers and such.
Still 20$ bounty on including the youtube api
cheers
Comment #10
teamrob commentedJust a follow up this currently does work with the newest video cck version
Comment #11
jyamada1 commentedsubscribe
Comment #12
jyamada1 commentedHere's a working prototype, rolled against current 5.x-1.x-dev.
Basically this patch plugs the useful thumbnail grabbing functions from video_cck.module into video_image.module. The thumbnail is pulled from the url into temp, and then plugged through the normal video_image_nodeapi call.
Known bugs: video_upload throws a "file not stored" error every time.
reviewers could pay particular attention to security in the file handling code, since i am completely new to these sorts of manipulations.
i'm hoping that with work on breaking up video.module into a more pluggable system that this code will get cleaner.
Comment #13
jyamada1 commentedTodo:
Comment #14
teamrob commentedAre you able to resize with the temp storage or any option to keep it stored permanently?
I was trying to get the video cck writer to try that since the actual thumbnails from the various services are all a diff size.Having them resized to all be the same would look very consistent but would require some storage and prob use of image_cache module or another image module, I posted some links and rough code about this in video cck features.
thanks
Comment #15
jyamada1 commentedah, the images are stored permanently as image nodes.
what i meant by passing through video_image_nodeapi($op='submit') is that these thumbnails are handled the same way that ffmpeg created thumbnails and manually added thumbnails are currently handled in video_image. That is, the image (which is, in this case, a temp file downloaded from the provider) is passed through image node creation functions, and an image node is created that is linked to the video through an 'iid'.
right now, my set up is that acidfree displays resized thumbnails (created through image.module) in a video gallery. this makes use of the default functionality of image.module and acidfree.module and so should happen automatically with the patch above. one could use either image.module's resizing functions or imagecache to handle this in a more direct way.
from what i saw in video_cck, the thumbnails are displayed directly from the url. in fact, the only thing this patch really does is rework the API code from video_cck to take the urls and make them into permanent images.
btw, anyone know any copyright issues about storing these images?
Comment #16
preetinder commentedI was able to display youtube generated thumbnails easily by making some modifications in video.module
I found out that Youtube creates 3 thumbnails for each uploaded video. I have not put much time into it and have done 5 mins of research on youtube, so the thumbnail storage path may change in near future... but it is working for now.
so for http://www.youtube.com/watch?v=gwZD59Ic9T8 video, it generates following thumbnails.
http://img.youtube.com/vi/gwZD59Ic9T8/1.jpg
http://img.youtube.com/vi/gwZD59Ic9T8/2.jpg
http://img.youtube.com/vi/gwZD59Ic9T8/3.jpg
gwZD59Ic9T8 is the video file.. which is accessible by $node->vidfile in video.module for each uploaded video
I modified video.module file and added a function for displaying thumbnail.
Do let me know if you have any difficulties integrating it. I am currently working on way to find thumbnails for Google videos Or any other video sharing sites and then will integrate them in video module.
I will post the URL of website once its complete :)
Comment #17
Jboo commentedTony - I added the code you posted (without the opening and closing PHP tags) to the end of my video.module. Is this correct?
I can't seem to see any thumbnails though :-(
Is there something I've done wrong?
Comment #18
Jboo commentedAs a followup to my last post - i've added a PHP statement to page.tpl and the thumbnail now shows. Is there anyway I could create a block with these thumbnails and make them clickable?
Comment #19
anarcat commentedSo there's two approaches here: one which is the old approach of keeping a local copy of the thumbnail (patch #12 here from jyamada1, taken from video_cck), and a new idea of just referencing the url straight from Youtube (comment #16, from tony31).
The attached patch does the latter simply and cleanly. There's a
ifthat is not removed completely but just commented out for clarity. It does depend on youtube's internal API and does not work with other providers like Google.Comment #20
anarcat commentedWith two patches, I guess it's more a review we need...
Comment #21
fax8 commentedon my rewrite I finally implemented the local copy way.
Automatic thumbnails works pretty well.
I'm pretty sure that doing hotlinking is really not a good thing.
The new version will be published soon.
Fabio
p.s.: setting this as fixed. feel free to reopen if you want to discuss more.
Comment #22
(not verified) commentedComment #23
rubenk commentedexcellent. i can't wait for this to come out.
is it too hard to implement this with google as well and/or can this be opened up to other sites possibly by allowing the admin to enter thumbnail URL variables to be used with uploads....admittedly I am just interested in google but seriosuly
This was a great step.
if only the new release was out ;-)
feel free to close if its a separate issue
Comment #24
fax8 commentedthe rewrite support youtube and google automatic thumbnailing.
the user can override the auto thumbnail uploading an image.
does it works?
Comment #25
rubenk commentedvery good
Comment #26
(not verified) commentedComment #27
scottrigbyCan you clarify what you were able to get to work in the final call? I've been using embed media, which includes video_cck. It's not clear to me how to access the options for adding thumbnails. The Read Me file in the video_cck folder (in emfield folder) says to look "on the Display Fields settings page" for the options. Thanks
Comment #28
scottrigbyComment #29
rubenk commentedare you sure you are in the right place? the video module is not the same as video cck or really in any way related.
Comment #30
boytaichi commentedhi,
i have tried to insert the code,
but now not only i don't have the auto-thumbnail, but i lost the path for video, i.e., mysite.com/video. can you help?
Comment #31
Anonymous (not verified) commentedIf you are allowing your sites users to embed youtube video files using the embedded code from youtube, here is an alternate method you might want to try:
Comment #32
Anonymous (not verified) commentedI forgot to mention... As it is obvious, it needs a little cleanup.
You put this code in a module wherever you like the thumbnail to be shown. You also need the $node object as an array in the beginning of the code as:
Here is a little cleanup and explanation:
Then return your output in the end of your code.
Please let me know if you need more help on this code.
Thanks.
Comment #33
Anonymous (not verified) commentedAdditional to above this code needs to have imagecache.module installed, as I needed it for creating the thumbnail smaller.
You can remove that part if you like it in the default Youtube size.
Comment #34
Anonymous (not verified) commentedCorrection for the latest code:
is a typo and should be:
Comment #35
theorichel commentedI do not quite understand: is the current development version supposed to work with thumbnails? I do not get automatic thumbnails from Google or You Tube and I am not able to get hyperlinked thumbnails in a block (either the latest videos block or a Vierws based block.
In my Views based block I do manage to get a non-hyperlinked thumnbail (through attached image), but that is all.
Switching the options at Video Image make no difference.
It is unclear how important FFMPEG is, one apparently does need it to get the thumbnails that come with Google an You Tube, or is it indispensable for the whole functioning of the module?
Anyway, when I try to link to a YT video and just give in the code (as you suggest) then I get the message that the ' File type is not supported'. Afterwards I can play it however.
Someone here offered 20 dollars, may I join that offer? Will you let us know a reaction?
Comment #36
ChatFriendz commentedHi! Friends nice to meet all of you guys, I hope, get answer, I installed the following mod in my website, How can program with the Abow thumbnail picker for youtube video, please suggestion how to do this, My code Attach
Comment #37
drupalfriend commentedHi Tony,
Pls contact me - stso009@yahoo.com. I need some help from you.
Comment #38
iLLin commented