-
Notifications
You must be signed in to change notification settings - Fork 2
/
of.movie-help.pd
201 lines (201 loc) · 6.48 KB
/
of.movie-help.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
#N canvas 329 32 842 700 12;
#X declare -lib ofelia;
#X obj 9 10 cnv 15 600 60 empty empty empty 20 12 0 14 -233017 -66577
0;
#X msg 95 245 get;
#X floatatom 244 354 5 0 0 0 - - -;
#X obj 467 42 declare -lib ofelia;
#X obj 30 93 of.draw;
#X msg 93 145 pause;
#X obj 170 144 openpanel;
#X obj 170 122 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X msg 170 173 open \$1;
#X msg 93 216 close;
#X msg 298 306 speed -1;
#X floatatom 298 138 5 0 0 0 - - -;
#X msg 298 162 position \$1;
#X obj 301 119 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X text 348 215 loop on;
#X msg 298 189 frame 30;
#X text 363 189 jump to frame...;
#X msg 171 203 update;
#X msg 93 122 play;
#X msg 93 192 stop;
#X msg 93 168 resume;
#X msg 298 283 speed 0.5;
#X text 192 122 open file...;
#X msg 537 100 position 0 \, speed 1 \, play;
#X obj 537 300 t a;
#X msg 298 260 speed 2;
#X text 358 259 double speed;
#X text 371 284 half speed;
#X text 368 306 play backward;
#X text 127 246 get infos;
#X text 250 396 <- get infos as list;
#X text 338 138 go to position from 0 to 1;
#X text 284 355 Go to frame... need to "pause" or "play" with some
codec (no audio), f 68;
#X text 383 160 (no audio);
#X msg 592 199 fullrange;
#X text 670 198 from 0 to totalframe;
#X text 563 129 Set a part to play (in frame);
#X msg 572 153 range 0 20;
#X obj 447 21 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 28 15 A simple movie player, f 22;
#X text 468 589 Note: the movie player might behave a bit differently
under different systems, f 39;
#X msg 298 214 loop 1;
#X text 348 238 loop off;
#X msg 298 237 loop 0;
#N canvas 834 326 305 230 Play_from...to...with_[line] 0;
#X obj 24 85 line;
#X floatatom 24 119 5 0 0 0 - - -;
#X text 65 120 go to frame...;
#X msg 24 54 0 \, 100 2000;
#X text 20 30 ex: play from frame 0 to 100 in 2sec;
#X connect 0 0 1 0;
#X connect 3 0 0 0;
#X restore 463 443 pd Play_from...to...with_[line];
#N canvas 530 102 646 542 Encoding_information_for_smooth_playback
0;
#X text 45 214 -t duration (input/output), f 75;
#X text 45 243 -to hh:mm:ss, f 75;
#X text 45 171 -ss hh:mm:ss (secs_to_skip) When used as an input option
(before -i) \, seeks in this input file to position., f 75;
#X text 45 312 -vf scale=640:480 (change resolution \, 640:-1 to keep
aspect ratio), f 75;
#X text 45 341 -preset slow -crf 18 (Very high quality), f 75;
#X text 45 361 -ar 44100 (audiorate), f 75;
#X text 46 485 -filter:v "setpts=0.5*PTS";
#X text 45 16 For smooth playback (frame by frame) \, set every frame
as keyframe in your video exporter. On Apple computer \, use Apple
ProRes if possible., f 72;
#X text 45 98 ffmpeg -i input.mp4 -preset slow -crf 18 -vcodec libx264
-x264-params keyint=1 output.mp4, f 75;
#X text 45 419 ffmpeg -ss hh:mm:ss -to hh:mm:ss -i input.mp4 -vf scale=640:480
-preset slow -crf 18 -vcodec libx264 -x264-params keyint=1 output.mp4
, f 75;
#X text 45 69 ffmpeg encoding with smooth framerate command:;
#X text 45 142 ffmpeg Cut a sequence command (before -i):;
#X text 45 282 ffmpeg resize:;
#X text 45 390 ffmpeg rxample:, f 75;
#X text 46 465 Play two times faster:;
#X restore 464 476 pd Encoding_information_for_smooth_playback;
#N canvas 577 303 386 409 loop_with_no_cut_with_[counter] 0;
#X obj 212 154 metro 40;
#X obj 212 123 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X floatatom 212 279 5 0 0 0 - - -;
#X text 61 18 using this may remove any cuts of the "play" and "loop
1" message, f 32;
#X obj 66 188 i, f 6;
#X obj 66 214 + 1, f 6;
#X obj 66 238 mod 99;
#X floatatom 66 283 5 0 0 0 - - -;
#X obj 66 154 metro 40;
#X obj 66 123 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 78 326 frame loop from 0 to 99;
#X obj 212 211 counter 0 99;
#X text 208 100 counter object:;
#X text 4 102 native PureData count:;
#X text 158 153 or;
#X connect 0 0 11 0;
#X connect 1 0 0 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 4 1;
#X connect 6 0 7 0;
#X connect 8 0 4 0;
#X connect 9 0 8 0;
#X connect 11 0 2 0;
#X restore 463 413 pd loop_with_no_cut_with_[counter];
#X obj 468 19 of.window 1 640 360;
#X obj 30 528 of.plane 640 360;
#X obj 30 453 of.ortho 1;
#X text 656 155 from frame 0 to 20;
#X msg 582 176 range 40 60;
#X text 676 177 from frame 40 to 60;
#X msg 300 88 volume 0.5;
#X text 384 88 sound volume 0-1;
#X text 284 368 encode every keyframe for smooth playback, f 68;
#X text 467 558 https://codecguide.com/, f 52;
#X text 467 518 Note: Windows user might need to install the free "k-lite
codec pack" to read movies:, f 52;
#X msg 93 92 open data/video.mp4;
#X text 28 47 Arguments: filename \, autostart \, loopmode \, speed
;
#X obj 30 379 of.movie data/video.mp4, f 31;
#X text 725 291 change anchor point, f 13;
#X msg 599 267 draw 0 0;
#X text 533 73 ex:play from start at speed 1;
#X text 597 225 draw: active \, X \, Y \, width \, height;
#X text 662 268 draw: inactive;
#X msg 598 292 anchorpoint 50 50;
#X msg 599 243 draw 1 0 0 100 100;
#X obj 49 133 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 45 114 play;
#N canvas 671 297 450 363 get_infos 0;
#X obj 100 20 inlet;
#X floatatom 123 110 5 0 0 0 isplaying - -;
#X floatatom 146 133 5 0 0 0 currentframe - -;
#X floatatom 193 185 5 0 0 0 pixel_width - -;
#X floatatom 216 205 5 0 0 0 pixel_height - -;
#X floatatom 169 160 5 0 0 0 totalframes - -;
#X floatatom 100 83 5 0 0 0 isloaded - -;
#X floatatom 262 250 5 0 0 0 duration - -;
#X floatatom 286 272 5 0 0 0 frame/sec - -;
#X obj 100 59 unpack 0 0 0 0 0 0 0 0 0, f 27;
#X floatatom 239 228 5 0 0 0 ratio - -;
#X connect 0 0 9 0;
#X connect 9 0 6 0;
#X connect 9 1 1 0;
#X connect 9 2 2 0;
#X connect 9 3 5 0;
#X connect 9 4 3 0;
#X connect 9 5 4 0;
#X connect 9 6 10 0;
#X connect 9 7 7 0;
#X connect 9 8 8 0;
#X restore 244 418 pd get_infos;
#X text 30 555 draw video on a plane;
#X text 111 455 ortho = no perspective;
#X connect 1 0 60 0;
#X connect 2 0 60 1;
#X connect 4 0 60 0;
#X connect 5 0 60 0;
#X connect 6 0 8 0;
#X connect 7 0 6 0;
#X connect 8 0 60 0;
#X connect 9 0 60 0;
#X connect 10 0 60 0;
#X connect 11 0 12 0;
#X connect 12 0 60 0;
#X connect 13 0 11 0;
#X connect 15 0 60 0;
#X connect 18 0 60 0;
#X connect 19 0 60 0;
#X connect 20 0 60 0;
#X connect 21 0 60 0;
#X connect 23 0 24 0;
#X connect 24 0 60 0;
#X connect 25 0 60 0;
#X connect 34 0 24 0;
#X connect 37 0 24 0;
#X connect 38 0 47 0;
#X connect 41 0 60 0;
#X connect 43 0 60 0;
#X connect 49 0 48 0;
#X connect 51 0 24 0;
#X connect 53 0 60 0;
#X connect 58 0 60 0;
#X connect 60 0 49 0;
#X connect 60 1 70 0;
#X connect 62 0 24 0;
#X connect 66 0 24 0;
#X connect 67 0 24 0;
#X connect 68 0 60 0;