A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: length of a video?

  1. #1
    Junior Member
    Join Date
    Aug 2003
    Posts
    10

    length of a video?

    Hi,

    I'm working on a video application using FMX2004 and have a question.
    I've just updated the video components and exporter... and red this in the help:

    "Video length information is included in encoded files; this information is automatically detected by the updated Media Components"

    Does this mean that we can read out the length (time) of the video?
    If so, how?

    If not, how the hell can we make decent streaming video if we don't know how much play-time we've loaded already?
    The standard media component fails on slower connections... and just starts playing afther a fixed amount of video is loaded.

    We can calculate KB/sec, and estimated time to load the video.
    But if we don't know how much play-time is loaded, we can never make a streaming video that starts playing when "play_time >= estimated_load_time"

    PJ

  2. #2
    Member
    Join Date
    Mar 2002
    Location
    Dayton, Ohio.
    Posts
    67

    Re: length of a video?

    Originally posted by e-phonic
    Hi,

    I'm working on a video application using FMX2004 and have a question.
    I've just updated the video components and exporter... and red this in the help:

    "Video length information is included in encoded files; this information is automatically detected by the updated Media Components"

    Does this mean that we can read out the length (time) of the video?
    If so, how?

    If not, how the hell can we make decent streaming video if we don't know how much play-time we've loaded already?
    The standard media component fails on slower connections... and just starts playing afther a fixed amount of video is loaded.

    We can calculate KB/sec, and estimated time to load the video.
    But if we don't know how much play-time is loaded, we can never make a streaming video that starts playing when "play_time >= estimated_load_time"

    PJ
    Sure. Create a Media object and give it the "FLV" path and source. Then use:
    Code:
    myMediaObject.totalTime
    If you know the total time and the myMediaObject.bytesTotal, then you can calculate the KB/sec.

  3. #3
    Junior Member
    Join Date
    Aug 2003
    Posts
    10
    Ah, now i get it.
    When exporting a from Flash, the 'totalTime' doesn't work.
    When exporting from i.e. QuickTime Pro, it works correctly.

    Thanks,
    PJ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center