thumbnail ffmpeg

Discussion in 'PHP' started by hanushh, Jan 11, 2009.

  1. #1
    Can anybody give a script which can dynamically create thumbnail from flv videos, so that i can do something like this
     <img src="thumbnail.php?file=video.flv&percentage=60" />
    HTML:

     
    hanushh, Jan 11, 2009 IP
  2. elias_sorensen

    elias_sorensen Well-Known Member

    Messages:
    852
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    110
    #2
    
    <?
    exec("ffmpeg -i ".$_GET[file]." -y -f image2 -ss 4 -t 0.001 -s 110x110 filename.jpg");
    ?>
    
    PHP:
     
    elias_sorensen, Jan 11, 2009 IP
  3. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #3
    *COUGH*

    http://uk2.php.net/manual/en/function.escapeshellarg.php
    (Also, if you're going to end double quotes to put in the variable, use single quotes around the key name.)

    Dan.
     
    Danltn, Jan 11, 2009 IP