Getting the height and width of a videoclip
William Ziegler
billziegler at mac.com
Sun Jan 17 11:38:44 EST 2010
I have a stack that allows teachers and parents to attach videos for
students to write sentences about. These videos are created with
various devices and thus have different heights and widths. I
currently store these videos in a default folder, and use a 'Player',
which I probe for the Height and Width to resize large clips to a set
maximum size.
Teachers have asked if I could package all the videos into each stack
to make it easier to send home and/or share lessons with other teachers.
I am having a hard time manipulating videoclips with the PLAY command
as compared to using a 'Player' with external video files.
Player example:
create player "myPlayer"
Set the filename of player "myPlayer" to fName
put the width of player "myPlayer" into realWidth
put the height of player "myPlayer" into realHeight
if the height of player "myPlayer" > 330 then
put 330/realHeight into theRatio
set the height of player "myPlayer" to theRatio *RealHeight
etc.
I know I can set the RATIO of stack based videoclips, but how can I
find their initial size in order to know if their image will be too
large?
Is my best option to store the clips in the stack, temporarily export
them to the hard drive when needed,use the file in a 'Player', then
delete the file when finished.
Bill
More information about the use-livecode
mailing list