Page 1 of 1
Video play on retina MacBook over-scaled
Posted: Sun Mar 02, 2014 1:06 am
by Ken3D
I'm trying to create a simple app that plays a video file. I'm using the 6.6 build of LiveCode. The QuickTime Player object and/or the "play videoClip" command both work great on my regular MacMini to play the video. But when I try the same stack app on a MacBook Pro with a retina display the video shows at what appears to be 200% normal size in width and height (400% in area). I can't find anything about this being a bug in these forums or elsewhere on LiveCode website.
I would have thought that if there would be a bug like this it would display the video at half size to match pixel-for-pixel on the retina display. Strange.
Any thoughts on this? A way to work around it? An alternative way to play a video?
Thanks!
Re: Video play on retina MacBook over-scaled
Posted: Sun Mar 02, 2014 3:18 am
by charms
Hi Ken3D,
Did you set the lockLoc (Lock size and position within the object inspector -> Size and Position) attribute? If you don't set it then the player size will be adjusted to the size of the video.
Example code:
Code: Select all
create player "Video"
set the width of player "Video" to the width of this card
set the height of player "Video" to the height of this card
set the top of player "Video" to 0
set the left of player "Video" to 0
set the lockLoc of player "Video" to true
set the showBorder of player "Video" to false
set the filename of player "Video" to "/path/to/file"
wait 1 tick
start player "Video"
Kind regards,
Chris
Re: Video play on retina MacBook over-scaled
Posted: Sun Mar 02, 2014 1:44 pm
by Klaus
Hi Ken,
I am not sure, but maybe this is realated to the new "pixelscale" property, which should make RETINA apps easily possible.
And since 6.6 is a very early DP, maybe this does not work correctly with QuickTime yet?
Can you check that porperty? Enter this in the message box:
answer the pixelscale
And check the "Release Notes" for -> Hi-DPI support for Windows 7/8 and OSX
Best
Klaus
Re: Video play on retina MacBook over-scaled
Posted: Sun Mar 02, 2014 5:44 pm
by Ken3D
Thanks Chris and Klaus.
The pixelscale reports back as just being 1. I can't seem to find the release notes you're referring to. Do you know where I could locate them?
Chris, I tried checking the "Lock size and position" box in the "Size & Position" section of the Property Inspector palette. It had no effect. The video still not only plays at the wrong scale. And if I didn't point it out before, the video also plays in the wrong position - the top-left corner of the video is offset down and the right from the corner of the video player.
I also tried using your sample code (thanks for writing that) and still no luck. Same problem. I didn't notice this time while testing all of these ideas that if I go into the Project Browser window and click on the video player object to select it the video suddenly restores to the proper scale and position. So, I tried adding a line to your code to select the player (select player "Video") and no go. This only works while the Edit pointer tool is selected and not the Run pointer tool.
I've also noticed occasional crashes while working LiveCode and experimenting with video. LiveCode simply locks up with the spinning beach ball from hell. I think the video player issue is connected to this - just a guess.
Thanks again guys. I'm still hoping to find a solution.
Ken
Re: Video play on retina MacBook over-scaled
Posted: Sun Mar 02, 2014 5:51 pm
by Klaus
Hi Ken,
Ken3D wrote:The pixelscale reports back as just being 1.
OK, that was just a quick guess.
Ken3D wrote:I can't seem to find the release notes you're referring to. Do you know where I could locate them?
In every version of Livecode you find them in Menu "Help" -> Release Notes
Or here a direct link:
http://downloads.livecode.com/livecode/ ... 0_dp_1.pdf
Best
Klaus
Re: Video play on retina MacBook over-scaled
Posted: Sun Mar 02, 2014 8:43 pm
by Ken3D
Well, this appears to be the solution. If usePixelScaling is set to false videos appear to play fine on a retina display. However, other elements are more pixelated and don't render for retina (text in controls and buttons for example). But I find that if I just use the command "set the usePixelScaling to false" just before I play the video those elements switch to being more pixelated but it's not that noticeable. I can then switch it back to true when I move on to other things. I think this is going to work!
Keep in mind everybody, the usePixelScaling property is set to true by default.
Thanks again Klaus. I think you've shown me the road to success on this project

Re: Video play on retina MacBook over-scaled
Posted: Sun Mar 02, 2014 11:18 pm
by Klaus
Hi Ken,
my pleasure!
Best
Klaus