Results 1 to 11 of 11

Thread: How to insall ffmpeg in apache (creating video thamnail)

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    How to insall ffmpeg in apache (creating video thamnail)

    How to create .avi and mpeg video thumbnail?

    Hi all. i got a huge list of video(.avi and mepeg) in my pc. I want to create a php script that displays all the video names along with its thamnail.(I already have video name and path in mysql db).

    After searching google i came to this program called ffmpeg and i tried to install it but it never work.The page takes for ever to load and nothing happens. Could any one help me install it in Apache/1.3.33 (Win32) (wamp server). My main goal is to create thamnail for all these videos and store the location of those thambs in db too. I hope some one help me.Thanks


    Installation method that doesn't work:

    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");

    ?>

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: How to insall ffmpeg in apache (creating video thamnail)

    the script is taking a while because it is loading the video, going to that location, and taking a picture. did you go to c:/ffmpeg/ffmpeg/picname%d.pnh and see if it exists?
    My usual boring signature: Something

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: How to insall ffmpeg in apache (creating video thamnail)

    Quote Originally Posted by dclamp
    the script is taking a while because it is loading the video, going to that location, and taking a picture. did you go to c:/ffmpeg/ffmpeg/picname%d.pnh and see if it exists?
    Yes i tried it just now. I heared a dang voice and then i got a white page. i checked the directory where i placed the video and ffmpeg files and no image was found!!

  4. #4
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: How to insall ffmpeg in apache (creating video thamnail)

    check in the directory where the php file is
    My usual boring signature: Something

  5. #5
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: How to insall ffmpeg in apache (creating video thamnail)

    ah, i found where you got your code, and you are doing the incorrect method. I have not yet found the correct method however.
    My usual boring signature: Something

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: How to insall ffmpeg in apache (creating video thamnail)

    dclmp yeah i found that link from google but couldn't make it to work !! Hope i get some help there.Thanks

  7. #7
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: How to insall ffmpeg in apache (creating video thamnail)

    this link looks like it has some promising material. The FFMPEG API Guide
    My usual boring signature: Something

  8. #8
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: How to insall ffmpeg in apache (creating video thamnail)

    Even if you were to get it working it would still be very slow. The operation you are carrying out is designed to be carried out as a batch process. I suggest you write a small batch script which the Windows task scheduler fires off every 5mins, which will run the program and produce the thumbnails for you.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: How to insall ffmpeg in apache (creating video thamnail)

    VisualAd thanks for your reply. Still i couldn't make it work for one file!! I am sure it can be done. Youtube creates 3 thumnails for each video and i am sure it is has been done with code not human!!

  10. #10
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: How to insall ffmpeg in apache (creating video thamnail)

    I am not sure what your issue is? Using a batch script does not require a human. Can you run this command from the command line and does it work? If it doesn't does it show any errors?

    When you upload a video to Youtube there is a delay, usually about several minuets between you posting your video and the video appearing on the site. I do not work for Google but I think it is safe to say that the upload gets put in a queue for periodic batch processing and it is this batch processing which converts the video to a playable format and produces the thumbnails of the video.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: How to insall ffmpeg in apache (creating video thamnail)

    I tried to run the code in command line and it just loaded the folder with no image created !! No error nothing!! DId you try it in your side if it worked?

    batch script is good idea after i make it work for one video I will probably try to learn that :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width