How to change the display ratio of a video file in OSMF

Hi all
The video file I want to play has an incorrect width and height embedded in the video meta file (if you get the metadata of that video file, the width and height are incorrect). I'm now able to get the correct width and height, but I don't know how to apply them to OSMF. I'm using the MediaContainer for video display, the default behavior of that container keeps the original (which is incorrect) ratio (get from the video metadata) even I set the width and height. I'd appreciate if anyone can provide suggestion on how to do it.
Thanks.

You can modify the OSMF library's ScaleModeUtils class to do this, here's the path:
OSMF > org.osmf > layout > ScaleModeUtils.as .
My code to implement the 16:9 and 4:3 ratios.
                                                 case ScaleMode.STRETCH:
                                                  result
                                                            = new Point
                                                                      ( availableWidth
                                                                      , availableHeight
                                                  break;
                                        case ScaleMode.NONE:
                                                  result
                                                            = new Point
                                                                      ( intrinsicWidth          || availableWidth
                                                                      , intrinsicHeight          || availableHeight
                                                  break;
                                                 // ****custom begin
                                        case ScaleMode.FourToThree:
                                                  var availableRatio1:Number= availableWidth/ availableHeight;
                                                  if(availableRatio1 > 4/3){
                                                            result = new Point( availableHeight * 4/3, availableHeight);
                                                  }else{
                                                            result = new Point( availableWidth , availableWidth * 3/4);
                                                  break;
                                        case ScaleMode.SixteenToNine:
                                                  var availableRatio2:Number= availableWidth/ availableHeight;
                                                  if(availableRatio2 > 16/9){
                                                            result = new Point( availableHeight * 16/9, availableHeight);
                                                  }else{
                                                            result = new Point( availableWidth , availableWidth * 9/16);
                                                  break;
                                        // ****custom end
And then you can set the container's scalemode to apply a ratio:
layoutMetadata.scaleMode = ScaleMode.STRETCH;
Or
layoutMetadata.scaleMode = ScaleMode.FourToThree;

Similar Messages

  • I have three email accounts and want to know how to change the display order.

    I have three email accounts and want to know how to change the display order.

    Install this add on.
    https://addons.mozilla.org/en-US/thunderbird/addon/manually-sort-folders/?src=search

  • How to change the display of a spectrogra​m (backgroun​d color)

    how to change the display of a spectrogram (background color).
    I am using JFTA Adaptive spectrogram.  Need to change the color of the background.

    : how to change the display of a spectrogram (background color)
    Attachments:
    snap.docx ‏23 KB

  • How to change the Display Pattern for Decimal Fields dynamically

    hi all,
    Can any one help me how to change the display pattern for decimal fields dynamically???
    Currently I am using z,zzz,zzz,zz9.999 Display pattern for Quantity Field. If the value is blank it is displaying as 0.000 on the Screen. But I don't want this to be printed.
    Please help me how to solve this ASAP.
    Thanks,
    Prabhu

    Hi,
    Alternatively you can handle it in the context.
    In the context area, click on the quantity. In the bottom, click on the conditions tab, and put a condition
    <quan field> NE initial.
    So the field will not be printed if there is no value.
    Regards,
    Vidya Chowdhary A.

  • Camileo S10 - how to change the aspect ratio to 16:9

    Does anyone know how to change the aspect ratio when making movies with the arcsoft software included with the S10!!!!!
    Won't let me select 16:9 only 4:3!!!
    Not sure why as when you play the recording back directly through the telly it does it in 16:9 so I know it's being recorded in the right ratio!!

    You cannot change the aspect ratio because you record at full hd 1080. The S10 records in format 1440/1080 at full hd, wich means 4/3. The S10 is not capable to record in full hd at 1920/1080 (this is 16/9 full hd). It is simple:
    Camileo S10 record 1440 pixels on horizontal and 1080 pixels on vertical. The aspect ratio is 4/3.
    Answer for your question: if you want to see in 16/9 format use HD2 (720p) for recording.
    Bye.

  • How to change the display of Hierarchy in EVDRE

    I want to change the display of the hierarchy  as first child and then parent. instead of first parent then child.
    I mean when i see the report, I have to see the values for the members and then node total .
    How can i achieve this ??
    Thanks in advance
    Regards
    KK

    You may find the article I wrote for SAP Financials Expert online of interest since it explains this concept.  The link is given below, but you must be a subscriber to view the entire article.
    http://www.financialsexpertonline.com/article.cfm?session=&id=4558
    [Jeffrey Holdeman|http://wiki.sdn.sap.com/wiki/display/profile/Jeffrey+Holdeman]
    SAP BusinessObjects
    Enterprise Performance Management
    Regional Implementation Group

  • How to change the display name

    How do I change the display name I chose?

    Anyone came here, refer to this post.
    http://h30499.www3.hp.com/t5/Community-Feedback-Suggestions/change-of-display-name/m-p/6667672/highl...

  • How to change the value of variable in .bpel file

    Hi,
    How can i change the value of variable in .bpel file at time of deployment.
    Can it be possible with configplan.xml or deployment descriptor?
    Thanks
    Richa

    You cannot change the value of variable in .bpel file using config plan. If you want to change value at runtime , you can use Preference variable. Below is the blog to help you understand more.
    http://eelzinga.wordpress.com/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/
    Cheers,
    Durga
    Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

  • How do I change the aspect ratio of source video in the event library?

    I’ve imported video to iMovie 08 from a Canon Mini DV MD235 video camera. The video is recorded in widescreen format and plays back in widescreen when viewed from the iMovie event library (prior to doing any video editing). However, when I delete rejected frames from any particular video clip in the event library the video clip is automatically pillarboxed (i.e. switched from widescreen to 4:3 format). This squashes the video horizontally, stretches it vertically and leaves vertical black bars to the left and right of the video during playback. This automatic change in aspect ratio is occurring to the source video in the event library.
    I’d be grateful for any help / advice on how I can convert the edited clips back to widescreen aspect ratio, so they display in the *event library* as they did when first imported into iMovie.

    I don’t really want to clog up my hard drive with unwanted video and it’s easier to edit it from within iMovie.
    Have you considered manually importing only portions of the clips you actually plan to use? Or, if you must import the entire clip, have you considered trimming externally in an application like MPEG Streamclip which will allow you to set frame level in/out points and then perform a "Save As..." operation that stores the select range of frames to an MOV file container retaining the proper flag?
    Is there anything I can do from within iMovie to activate the 16:9 setting for these as yet unedited clips, so the same pillarboxing doesn’t happen?
    Not sure what you mean by "unedited" here. If the files have been destructively split, the flag is gone and there is nothing you can do about it but re-compress. If you mean they are imported but as of yet whole and still contain their flags, then you have two options. The first is to edit non-destrctively within iMovie '08 and the second would be to do the trimming externally.
    This second option is really fairly simple. Just close iMovie '08. Open MPEG Streamclip and load a clip you want to trim. Set your in and pout points, select the "Save As..." option, and store the files in the original Events folder with a new name. I would also recommend you perform these trims in their original time sequence so the "creation" date time groups (Finder attributes) are in time order also. When done with the loaded clip either delete it from the "Event" folder or move it to an archival location. When done with the last clip, close MPEG Streamclip, delete the Cache and Thumbnail folders from the Event folder, open iMovie '08 again, and go get a cup of coffee or tea while the files are re-thumbnailing. DO NOT DO THIS TO ANY EVENT WHICH CONTAINS FILES ALREADY USED IN ANY PROJECT. (I.e., this must be done before you start the actual project editing process.)
    It seems odd to me that iMovie is doing this.
    I suspect that as the application was originally written as an NLE, non-destructive, "by reference" application, the writers/updaters "overlooked" this facet when adding a "destructive" routine and did not provide for checks of this flag nor provide for copying it re-written segments.

  • How to Change the display format of Parameter form in HTML

    I have created a parameter form to allow user to choose the parameter values before printing the report. The parameter which will display in the web-browser has its own predefined format. How am i going to change this format? eg. changing the Background color, table background color, put in some pictures, set the alignment of the text and fields....
    Now I am able to change the header and footer. I can put in the company logo in the header by changing the report escape - Before form value and the footer in the report escape - after form value. How about the body which all the boilet text and fields will be display here? I need to change the alignment, the table background color and the text style and format also... where should i change this?
    Thanks

    Reports only provides limited formatting for the parameter form. In your case, you seem to need to take over greater control of the parameter form and you're halfway there.
    You've noted that you can control the header & footer values, what you need to do is extend those escapes to render the complete parameter form and remove everything from the actual reports parameter form. ie: Remove the labels/parameter form fields and render these directly in the HTML in the before parameter HTML escape. This allows you to insert any HTML you want - you probably want to start with the Reports generated HTML and move it into Frontpage to edit to your required format.
    What you are doing in this case is still using Reports url/submit mechanism and parameter form validation but bypassing Reports rendering of the parameter form.

  • How to change the displayed name of a DefaultMutableTreeNode

    Hi there...
    I created a class A extending DefaultMutableTreeNode and A's constructor is as follows:
    public A(UserObject object) {
    setUserObject(object);
    so my problem is if I wanna add such an instance of A, in a tree (as a node) the displayed name is very strange, something like:
    A@72834 or stuff...
    How can I change the name afterwards??
    are there any commands to do so?
    I have created object of class which contain some data. when I setUserObject to node then tree display's like A@72834 or stuff.
    Here I required object data whenever I get node. how can I solve this problrm.

    Override the toString method in the class of the user object.

  • How to change the display in standard program.."SAPLCKML_MR11_ALV"

    hi.... 
    one of the report of finance (SAPRCKMR11)  is calling this program SAPLCKML_MR11_ALV ..for the display...
    i had to add three more fields in the display...
    1) PO quantity    ekpo-menge
    2) PO value         ekpo-netwr
    3) INCOTERM     ekpo-inco1.
    i had try to modify the standard program by copying it...but didnt getting the result.
    please help me .... how to meet the requirement.....  if u can tell please also tell me where in the program i have to do the changes...
    any suggestion is appreciable..
    thanks

    Purchase Order Quantity and price......If you get an answer please advise.
    Thanks
    Justin

  • How to change the display order of Boolean Array

    Hi,
    I'm inputting an Hex number and want vi to display it as a Boolean array of indicators.
    The LSB appears to be on the top if the array goes up and down or, on the Left most while going right and left.
    As in Registers, the LSB is always on the Right most.
    How do I change the order of this display 180 degrees, so that the LSB is on the Right?
    Thanks
    Rafi

    Use the "reverse Array" from the array palette.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to change the display name for Gmail aliases?

    I have a Gmail account with multiple aliases. They look like this:
    Joe User <[email protected]> (Primary)
    Support <[email protected]> (Alias)
    Billing <[email protected]> (Alias)
    Works great. I'm trying to set up Apple Mail on my new MacBook to support the aliases as well. I am able to input the e-mail aliases, but the display names for all are 'Joe User' which defeats the purpose of having the aliases.
    I have to imagine I can do this. Can someone help me out?
    Regards,
    Dave

    Anyone came here, refer to this post.
    http://h30499.www3.hp.com/t5/Community-Feedback-Suggestions/change-of-display-name/m-p/6667672/highl...

  • How to change the display view of the records and modified into a row

    I have a SQL which can count the condition(Bad,Poor,Worse) in a day and group it into a month and displays as follows:
    YEARS MONTHS LV    COUNTVAL
    2009 Apr    Bad          5
    2009 Apr    Poor         3
    2009 Apr    Worse        2
    2009 Aug    Bad          3
    2009 Aug    Poor         2
    2009 Aug    Worse        5
    2009 Dec    Bad          5
    2009 Dec    Poor         2
    2009 Dec    Worse        3
    2009 Feb    Bad          5
    2009 Feb    Poor         3
    2009 Feb    Worse        2
    2009 Jan    Bad          3
    2009 Jan    Poor         3
    2009 Jan    Worse        4
    2009 Jul    Bad          2
    2009 Jul    Poor         3
    2009 Jul    Worse        5
    2009 Jun    Bad          1
    2009 Jun    Poor         4
    2009 Jun    Worse        5
    2009 Mar    Bad          4
    2009 Mar    Poor         4
    2009 Mar    Worse        2
    2009 May    Bad          3
    2009 May    Poor         5
    2009 May    Worse        2
    2009 Nov    Bad          1
    2009 Nov    Poor         5
    2009 Nov    Worse        4
    2009 Oct    Bad          5
    2009 Oct    Poor         3
    2009 Oct    Worse        2
    2009 Sep    Bad          2
    2009 Sep    Poor         4
    2009 Sep    Worse        4
    2010 Apr    Bad          6
    2010 Apr    Poor         1
    2010 Apr    Worse        3
    2010 Aug    Bad          3
    2010 Aug    Poor         2
    2010 Aug    Worse        5
    2010 Dec    Bad          4
    2010 Dec    Poor         2
    2010 Dec    Worse        4
    2010 Feb    Bad          4
    2010 Feb    Poor         3
    2010 Feb    Worse        3
    2010 Jan    Bad          6
    2010 Jan    Poor         3
    2010 Jan    Worse        1
    2010 Jul    Bad          2
    2010 Jul    Poor         4
    2010 Jul    Worse        4
    2010 Jun    Bad          4
    2010 Jun    Poor         3
    2010 Jun    Worse        3
    2010 Mar    Bad          6
    2010 Mar    Poor         1
    2010 Mar    Worse        3
    2010 May    Bad          4
    2010 May    Worse        6
    2010 Nov    Bad          5
    2010 Nov    Poor         2
    2010 Nov    Worse        3
    2010 Oct    Bad          3
    2010 Oct    Poor         3
    2010 Oct    Worse        4
    2010 Sep    Bad          3
    2010 Sep    Poor         4
    2010 Sep    Worse        3The SQL that I am using:
    select years, months, lv, countVal
    from
    select years, months, lv, count (lv) OVER (PARTITION BY years,months,lv) countVal  from
    SELECT x.years, x.months, x.days, x.lv
    FROM airtest,
    XMLTABLE ('$d/cdata/name' passing xmldoc as "d"
       COLUMNS
      years integer path 'year',
      months varchar(3) path 'month',
      days varchar(2) path 'day',
      lv varchar(5) path 'value'
      ) as X
      group by x.years, x.months, x.days, x.lv
      order by x.years, x.months, x.days
    group by years, months, lv, countVal
    order by years,monthsThe problem for now is how to modify it to become in this format??
    YEARS MONTHS   Bad    Poor     Worse
    2009 Apr        5        3        2
    2009 Aug        3        2        5
    2009 Dec        5        2        3
    .........After modified, It will become something like this.
    You can see the seperated data are group into a row in each month.
    Thanks for help!!

    Thanks for you suggestion!
    But it seems the order become quite strange after i used...
    Belows are the display....
    YEARS MONTHS BAD POOR WORSE SUM_BY SUM_PY SUM_WY
    2009 Jan      3    3     4     39     41     40
    2009 Feb      5    3     2     39     41     40
    2009 Dec      5    2     3     39     41     40
    2009 Nov      1    5     4     39     41     40
    2009 Oct      5    3     2     39     41     40
    2009 Sep      2    4     4     39     41     40
    2009 Aug      3    2     5     39     41     40
    2009 Jul      2    3     5     39     41     40
    2009 Jun      1    4     5     39     41     40
    2009 May      3    5     2     39     41     40
    2009 Apr      5    3     2     39     41     40
    2009 Mar      4    4     2     39     41     40
    2010 Jan      6    3     1     50     28     42
    2010 Nov      5    2     3     50     28     42
    2010 Oct      3    3     4     50     28     42
    2010 Sep      3    4     3     50     28     42
    2010 Aug      3    2     5     50     28     42
    2010 Dec      4    2     4     50     28     42
    2010 Jun      4    3     3     50     28     42
    2010 May      4    0     6     50     28     42
    2010 Apr      6    1     3     50     28     42
    2010 Mar      6    1     3     50     28     42
    2010 Feb      4    3     3     50     28     42
    2010 Jul      2    4     4     50     28     42
    TO_DATE ( years || months, 'yyyyMon', 'NLS_DATE_LANGUAGE=English') ymI have tried to added this statement both in the "SELECT" or end of the sql (as the position of yours "order by"), It does not work...

Maybe you are looking for

  • BW Error

    Does anyone know why I'm getting this error while running a report ? "Code execution has been interrupted"

  • Company Names Not Showing In Incoming Calls

    Hi there. Been loving my time with the Z10, but there is something that makes me crazy. I have a lot of contacts, and a lot of them with the same name. One of the ways to see who is calling me was in my old BB9320 the company name of the caller. In t

  • "Hyperlink Generation "

    Hi, I am generating an outbound extract file for iRecruitment.Among all the fields I have a Hyperlink field which is generated dynamically from an OA page. The scenario is: 1. A job searcher goes to the iRecritment page of the client and then Clicks

  • Photoshop Installation Issue

    I am trying to install PS on my laptop (Windows 8.1). Creative Cloud shows an install button associated with Photoshop, but when I click on it, Creative Cloud does nothing, all I get is the white window with no options showing.  I was able to downloa

  • Why do completed reminders still show up in the notification window?

    Even after the reminder is marked as completed, they still remain in the notification window.  The only way I've found to remove them is to kill of the reminder time on the task. Thanks!