1 Reply Latest reply on Dec 12, 2006 8:51 PM by Newsgroup_User

    Closed Captioning

    Level 7
      Hi,

      I'm going to be creating a program that plays a series of QuickTime movies
      and it needs to be able to toggle closed captioning on and off.

      I was wondering what is the best way to go about doing this.

      I had two ideas for this.

      First: I could create a third track on the QuickTime movie and use
      setTrackEnabled to turn it on and off.

      Or second I could use currentTime to update a text field that can be turned
      on and off.

      There are a lot of videos and I'll need to use this project as a template
      for other projects which will be doing the same thing, so I want to know
      what's the easiest and best way to go about doing this.

      I haven't used the close captioning track with QuickTime so I don't know how
      customizable or how easy it is to learn and do.

      I've used the currentTime option on another project but it was small and a
      one time deal, so I didn't bother with the QuickTime option.

      Thanks for any advice.

      Kevin


        • 1. Re: Closed Captioning
          Level 7
          I've never used the Quicktime method you're talking about, but I've done
          closed captioning of sorts with several videos. My videos haven't
          required every word to be typed out, but I often have bulleted lists or
          external graphics show up on screen at specific times in my videos. So
          the following code is based on holding on a frame until a specific
          second is reached in the video, and then advancing to the next frame
          where different text or a picture is shown. You could easily adapt
          this, though, to have the text in a particular text member change at the
          specific second you want.

          What you'll need to do if you use this is create a text member with the
          list of "cue points," given in seconds, one cue point per line. Place
          the first behavior in a frame at the first of your video, and the second
          at any frame you want to hold on.

          Hope this helps:

          ------------------------------------------------------
          -- The first frame script --
          global TimeChange, i

          on exitFrame me

          -- Set up a clean list to store time changes in based on cue points --
          TimeChange = []

          -- Fill the Time Change List with values --
          repeat with i = 1 to member("VideoMarkerList").text.word.count
          --cuePointList.count
          add TimeChange, ((the ticks) +
          (float(member("VideoMarkerList").text.word )*60))
          end repeat

          -- Set the starting cuepoint for the "TimeCheck" behavior to look at --
          set i = 1
          end

          ---------------------------------------------------------
          -- The second frame script --
          on exitFrame me

          global TimeChange, i

          if (the ticks)<TimeChange
          then
          go to the frame
          else
          if i < TimeChange.count then
          i = i + 1
          end if
          go to the frame + 1
          end if

          end