Auto Video image thumb!

Started on the old forum in May 2010 · view the original in the archive · old links redirect here

12 replies · 1,298 views · started 16 years ago · 1 min read

6 participants
cpg12 Junior · 32 posts #1

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

External image (may be gone)

its create automatic thumbnail for video.3gp?

It is possible?

or share any script that create thumbnail for video?

Thanks in advance!

GiLL Senior · 356 posts #2

download sea script it has all things and you must have ffmpeg installed for show Video image thumb

left wap stuff

cpg12 Junior · 32 posts #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..

morency Senior · 488 posts #4

If I make this , you will add my site banner or link on your site ???

Unamos los corazones,hoy todos somos multicolores!

cpg12 Junior · 32 posts #5

sure! morency...

GumSlone Administrator Principal · 1,690 posts #6

create video_thumbsdirectory and chmod 777 it

<?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

External image (may be gone)

akela Senior · 305 posts #7

How Can i use and where this code will be paced. i try but not success.

GumSlone wrote: create video_thumbsdirectory and chmod 777 it

<?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 );
}

?>

External image (may be gone) Unlimited Web Hosting service. 99.99 $ uptime Guarantee. Free Trail Available for 30 days. Free Script | Null script| Php | Unlimited Web Hosting| Unlimited Space | Unlimited Bandwidth| Unlimited Domain| $3/m Unlimited Space | Unlimited Bandwidth|5 Domain| $2/m 10 GB Space | 100 GB Bandwidth| 1 Domain| $1/m FFMPEG| FREE SCRIPT | FREE SITE BUILDER |LIVE SUPPORT [Timewebhosting.com On Web Hosting| Unlimited Web Hosting](http://www…

GumSlone Administrator Principal · 1,690 posts #9

cpg12 wrote: GumSlone, i tried but nothing happened! white page only... http://75.126.147.248/~lsxmobi/test.php?video=carol.3gp

Here's our phpinfo phpinfo()

plz. advice...thanks!

try this command:

exec("/usr/local/bin/ffmpeg -i ".$video." -an -ss 00:00:05 -t 00:00:01 -vframes 1 -r 1 -y ".$video_thumb);

or

exec("/usr/local/bin/ffmpeg -i ".$video." -f image2 -ss 4.00 -vframes 1 ".$video_thumb);

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

cpg12 Junior · 32 posts #10

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

ksg91 Developer · 162 posts #11

got this error on executing

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

ksg91 Developer · 162 posts #12
$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

ksg91 Developer · 162 posts #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

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close