Auto Video image thumb!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Auto Video image thumb!

    Can anyone help me how to create a code similar to this...

    <img src="thumb.php?v=video.3gp">

    its create automatic thumbnail for video.3gp?

    It is possible?

    or share any script that create thumbnail for video?

    Thanks in advance!
    Last edited by cpg12; 12.05.10, 05:39.

    #2
    download sea script it has all things and you must have ffmpeg installed for show Video image thumb
    left wap stuff

    Comment


      #3
      i already tested sea script but i encounter a lot of bugs.

      Anyway.. Our server is FFMPEG enabled!

      plz. anyone share a simple code for auto image thumb..

      Comment


        #4
        If I make this , you will add my site banner or link on your site ???
        Unamos los corazones,hoy todos somos multicolores!

        Comment


          #5
          sure! morency...

          Comment


            #6
            create video_thumbs directory and chmod 777 it
            PHP Code:
            <?php

            $video 
            $_GET['video'];
            $video_thumb "video_thumbs/".md5($video).".jpg";
            if(!
            file_exists($video_thumb))
            {
                @
            exec("/usr/local/bin/ffmpeg -i ".$video." -f image2 -ss 4.00 -vframes 1 -pix_fmt jpeg ".$video_thumb);
            }
            if(
            file_exists($video_thumb))
            {
                
            header('Content-type: image/jpeg');
                
            readfile($video_thumb );
            }

            ?>
            Advertise your mobile site for FREE with AdTwirl

            Comment


              #7
              How Can i use and where this code will be paced. i try but not success.
              Originally posted by GumSlone View Post
              create video_thumbs directory and chmod 777 it
              PHP Code:
              <?php

              $video 
              $_GET['video'];
              $video_thumb "video_thumbs/".md5($video).".jpg";
              if(!
              file_exists(video_thumb))
              {
                  @
              exec("/usr/local/bin/ffmpeg -i ".$video." -f image2 -ss 4.00 -vframes 1 -pix_fmt jpeg ".video_thumb);
              }
              if(
              file_exists(video_thumb))
              {
                  
              header('Content-type: image/jpeg');
                  
              readfile($video_thumb );
              }

              ?>

              Comment


                #8
                GumSlone, i tried but nothing happened! white page only...



                Here's our phpinfo
                phpinfo()

                plz. advice...thanks!

                Comment


                  #9
                  Originally posted by cpg12 View Post
                  GumSlone, i tried but nothing happened! white page only...



                  Here's our phpinfo
                  phpinfo()

                  plz. advice...thanks!
                  try this command:
                  PHP Code:
                  exec("/usr/local/bin/ffmpeg -i ".$video." -an -ss 00:00:05 -t 00:00:01 -vframes 1 -r 1 -y ".$video_thumb); 
                  or

                  PHP Code:
                  exec("/usr/local/bin/ffmpeg -i ".$video." -f image2 -ss 4.00 -vframes 1 ".$video_thumb); 
                  Advertise your mobile site for FREE with AdTwirl

                  Comment


                    #10
                    GumSlone, its plain white again!? no any error message?

                    Comment


                      #11
                      got this error on executing
                      Code:
                      kishan@ubuntu:~/Desktop$ ffmpeg -i tare.VOB -ss 4.00 -pix_fmt jpeg thumb.jpg
                      in ubuntu terminal.

                      Input #0, mpeg, from 'tare.VOB':
                      Duration: 00:09:38.35, start: 0.235044, bitrate: 14431 kb/s
                      Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 352x288 [PAR 12:11 DAR 4:3], 700 kb/s, 25 tbr, 90k tbn, 50 tbcting
                      Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s
                      Output #0, image2, to 'thumb.jpg':
                      Stream #0.0: Video: mjpeg, yuvj420p, 352x288 [PAR 12:11 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 25 tbc
                      Stream mapping:
                      Stream #0.0 -> #0.0
                      Press [q] to stop encoding
                      av_interleaved_write_frame(): I/O error occurred
                      Usually that means that input file is truncated and/or corrupted.


                      any idea
                      Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

                      Comment


                        #12
                        PHP Code:
                        $e=exec("/usr/local/bin/ffmpeg -i ".$video." -f image2 -ss 4.00 -vframes 1 ".$video_thumb); 
                        and then echo variable $e and see what error is
                        there..
                        Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

                        Comment


                          #13
                          i was getting error though image was creating properly!
                          and cant navigate to 2,3.. or other pages here. getting 404 error! seems like some problem in mod_rewrite!
                          Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

                          Comment

                          Working...
                          X