File tree Expand file tree Collapse file tree 4 files changed +9
-15
lines changed
processing_app/library/video/movie Expand file tree Collapse file tree 4 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 66# using rectangles as pixels by reading the values stored
77# in the current video frame pixels array.
88#
9-
109load_library :video
1110include_package 'processing.video'
1211
1716def setup
1817 sketch_title 'Pixelate'
1918 no_stroke
20- @mov = Movie . new ( self , 'transit.mov' )
19+ @mov = Movie . new ( self , data_path ( 'transit.mov' ) )
2120 @num_pixels_wide = width / BLOCK_SIZE
2221 @num_pixels_high = height / BLOCK_SIZE
2322 @movie_color = [ ]
@@ -46,6 +45,5 @@ def draw
4645end
4746
4847def settings
49- size 640 , 360 , FX2D
48+ size 640 , 360 , P2D
5049end
51-
Original file line number Diff line number Diff line change 77# underlying gstreamer plugins used by gsvideo. For example, the
88# theora codec does support backward playback, but not so the H264
99# codec, at least in its current version.
10- #
11- #
1210load_library :video , :video_event
1311include_package 'processing.video'
1412
@@ -19,7 +17,7 @@ def setup
1917 background ( 0 )
2018 @speed_set = false
2119 @once = true
22- @mov = Movie . new ( self , 'transit.mkv' )
20+ @mov = Movie . new ( self , data_path ( 'transit.mkv' ) )
2321 mov . play
2422end
2523
@@ -46,6 +44,5 @@ def movieEvent(m)
4644end
4745
4846def settings
49- size 640 , 360 , FX2D
47+ size 640 , 360
5048end
51-
Original file line number Diff line number Diff line change 1313def setup
1414 sketch_title 'Scratch'
1515 background ( 0 )
16- @mov = Movie . new ( self , 'transit.mov' )
16+ @mov = Movie . new ( self , data_path ( 'transit.mov' ) )
1717 # Pausing the video at the first frame.
1818 mov . play
1919 mov . jump 0
@@ -24,7 +24,7 @@ def draw
2424 begin
2525 mov . read
2626 # A new time position is calculated using the current mouse location:
27- t = mov . duration * map1d ( mouse_x , ( 0 .. width ) , ( 0 .. 1.0 ) )
27+ t = mov . duration * norm ( mouse_x , 0 , width )
2828 mov . play
2929 mov . jump ( t )
3030 mov . pause
@@ -33,5 +33,5 @@ def draw
3333end
3434
3535def settings
36- size 640 , 360 , FX2D
36+ size 640 , 360
3737end
Original file line number Diff line number Diff line change 33# drag mouse ip screen to decrease speed
44# Uses the Movie.speed method to change
55# the playback speed.
6-
76load_libraries :video , :video_event
87include_package 'processing.video'
98
1211def setup
1312 sketch_title 'Speed'
1413 background ( 0 )
15- @mov = Movie . new ( self , 'transit.mov' )
14+ @mov = Movie . new ( self , data_path ( 'transit.mov' ) )
1615 mov . loop
1716end
1817
@@ -31,5 +30,5 @@ def movieEvent(m)
3130end
3231
3332def settings
34- size 640 , 360 , FX2D
33+ size 640 , 360
3534end
You can’t perform that action at this time.
0 commit comments