Default Duration of a video element

Hi,
when I set the defaultDuration property of a video element it hasnt no function. The video is playing to the end. Is that a bug or a miss implementation by me?

The defaultDuration property isn't meant to control the duration of playback.
Once the media is loaded, the actual duration is used rather than the defaultDuration.
Sounds like what you want might be subclips instead - something like this?
var resource:StreamingURLResource = new StreamingURLResource(REMOTE_STREAM);
resource.clipStartTime = 10;
resource.clipEndTime = 25;
return new VideoElement(resource);
And now for more than you may want to know about the defaultDuration property:
This property exists in case you want to set the duration for an element before it is loaded.
For example, in a serial composition you might want to play 3 videos, two which are content, and one which is a mid-roll ad.
Each video doesn't get it's duration set until it is loaded - but you want to have a scrubber bar UI element that allows you to move across from beginning of the 1st video to the end of the 3rd video. You don't get the total duration of all 3 videos until they are loaded, which happens "just in time", too late for your scrub bar.
So you can manually set the "defaultDuration" of the video. This manually set duration defines the duration that the element's TimeTrait will expose until the element's content is loaded. By manually pre-assigning a duration to each piece of media, the total composition duration can be calculated. This duration can be used by user interface controls (such as a scrub bar).
Hope that helps!
P.S. Ideas to improve the docs are VERY welcome. Here are the two places we talk about this feature now:
http://help.adobe.com/en_US/OSMF/1.0/AS3LR/org/osmf/elements/VideoElement.html#defaultDura tion
http://help.adobe.com/en_US/OSMF/1.0/Dev/WSc6f922f643dd2e6d4bc50c1312677f01098-8000.html

Similar Messages

  • Default duration on the timeline of Roll title.

    We are developing a title importer plugin for Premiere Pro CC.
    I want to set a default duration value when I put materials on the timeline.
    However, selector imGetInfo8 is called, if imFileInfoRec8->vidInfo.isRollCrawl=1 is returned, the value of General Setting will be effective.
    It is supplementary as follows:
    1.materials is a roll/crawl title.
    2.The roll/crawl title made by our software.
    3.roll/crawl title has duration.
    4.The roll/crawl title in the timeline already, I want to change the duration freely.
    5.It is not reflected although imFileInfoRec8->vidDuration was tried.
    Is it possible in Premiere Pro SDK ?
    Best Regards.

    Hi Zac,
    I really appreciate your reply.
    About "roll/crawl titles cannot be initialized with a non-default length".
    -> I Understand. I hope to become able to initialize it in the future.
       *I hope that a new type is added to the 'ImporterDurationType'.
        for example 'imNoDurationVidDurationDefault' ---> use supplied vid duration and duration on the timeline can be changed freely.
    Normal video does not seem to fit as a solution.
    Because I would like to adjust duration freely on the timeline.
    Regards,

  • Default Durations

    I regularly switch between 30 fps projects and 24 fps projects.  I'm getting a little tired of having to go into Preferences and switch the default duration for video transitions from 30 to 24 (and stills from 150 to 120) every time I switch a project type.  It's way past due for this to be a Project setting, not a Global setting.
    I just sent off a feature request.  I encourage others to do the same.
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

    So you would like for the Sequence FPS adjust the default Transition and Still Durations?
    While I do not switch FPS often, I find it easy to just Click-drag (I usually have my Info Panel open), when I need to make a change. I have a default still setting of 08 sec., as that is where most of my text titles come in. When I create a "Main Title," I want it to be 06 sec, instead of the 08, as there is less Text to read. A quick Click-drag gets me there. Same for Transitions. Regardless of the default, I often adjust mine to suit the mood. Especially with Dip-to-Black, I might extend those by several seconds, to fit the time/date change of the scenes. I also often add 02 sec. of Black Video, in between, when the change is longer.
    Perhaps a separate Panel for still & Transition Durations, and have it open, or docked in a useful Pane?
    With different FPS material, I guess that I can see the request.
    Hunt

  • What is the best way to for a plugin to wrap a video element in a parallel composition with a reference plugin that points to that Video Element?

    I have a basic reference element loaded as a plugin, which is able to retrieve information about, pause and play video elements while displaying its own overlay content as well.  What it's not currently doing, is automatically positioning itself to the same location and dimensions of the video element that it references.  For some reason, when I try using the layout API to set position and size in the video element metadata, this is not retrieved by the reference element (it returns a null value for the target video element's metadata).
    I wanted to try a different approach, specifically, creating a parallel composition that works as follows:
    1) When a video element is created in the factory, it is automatically wrapped in a parallel composition element along with a reference element, which is passed the video element as a target.
    2) The reference element sets its width and height with the width and height properties of the video element spatial trait and will listen for any changes to that width and height to adjust accordingly.
    3) Now that I think about it, the parallel composition should itself be a proxy for the video element, so other code in the player that moves, resizes, or otherwise alters the dispay of the video element, will if fact be adjusting the whole video element + reference element parallel composition.
    In other words, I want the reference element to be an overlay that is "locked" to the surface of any video element and follows it in size, position, display and even audio traits.
    Suggestions for the best way to approach this within the framework?

    Thanks Wei,
    With some more tweaking, I am able to get and use the layout metadata as you said!  Here is where my issue stands now:
    * My IMediaReferrer element can now look at the layout metadata of the target media element and copy those values, so it has the same width, height, x, and y  properties.  This is great!
    * However, particularly for RelativeLayoutFacet metadata, this is only fully useful if both the target media element and my IMediaReferrer element are in the same composition.  If they are in different compositions which are themselves placed differently, then even identical x and y values don't add up to the same position on the screen.
    So, my challenge is to figure out how to ensure that my IMediaReferrer element is placed in the same composition as the target media element.
    Again, the goal is to write a plugin that will have a reference to an underlying video, and will always have the same width, height, x, and y of the video it is overlaying.  This plugin should not require any additional coding in the player, but should take care of setting itself up as above automatically when loaded.
    There isn't any property on a media element which exposes the "parent" composition element that it is a part of, so I don't know how to get my IMediaReferrer to add itself to the same composition as the reference target automatically.  I'm not sure if it's possible to make my IMediaReferrer element extend ParallelElement and still load in a SWF Element as an overlay, and add that SWF Element and the target Media Element as children with identical layout metadata.
    Do you have any suggestions on how I should proceed?
    Thanks again!

  • Have sound but no picture when i click on the video.Elements 10 on windows 7.Can you help.

    Have sound but no picture when i click on the video.Elements 10 on windows 7.Can you help.

    Bigal.seamills
    What is the driver version for your NVIDIA GeForce GT640?
    There is a known issue specific to Premiere Elements 10 and NVIDIA GeForce. The Announcement at the top of this forum tells it all - detailed description of problem, references, fixes, and fix details.
    The following is a copy paste of that Announcement....
    If you are a Premiere Elements 10 user whose Windows computer uses a NVIDIA GeForce video card
    and you are experiencing Premiere Elements 10 display and/or unexplained program behavior, then your
    first line of troubleshooting needs to be rolling back the video card driver version instead of assuring that
    it is up to date.  
    Since October 2013 to the present, there have been a growing number of reports about display and
    unexplained workflow glitches specific to the Premiere Elements 10 user whose Windows computer
    has a NVIDIA GeForce video card. If this applies to you, then the “user to user” remedy is to roll back
    the NVIDIA GeForce video card driver as far as is necessary to get rid of the problems. The typical driver
    roll back has gone back as far as March – July 2013 in order to get a working Premiere Elements 10.
    Neither NVIDIA nor Adobe has taken any corrective action in this regard to date, and none is expected moving forward.   
    Since October 2013, the following thread has tried to keep up with the Premiere Elements 10 NVIDIA reports
    http://forums.adobe.com/thread/1317675  
    Older NVIDIA GeForce drivers can be found  NVIDIA Driver Downloads - Advanced Search   
    A February 2014 overview of the situation as well as how to use the older NVIDIA GeForce drivers for
    the driver roll back can be found  http://atr935.blogspot.com/2014/02/pe10-nvidia-video-card-roll-back.html
    Please refer to the following for the driver version history of your NVIDIA card
    Based on history, you should be using
    GeForce 320.18 Driver
    320.18
    May 23, 2013
    Please review and consider and then let us know the results.
    Thank you.
    ATR

  • Is it possible to control the duration of a video clip in IMovie? Speed

    Is it possible to control the duration of a video clip in IMovie? Speed
    it up/slow it down?

    I actually think the content gets smoother in faster mode. But maybe that's just my opinion.
    By the way, the fast/slow/reverse effect is pretty sensitive, i use it for my fight scenes in movies and I can only raise the bar one notch faster before it starts to look cheesy.

  • How to set the default duration of an activity?

    As far as I have been able to find, all iCal entries have a default duration of one hour.
    However, in 98% of the cases, I'd want the duration to be just 15 mins.
    How can I avoid changing this for almost every entry?

    Bob,
    I have found this terminal command to be helpful for creating events at the desired interval.

  • Hi, is there any option how I can edit duration of multiple video clips (not stills) in iMovie 11, lets say if I want them 2 seconds long? Many thanks for any advice... Tom

    Hi, is there any option how I can edit duration of multiple video clips (not stills) in iMovie 11, lets say if I want them 2 seconds long? Many thanks for any advice... Tom

    Yes.
    iMovie 11 tutorials:
    http://help.apple.com/imovie/
    http://www.apple.com/ilife/tutorials/#imovie
    and also these:
    http://www.kenstone.net/fcp_homepage/imovie_09_stone.html
    http://www.kenstone.net/fcp_homepage/imovie_09_stone.html#interface

  • Setting default program to open videos

    So I like to use VLC for videos but whenever I open a video (.avi) it opens in quicktime (and with the videos that I have quicktime doesn't work) so I have to right click and open with VLC. I couldn't figure out how to make VLC the default player for all videos. Could someone please tell me how to do this? Thanks in advance.

    Might want to try Try Flip4Mac. It plays avi and many other codecs through Quicktime.
    If you want to continue to use VLC as your default media player, Choose any avi file and "Get Info" (command-i) and under "Open With" choose VLC player, "Use this application to open all files like this". Then click on "Change All".
    -mj

  • Feature request: inline video element

    An inline video element (similar to the inlineGraphicElement) would be a tremendous enhancement to the already impressive text engine.
    I know that it is late in the game but would such feature be an option in the near future?
    Imagine a text document with a image clickable which loads a video in this place. This could become the next generation of reading news online with the video integrated right into the article.
    Thanks.

    ILGs as videos works today.  The source (or graphic property) of an ILG can refer to any swf.  If its a swf made from a video (or one with a timeline) it starts playing right away.  To have controls you'd need to roll your own.
    Richard

  • Default duration time for importing still images

    Hello all,
    Is there an easy way to change the default duration time for imported still images?
    I have thousands of images that I want to import to make a time elapsed movie. I would like for these images to have a duration of less than a second. I could do this individually, but it would take forever.
    Can the default duration time for imported images be changed?
    Thanks,
    Adam

    Hi
    Too long time I made anything serious in iMovie HD6 (altough a a very competent editor)
    (Took the FinalCut leap)
    As I remember (just tested) it - if photos are imported then it's a tedious labor
    to set duration - one at a time. No global function I can induce.
    BUT - I would put my photos into a separate folder in iPhoto so that they are easy
    to get in iMovie from audio/photo browser.
    Then I select (in iMovie) the first photo and double click on it to view it on canvas.
    Now I also get a small gray window where I can set size and duration.
    I select 01:00 (1 sec) in duration and Apply/Use.
    Then I selec the rest of the photos and drag them down to TimeLine after first
    photo. And they also get same duration of 01:00.
    Yours Bengt W

  • Stop quicktime player as default to view youtube video

    Hi,
    My Mac recently updated and whenever I open the video from youtube, the quicktime player will automaticly run the video and say the file not found.
    How to unselect quicktime player as default to view youtube video?
    Thanks
    Trang

    If you are opening a Youtube video from your desktop do the following:
    Highlight your file>File>Get Info>
    In the Get Info window, scroll down to "Open with:"
    Select the application you want to open the file with.
    Click the "Change All..." button if you want to "Use this application to open all documents like this.”
    ==========================
    Short cut:
    Control mouse click (right mouse click if available), Open With...-> Other
    Pick an app you want to open the video, and make sure to check Always Open With before hitting Open.
    Thanks to a brody for the above short cut.
    =============
    If you are viewing the video on YouTube's site, then the changes can be done through your browser Preferences to select a default video viewer.  However, you have not mentioned which browser you are using to view videos.

  • PE12 does not default to last project video edit setting

    My PE12 video edit setting is defaulting to HD1080i25 (UK region default). I need AVCHD1080p50.
    I have set a new project to AVCHD1080p50 and saved. Exit PE12 then re-start. It still creates new project at 1080i25.
    The documentation says PE12 should remember the last used setting.
    What is going wrong?
    thanks
    Audrie

    Audrie
    Allow me to go over some details to make sure that your details are not being misinterpreted by me or anyone else here.
    1. You open a new project in Premiere Elements 12 and you want to edit your 1080p50 video in it. Who is setting the project preset, you or the program?
    a. If you, are you using File Menu/New/Project Change Settings and Changing the project preset = PAL AVCHD AVCHD 1080p50, making sure that you have a check mark next to "Force Selected Project Setting on This Project" before you leave that area. Then, when you are back in the Expert workspace, are you using Add Media/Files and Folders/Project Assets for the 1080p50 import.
    or
    b. If the program, are you first using Add Media/Files and Folders/Project Assets from where you drag your 1080p50 to the Timeline? If this is the case, have you determined what the program has selected for the project preset based on the properties of the first drag to the Timeline? (See Edit Menu/Project Settings/General and the readings for Editing Mode, Timebase, Frame Rate, and Pixel Aspect Ratio, even if those fields look grayed out.
    The program does not always give the correct project preset. When it does not, it does not give you the closest to what you have. It gives its default, which is in your case, PAL AVCHD Full HD1080p25.
    Now here is the question...are you saying that, after you save close reopen your program, you discover somehow that you project is 1080p25 instead of 1080p50. If so, how are you making that determination at that time. Once the project preset is set by you or the program for a project, that project maintains that project preset for that particular project.
    So when you point to documentation that says
    The documentation says PE12 should remember the last used setting.
    Please give a link to such documentation. Premiere Elements 12 cannot even remember workspace in the dual monitor set up when the same project is saved closed reopened.
    A new project will always open to NTSC AVCHD Full 1080i30 or its PAL counterpart. After that
    a. You set the project preset based on the properties you know for your source.
    or
    b. The program sets the project preset based on the first drag of the source to the Timeline (if it cannot, then your project preset is for NTSC or PAL AVCHD Full 1080i30.
    http://atr935.blogspot.com/2013/04/pe11-accuracy-of-automatic-project.html
    http://atr935.blogspot.com/2013/04/pe11-dual-monitor-workflow-concerns.html
    Please review and consider.
    Thank you.
    ATR.

  • How to change default settings for a video generator?

    I'm using a video generator (Lyric Media's Pan Zoom Pro) many times in the same project, and have to change the default settings for each new instance of the generator that I create. I'm wondering if there's any way to change the default settings for a generator (i.e., length of clip, individual slider and checkbox settings in the "controls" tab) so that each new instance automatically has my customized settings when I first open it.
    Thanks.

    That works for the all the controls/filter settings. The clip length still defaults to 10 seconds, but that's OK, since the main thing I was looking for was to change the clip's internal settings. Thanks for your help

  • Why does Read from Text file default to array of 9 elements

    I am writing to a text file starting with a type def. cluster (control) of say 15 dbl numeric elements, that works fine I open the tab-delimited text file and all of the elements appear in the file.  However when I read from the same text file back to the same type def. cluster (indicator), the read from text file defaults to 9 elements?? Is there a way to control how many elements are read from the file.  This all works great when I initially use a cluster of 9 elements and read back to a cluster of 9 elements.
    Solved!
    Go to Solution.

    From the LabVIEW Help: http://zone.ni.com/reference/en-XX/help/371361G-01/glang/array_to_cluster/
    Converts a 1D array to a cluster of elements of the same type as the array elements. Right-click the function and select Cluster Size from the shortcut menu to set the number of elements in the cluster.
    The default is nine. The maximum cluster size for this function is 256.
    Aside: so, how many times has this question been asked over the years?

Maybe you are looking for