2 Replies Latest reply on May 31, 2006 12:09 PM by bizpulse

    Flash Video and sub-titling

    b_pandey
      Hi Guys,

      Just like to know, if anyone has done any project with flash video with subtitling.

      I have around 20 videos of 5 mins each, I have to put the subtitling on the videos, the text for the sub titling is available in Excel sheets, I also have the time point for the subtitling.

      Is that possible to load the text dynamically from the excel sheet or any other format at the given time point in the flash video.

      Any tutorial available for the above topic? please provide me the link.

      Thanks in advance

      regards
        • 1. Re: Flash Video and sub-titling
          Level 7
          b_pandey,

          > Just like to know, if anyone has done any project with
          > flash video with subtitling.

          I haven't, but I've done projects in which video had to be synchronized
          with other events.

          > I have around 20 videos of 5 mins each, I have to put
          > the subtitling on the videos, the text for the sub titling is
          > available in Excel sheets, I also have the time point for
          > the subtitling.

          Excellent; you're all set!

          > Is that possible to load the text dynamically from the
          > excel sheet or any other format at the given time point
          > in the flash video.

          Not from an Excel sheet, no. But Flash can load text files and Flash
          can interact with databases via PHP, ASP, Cold Fusion, and the like. Given
          the time-sensitive nature of your project, however, I would put the
          subtitles right into the SWF itself.

          > Any tutorial available for the above topic? please
          > provide me the link.

          You'll want to read about "cue points" in the documentation and online.
          Here are two tutorials I found by Googling the terms "Flash video cue
          points" ...

          http://www.mediacollege.com/flash/video/cuepoints.html
          http://www.actionscript4designers.com/wmg3/cuepoints_briefly.html

          The second one involves screens, which you probably don't need, but the
          *concept* is, of course, the more important part. The first tutorial is
          more likely to help you.

          I would put all the subtitles into an array and use the cuePoint event,
          as described in tutorial #1, to populate the same dynamic text field over
          and over again based on strings in the array.

          What this means is that you'll want to familiarize yourself with the
          Array class. Start small, at first. Start a new FLA altogether and create
          nothing in it but an array.

          var subtitles:Array = new Array();

          Then push items into the array.

          subtitles.push("Hello, Ginger.");
          subtitles.push("Why, hello, Fred.");
          subtitles.push("Care to dance, Ginger?");
          subtitles.push("Oh, yes! Let's do!");

          Then use trace() to test your understanding of how to pull information
          again from the array.

          trace(subtitles[0]); // zero is the first element
          trace(subtitles[1]);
          trace(subtitles[2]);
          // etc.

          A for() loop can retrieve them all. Just substitute the numbers for a
          variable that represents numbers.

          for (n=0; n<subtitles.length; n++) {
          trace(subtitles[n]);
          }

          And so on. Looking up the "Array class" entry of the ActionScript
          Language Reference will teach you about the Array.length property used in
          the above sample. All class entries show the properties, methods, and
          events available to a given class. Properties are characteristics of the
          object, methods are things the object can do, and events are things the
          object can react to.

          Once you understand arrays, look up the FLVPlayback in the documentation
          and/or follow along in the above tutorials. Just realize that you'll use
          the concepts described to meet your own needs. If you prefer not to use the
          FLVPlayback Component -- and you may not -- look up the Video class, and
          also the NetStream and NetConnection classes to learn how to load FLVs
          without a Component (the NetStream class features an onCuePoint event). See
          also ...

          http://www.quip.net/blog/2006/flash/how-to-load-external-video


          David
          stiller (at) quip (dot) net
          Dev essays: http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: Flash Video and sub-titling
            bizpulse
            You probably already have your project completed by now, but just in case . . . Captionate software (captionate.com) is a good resource that allows you to inject captions into .flv files and supports Flash 8. The code suggestions that are given by "David Stiller are similar to what is provided in the Captionate help files.

            I've been able to get the captions working fine, but I'm having trouble adding the controller.
            If you successfully managed the subtitles using cue points directly in Flash and you were able to use the FLV playback component, could you provide a sample code? I'm sure many would benefit from your hard work and experience . THANKS!-