Can anyone help me how to create a code similar to this...
its create automatic thumbnail for video.3gp?
It is possible?
or share any script that create thumbnail for video?
Thanks in advance!
Started on the old forum in May 2010 · view the original in the archive · old links redirect here
Can anyone help me how to create a code similar to this...
its create automatic thumbnail for video.3gp?
It is possible?
or share any script that create thumbnail for video?
Thanks in advance!
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
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, 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!
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
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
$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
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