ffmpeg experts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bDok
    Confirmed User
    • Feb 2005
    • 1917

    #1

    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
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Warriors come out to plaAAaayyy!
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  • SmokeyTheBear
    ►SouthOfHeaven
    • Jun 2004
    • 28609

    #2
    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
    hatisblack at yahoo.com

    Comment

    • bDok
      Confirmed User
      • Feb 2005
      • 1917

      #3
      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.
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      Warriors come out to plaAAaayyy!
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

      Comment

      Working...