GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP gurus ... (https://gfy.com/showthread.php?t=855004)

qw12er 09-14-2008 01:59 PM

PHP gurus ...
 
I want to save a screenshot of a swf movie using PHP. Is there any way I can do this ?

biskoppen 09-14-2008 02:02 PM

I'd say there is no direct way of doing it... you probably need to install some software on the server which you can send commands from PHP

HomerSimpson 09-14-2008 02:13 PM

you will probably need ffmpeg installed

here's a link you might use
http://www.phpbuilder.com/board/arch...-10327812.html

PS: is the video FLV or SWF?

qw12er 09-14-2008 05:08 PM

Can be both. Does it make a difference ?

bashbug 09-14-2008 05:38 PM

Code:


<?php
$movie = new ffmpeg_movie("video.flv", false);
$framenum = 15;
$frame = $movie->getFrame($framenum);
$im = $frame->toGDImage();
imagejpeg($im, "test.jpg");
imagedestroy($im);
print '<img src="test.jpg"/><br/>';
?>

you will need to have ffmpeg-php4 or ffmpeg-php5 installed.

Hansm 09-14-2008 06:59 PM

Only PHP Programmers who are starting are using for every thing a extension, alot hosts are not going to install php-ffmpeg. so save yourself alot of work and use ffmpeg direct with the shell_exec function.

using a extension for something so easy is ridicoules anyway.



Quote:

Originally Posted by bashbug (Post 14755855)
Code:


<?php
$movie = new ffmpeg_movie("video.flv", false);
$framenum = 15;
$frame = $movie->getFrame($framenum);
$im = $frame->toGDImage();
imagejpeg($im, "test.jpg");
imagedestroy($im);
print '<img src="test.jpg"/><br/>';
?>

you will need to have ffmpeg-php4 or ffmpeg-php5 installed.


Hansm 09-14-2008 07:00 PM

FLV screenshot can be easy extracted. SWF is harder. As long as i know ffmpeg can not do this but not 100&#37; sure about it, never tried.

only worked with movie files myself and ffmpeg.


All times are GMT -7. The time now is 09:57 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123