Getting the height and width of a videoclip
Richmond Mathewson
richmondmathewson at gmail.com
Sun Jan 17 12:07:43 EST 2010
On 17/01/2010 18:38, William Ziegler wrote:
> 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.
NOT REALLY:
1. You cannot (as far as I know) export videoClips or audioClips that
are embedded in a stack
(actually this is an old chestnut I have been banging on about for ages
and ages)
2. If you bung all your video files in a stack the RAM overhead will
skyrocket, and on machines
that don't have buckets of RAM everything will grind to an untimely halt.
What you could do (as I did when faced with a similar problem with about
200 videoClips about
7 years ago) is pop each videoClip into its own substack; that way all
your videoClips won't be clogging
up the RAM at once; as you need each clip you can load the substack,
play the thing, and then
close it - thereby offloading the videoClip from the RAM, freeing RAM
for the next one.
>
> Bill_______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list