Author Topic: Video thumbnailer?  (Read 8476 times)

0 Members and 1 Guest are viewing this topic.

Offline bgnm2000

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Video thumbnailer?
« on: March 09, 2006, 04:05:01 AM »
I think an awesome mod would be one that can capture the first frame of the video to make a thumbnail, and maybe go the extra step to make it flash. Like on youtube.com

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Video thumbnailer?
« Reply #1 on: March 09, 2006, 05:24:28 AM »
its possible, here is a sample

Code: [Select]
mplayer {inputFilename} -ss 240 -nosound -vo jpeg:outdir={outputPath} -frames 1
then:
convert -sample 100x100 {mplayer's output path}/00000002.jpg

maybe part of that code can be used in the media/avi.html , but an expirienced user than me has to do it. There are much more scripts like this

this link is maybe very usefull for your request: http://vv.carleton.ca/~cat/album/

Offline bgnm2000

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: Video thumbnailer?
« Reply #2 on: March 10, 2006, 05:18:10 PM »
does anyone experienced with making mods or programming think they could give it a shot? I have no idea where to begin lookin at all the code.

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: Video thumbnailer?
« Reply #3 on: March 10, 2006, 10:00:25 PM »
I think most coders here are making mods cause they need it also for their own gallery,
and this request is might be a little bit too special?
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline WeZ

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Video thumbnailer?
« Reply #4 on: March 27, 2006, 08:08:47 PM »
Hi Ice,

I Understand what you say, but it is something quite soughtafter and IMHO quite needed.

I Just need to find out where to place the code

Code: [Select]
ffmpeg -i sourcevideo.mpg -f singlejpeg -t 0.001 outputthumb.jpg
and then 4Images will handle video just as good as Images :-)

If this interests you maybe follow the mod i requested @ http://www.4homepages.de/forum/index.php?topic=12272.0

Offline potyka

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: Video thumbnailer?
« Reply #5 on: March 31, 2006, 08:47:28 PM »
Hi!
May settle how so that the vidoknál also are indices images so as the images?

Offline jamiefrancis

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Video thumbnailer?
« Reply #6 on: October 21, 2007, 06:47:48 PM »
Hi Ice,

I Understand what you say, but it is something quite soughtafter and IMHO quite needed.

I Just need to find out where to place the code

Code: [Select]
ffmpeg -i sourcevideo.mpg -f singlejpeg -t 0.001 outputthumb.jpg
and then 4Images will handle video just as good as Images :-)

If this interests you maybe follow the mod i requested @ http://www.4homepages.de/forum/index.php?topic=12272.0


put it on your image_utils.php

}
function Generate_VideoThumb($src, $dest) {
  global $convert_options;

  $command = "/usr/bin/ffmpeg -i ".$src." -f mjpeg -t 0.02 -s 90x90 ".$dest;
  echo ($command);
  system($command);

  return (file_exists($dest)) ? 1 : 0;
}


Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Video thumbnailer?
« Reply #7 on: October 21, 2007, 06:56:37 PM »
Quote
system($command);

Note: Some host disable this command.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?