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)
-   -   ffmpeg experts (https://gfy.com/showthread.php?t=747133)

bDok 06-29-2007 08:12 AM

ffmpeg experts
 
If your an ffmpeg expert I could really use some help.

Wondering if it's possible to use ffmpeg to cut a movie up into x second clips where x is the number of seconds I want the clip to be. So if the clip was a minute long and I wanted 30 second clips I would get 2 30 second clips.

icq me
198 033 376
:thumbsup

SmokeyTheBear 06-29-2007 08:28 AM

im not an expert but i think this should work

Code:

<?php
$show = exec("/usr/local/bin/ffmpeg -i /home/youraccount/public_html/video.avi -ss 00:00:00 -t 00:30:00 -acodec mp3 -ar 22050 -ab 32 -f flv -s 320x240 /home/youraccount/public_html/video2.avi");
echo $show;
$show = exec("/usr/local/bin/ffmpeg -i /home/youraccount/public_html/video.avi -ss 00:30:00 -t 00:30:00 -acodec mp3 -ar 22050 -ab 32 -f flv -s 320x240 /home/youraccount/public_html/video3.avi");
echo $show;
?>

ss designates start time in move and t = duration

so that would take video.avi and split it into 2 files video1.avi and video2.avi

bDok 06-29-2007 08:36 AM

Ok. That's the right track for sure. I'm looking for a dynamic solution. I guess the only last thing I'm missing is how to have it pull the total duration of the film. From there I believe I can put together the rest. Looking for it to be a dynamic solution.

Going to write it such that it will take a variable of the total duration and then chop it up and output those clips will keep the names in a array then go back through and take screen shots of each clip.

Thanx smokey for the input. It's another bit of the puzzle. nice one sir. Cheers.


All times are GMT -7. The time now is 12:26 PM.

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