1 Reply Latest reply on Nov 12, 2007 8:25 AM by joeflashTO

    Scrubbing Multiple FLV's


      I'm trying to knock together an online video editing tool, not unlike the ones on YouTube and Yahoo, basically where a user can upload their own videos, then edit and join them together. I've got the core application built, so the user can appear to edit the length of their videos down, then all the video info, duration, url, inpoint, outpoint etc are stored into an array for our server side software to use and render out a video sequence.

      Where I'm running into problems is when the user gets to the preview stage, this is before the final video is rendered so I need to use the video details array to string the flvs together into their sequence, so they can check it then go back and change if they need too. I've got the preview working so they can watch the sequence from start to finish no problem, but when a user tries to scrub the timeline, the entire preview breaks down where the videos join together.

      I've got vague ideas of how to get this to work (but nothing actually working for me yet), but just thought I'd post here to see if anyone out there has tackled building an application like this, and run into similar problems, or could suggest how I might tackle stringing the flvs together so that the timeline can be scrubbed?

        • 1. Re: Scrubbing Multiple FLV's
          joeflashTO Level 1
          I tried this once: you add all the total playback times of all the videos and configure your seek bar to that instead of to one video. Then, depending on where the seek button is on the seek bar, you do the following:
          1. determine which video shoudl be playing based on the position of the seek button
          2. within the "allotted" space on the seekbar for that video (think mini seek bars all chained together), determine where in that video playback should start.

          The only problem is, while this works in theory, in practice, even if your logic is infallible, the delay times of loading, buffering, and inaccuracies of seeking to a speciific point in a video to the millisecond, all make a total mess of this.

          The way it was finally solved, because we ran out of time to redo the video editor from scratch, was to drag and drop icons representing the individual videos onto the "edited" or composite video timeline, allowing for playback of individual videos, but not the overall cut, until the user has "published" the edit to the server. To publish the edit to the server, the application used FFMpeg on the backend to remder all videos into big video, which allowed for continuous playback of just one FLV, solving the seek issue.

          That's my recommendation, anyways. If you can get the first solution working for you, fantastic, but it's going to involve a lot of blood sweat and tears. The second solution worked best for the team I was working with at the time within the available time constraints.