Current location: Hot Scripts Forums » Programming Languages » PHP » How to create .avi and mpeg video thumbnail on the fly


How to create .avi and mpeg video thumbnail on the fly

Reply
  #1 (permalink)  
Old 05-31-08, 02:07 PM
method method is offline
Wannabe Coder
 
Join Date: Jul 2006
Posts: 228
Thanks: 0
Thanked 0 Times in 0 Posts
Arrow How to create .avi and mpeg video thumbnail on the fly

Hi all. i got a huge list of video in my pc. I am creating a php script that displays all the vidoe names along with its thamnail. But i don't know how to create video thanail image on the fly when the scrypt is loading. I have all the video name and location inside mysql database already. I want video video thamnail just like the youtube.Hope some one show me how this can be done.thanks
Reply With Quote
  #2 (permalink)  
Old 05-31-08, 07:38 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
You can give this a try: http://ffmpeg-php.sourceforge.net/
Reply With Quote
  #3 (permalink)  
Old 05-31-08, 07:51 PM
method method is offline
Wannabe Coder
 
Join Date: Jul 2006
Posts: 228
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks niko but i don't know how to install it in my wamp server ? It has php 5. Could you tell me what should i do whith those unziped files ?
Reply With Quote
  #4 (permalink)  
Old 06-01-08, 04:52 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Reply With Quote
  #5 (permalink)  
Old 06-05-08, 09:33 AM
method method is offline
Wannabe Coder
 
Join Date: Jul 2006
Posts: 228
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks niko . I tried the following but the page takes foever to load and nothing happens!!

Quote:
Download the latest version from:
http://ffdshow.faireal.net/mirror/ffmpeg/

Install:
unzip it to a folder on your computer. thatīs all!


This is how I use ffmpeg and PHP


<?php

// movie.avi.... name of the movie you want to take a screenshot from
// 00:00:00.... Where in the movie do you wanna take your screenshot, 10 seconds from start? ex: 00:00:10
// picname..... name your generated pic

exec("START c:/ffmpeg/ffmpeg -vcodec png -i movie.avi -ss 00:00:00 -vframes frames picname%d.png");

?>
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 07:44 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.