![]() |
|
thumbs for flvs? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: thumbs for flvs? (/thread-3086.html) |
thumbs for flvs? - george2 - 2008-06-12 is it possible for zen photo to make thumbs from videos, flv's especially? ffmpeg springs to mind! thumbs for flvs? - Mammlouk - 2008-06-12 This question was recently addressed here: But since it is not clearly obvious in the post title and only shows up in the google search vs the site's search I will post the basic response. zenphoto does not currently support automated thumb creation from any videos. You can however create your own thumbnails and put them in the directory with a specific naming image--video.jpg?? I can't remember for sure as I don't use videos. On the topic of using ffmpeg, I know I saw it recently posted elsewhere but didn't notice it at a cursory glance. Adding server side requirements is counter-intuitive to the goals of zenphoto. I imagine you could develop a plugin for it so that it is not a core requirement, but you'd need to do it yourself or find someone willing/interested in the project. thumbs for flvs? - george2 - 2008-06-12 ok, thanks for the reply. i'd be happy to take on a plugin, but have a few questions about plugin creation... i want to obviously add some sort of link to zp to say make thumb - i'll probably start with a random time offset for the moment which i guess should go on the content listing page for the album it's in. am i right in assuming it wouldn't be a template plugin? so, in that case, how do i extend the functionality of the zp core? the plugin doc doesn't really say much. i've looked at the spam filter plugin code, but just see a dir defining filters, where do i put the code to add a menu to the options/comments html? do i have to modify core to do that? thumbs for flvs? - sbillard - 2008-06-13 I see two ways you could approach this.
If you choose to embark on #2 I would suggest the follownig: Test your implemetation by deleting the Once you get things working, create a ticket and attach your plugin PHP file. We will take care of integrating it as an option in zenphoto. thumbs for flvs? - danielsbrewer - 2008-06-13 Just in case it is of any help, this is the script I use to create all the thumbnails, taking a snapshot 2 seconds into the video: `#!/bin/bash ORIGINAL_IFS=$IFS IFS=$'\n' for i in do ffmpeg -y -i "$i" -f mjpeg -ss 00:00:02 -vframes 1 -an "${i%flv}jpg" done IFS=$ORIGINAL_IFS ` PS There should be backticks around the find statement i.e. the black bit thumbs for flvs? - george2 - 2008-06-13 ok, thanks guys, i'll sit down with this as soon as i get some time, but this is what i did for the moment, kinda what daniel put, but in php // full path to ffmpeg // full file path if (makevideothumb($inputvideo, 300, 300, 0, 0, 20, $thumbfilename)){ function makevideothumb($input, $w, $h, $hour, $min, $sec, $thumbname){
} not random yet, but i only need to grab the video length, and then make up a random time for it ?> thumbs for flvs? - acrylian - 2008-06-13 Just for info: And we have a article about plugins, too: thumbs for flvs? - george2 - 2008-06-13 ok, ticket made thumbs for flvs? - Mammlouk - 2008-06-13 Lookin' good! I will try to test it out tonight or tomorrow when I have time. thumbs for flvs? - slaattnes - 2009-10-12 Did you ever make the plugin?:-) thumbs for flvs? - acrylian - 2009-10-12 You can download what he did on the ticket linked. |