Maintaining Aspect ratio of video

4 views
Skip to first unread message

Amit

unread,
Oct 7, 2010, 3:53:28 AM10/7/10
to reops
Hi,

I have problem with maintaining aspect ratio of the video in reops
player. I have 4:6 video which I want to display as it is but the
problem is that if I use ScaleMode.NONE then since my player width and
height is 640 and 360 respectively but the video height and width are
greater so video does not come properly it goes out of media container
how can I resize my video based on player height maintaining the scale
of 4:6.

Regards,
Amit

turbidity

unread,
Oct 7, 2010, 11:34:25 AM10/7/10
to reops
Hi Amit,

If you set scaleMode to "letterbox" it will shrink the video to fit
one dimension to the size of the video container. This will leaves
empty space on either the sides or the top and bottom of the video.
This works fine when the bars are on the top and bottom of the video,
but I have encountered a bug where the video will be left-aligned when
the bars are on the left and right, leaving a large gap on the right.
This will be fixed in a future build of REOPS, but for now you can set
the horizontalAlign property of the layout metadata in the
_initMediaPlayer method to 'center' before you use the layout
metadata:

layoutMeta.scaleMode = _playerConfig.scaleMode;
layoutMeta.horizontalAlign = 'center';
layoutMeta.verticalAlign = 'center';
_mediaPlayerShell = new MediaContainer( null, layoutMeta );

Nils

AMIT KUMAR

unread,
Oct 8, 2010, 5:02:12 AM10/8/10
to re...@googlegroups.com
Thanks I was able to do it using LETTERBOX scalemode.

Regards,
Amit
Reply all
Reply to author
Forward
0 new messages