3 Replies Latest reply on May 13, 2008 4:03 PM by slaingod

    FLV cut

    davidyn
      Hi all,

      Im dealing with new project in which I need to cut a part of an flv video. for example - 10 seconds from the second minute.

      Now, The bad news is that I have no idea on how to cut it and create new flv file.
      The good news is that every (really, every) idea will be helpful. :)

      Thanks in advence
      Davidyn
        • 1. Re: FLV cut
          slaingod Level 1
          You can use most editing software to do this, like Premiere, On2 Flix, or even Mencoder or FFMPEG.

          You could attempt to do this in Flex, by setting up an ENTER_FRAME event handler that checks the playheadtime and skips ahead when it reaches the seek point (or manually set cue points and seek ahead when you receive the cue point event).

          CAVEAT: FLV's are not arbitrarily seekable. You can only seek to keyframe points in your FLV. More keyframes increases the file size of your FLV. So you file would be 20% or so larger if you had a keyframe every .25 seconds to allow reasonable seek granularity.

          WORKAROUND: If your FLV has say a keyframe every 4 seconds, you can 2 VideoDisplay objects to simulate smooth seeking even with this large key frame gap. You would start the second VideoDisplay playing at the right offset for keyframe right before your seek location, and have it play in the background (not visible, no sound), and then swap the VideoDisplay's at the proper moment. You would

          Example: Keyframes every 4 seconds, you want to play 2 seconds from the beginning, then seek to second 7 (3 seconds into keyframe). You would need to
          1) Seek the hidden VideoDisplay to 4 seconds (keyframe), and start playing it 1 second before starting to play the beginning of the video (hidden, no sound).
          2) After one second, you would start playing the begining of the video.
          3) When you reached 2 seconds played, stop the visible VideoDisplay, and show/increase sound for the hidden on, which should now be at 4+2+1=7 seconds.
          • 2. Re: FLV cut
            davidyn Level 1
            slaingod, Thanks.

            if I understood it right this workaround will help me seek the point and play it but not actually cut it into a new file. am I correct?

            Davidyn
            • 3. FLV cut
              slaingod Level 1
              Yes, assuming you wanted to do a 'soft' cut you would use the technique I described. Otherwise, for 'hard' cuts where you actually end up with an flv that is one continuous video you would need to use some server side application for editing, like ffmpeg/mencoder, or do it on your desktop with On2/Adobe Premiere, etc., or use a web based solution like JumpCuts, Flektor, etc.