-
transform_basic
This code runs _transform Wipe with duration=80 that specifies the progress time of second. The attributes of progstart, progend, and progcur are start, end, and current video progress value. The _snap command opens the default.png image as the first input of the transform. The second input of the transform is the first frame of the video.
package require media 1.0
set media_path "../Media/neat.mpg"
_window {title=Ladybug2000 Transform
border=windowless centre=480 320 auto=true}
_video "name=$media_path"
_snap {image=../Media/default.png}
_transform {name=Wipe duration=80
progstart=0.1 progend=0.9 progcur=0.1 order=normal}
_play
video_
window_
-
transform_list
This code shows how to traverse all the elements in a transform list. The first _snap is the default.png, the later snap is the last video frame. So in the next turn of the loop the transform inputs from the last frame of the video and the first frame of the current video.
package require media 1.0
# transform list
set ls {
"MetaCreations Fade White" "MetaCreations Glass Block"
"MetaCreations Water" "MetaCreations Wormhole"
"MetaCreations Ripple" "MetaCreations Liquid"
"MetaCreations Page Curl" "MetaCreations Center Curls"
"MetaCreations Curls" "MetaCreations Peel ABCD"
"MetaCreations Curtains" "MetaCreations Burn Film"
"MetaCreations Light Wipe" "MetaCreations Lens"
"MetaCreations Roll Down" "MetaCreations Color Fade"
"MetaCreations Flow Motion" "MetaCreations Vacuum"
"MetaCreations Grid" "MetaCreations Twister"
"MetaCreations Threshold" "MetaCreations Jaws"
}
_window "title=Ladybug2000 Transform List
border=normal auto=true centre=320 240"
_snap {image=../Media/default.png}
foreach e $ls {
_video {name=../Media/neat.mpg}
# test for each transform
_transform "name=$e duration=20 order=normal"
_play {from=0}
_snap
video_
}
window_
-
transform_internal
This code complete a transform and play from 0 to half of the video. Ane then snap another image, make transform, and play the rest of the video. Note: the second transform exchanges the order of the inputs.
package require media 1.0
set trans Wipe
set ls {../Media/neat.mpg}
_window "title=Ladybug2000 Transform List
border=normal auto=true centre=320 240"
_snap {image=../Media/default.png}
foreach e $ls {
_video "name=$e"
# do first transform
set half [expr {[?video length]/2}]
_transform "name=$trans duration=20 order=normal"
_play "from=0 to=$half"
# do second transform
_snap {image=../Media/default2.png}
_transform "name=$trans duration=20 order=exchange"
_play "from=[expr $half+1]"
video_
}
window_
-
transform_all
It shows transforms with a list of images. The order of transform is exchanged.
package require media 1.0
# set transform list
set ls {
"MetaCreations Fade White" "MetaCreations Glass Block"
"MetaCreations Water" "MetaCreations Wormhole"
"MetaCreations Ripple" "MetaCreations Liquid" }
# set image list
set imgls {"../Media/default.png" "../Media/default2.png"}
# open window
_window {title=Ladybug2000 Transform & Image List
border=windowless auto=true centre=320 240}
# open video
_video {name=../Media/neat.mpg}
foreach e $ls {
foreach i $imgls {
_snap "image=$i"
_transform "name=$e duration=40.0 order=exchange"
_play {from=0}
}
}
video_
window_
<< Examples: Playback
Examples: Advanced >>