Page 1 of 1

mobilcontrol and video aspect ratio

Posted: Sat Jan 25, 2014 9:35 am
by istech
Hi all,

I hope someone can help. I have a video I want to play on a mobile device which is 1024x768. When I play it on the device it plays with two black bars on the left and the right.

Now I can change the aspect ratio on vlc to fit my screen. Is there a way to do it with native player on android and iphone?

I have tried setting the native video player to the rec of the stack/button but with no success I still get the black bars.

Is there something I am missing and can someone point me in the right direction?

Thanks all

ps. the video is only 5 seconds and I could break the video into frames and run it as a animation and it should work. But looking for the solution to videos in mobile.

code using:
put specialFolderPath("engine") & "/video/myVideo.m4a" into tVidFile
mobileControlCreate "player", "myPlayer"
put the result into sPlayerID -- save the control id

mobileControlSet sPlayerID, "filename", tVidFile
mobileControlSet sPlayerID, "visible", true
mobileControlSet sPlayerID, "rect", "x,y,x2,y2"##have tried various methods here. But still black bars.
mobileControlSet sPlayerID, "showController", true
mobileControlSet sPlayerID, "preserveAspect", true##and here

Re: mobilcontrol and video aspect ratio

Posted: Sat Jan 25, 2014 11:23 pm
by Simon
Hi Istech,
Not really clear why you would change the aspect ratio unless it was incorrect to begin with. Everything will get short and fat. Oh well.
I would crop the top and bottom of the video to get it to fill the full screen. But then not all devices have the same ratio, so sooner or later the black bars will show up again. Oh well.

Simon

Re: mobilcontrol and video aspect ratio

Posted: Wed Jan 29, 2014 10:47 am
by istech
Thanks for the reply Simon.

In the end I ended up making a animation out of the video. It is easier for me to let livecode do the resizing.