Forums > Jitter

jit.qt.movie & abstraction : incompatible ?

February 24, 2007 | 5:38 am

Hi list,

I’d noticed that an alphamask patch as it is described in the jitter tutorial 29 "UsingTheAlphaChannel" doen’t work properly if the source video (jit.qt.movie) comes from out of the patcher containing the jit.alphablend object & alphamask system (from a patcher or an abstraction).
Precisely, the subtitles doesn’t appear more than few ms .

Am I wrong ?

see :

max v2;
#N vpatcher 32 68 545 576;
#P window setfont "Sans Serif" 9.;
#P comment 108 314 352 196617 < - subtitles only works if the source (jit.qt.movie) comes from the patcher;
#P user jit.pwindow 59 336 82 62 0 1 0 0 1 0;
#P message 197 91 76 196617 read bball.mov;
#N vpatcher 479 134 1097 621;
#P origin 0 21;
#P window setfont Times 10.;
#P comment 358 391 194 1310730 it doesn’t work if source is out of this patch !!;
#B color 14;
#P comment 400 368 71 1310730 CLICK==>;
#B color 14;
#P window setfont "Fixedwidth Serif" 10.;
#P message 154 2 34 1441802 read;
#P inlet 26 55 15 0;
#P outlet 67 210 15 0;
#P window setfont Times 10.;
#P comment 277 140 125 1310730 Current time in movie (/100);
#P comment 682 206 32 1310730 Offset;
#P window linecount 2;
#P comment 634 94 126 1310730 Make your own subtitles (Return key displays the text);
#P window linecount 1;
#P comment 310 193 71 1310730 Subtitles on/off;
#P window setfont "Fixedwidth Serif" 10.;
#P number 716 205 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 634 153 68 1441802 route text;
#P message 716 228 83 1441802 moveto $1 200;
#P newex 675 252 83 1441802 prepend write;
#P newex 634 283 38 1441802 s lcd;
#P newex 634 179 134 1441802 t b s b clear;
#P user textedit 634 123 773 142 98444 22 10;
#P newex 381 167 53 1441802 loadbang;
#P toggle 381 192 15 0;
#P newex 381 216 60 1441802 gate 1 1;
#P newex 474 61 53 1441802 loadbang;
#P message 474 86 53 1441802 border 1;
#P newex 15 133 73 1441802 r alphamask;
#P newex 321 114 73 1441802 s alphamask;
#P user jit.pwindow 450 113 162 122 1 1 0 0 1 0;
#P newex 364 1 53 1441802 loadbang;
#P newex 193 161 140 1441802 jit.op @op !- @val 255;
#P newex 91 133 26 1441802 t b;
#P newex 91 161 79 1441802 jit.pack 4;
#P newex 91 105 102 1441802 jit.unpack 4;
#P newex 321 86 80 1441802 jit.rgb2luma;
#P newex 471 278 27 1441802 b;
#P newex 388 310 68 1441802 delay 1000;
#P newex 441 278 27 1441802 b;
#P newex 441 251 70 1441802 sel 21 40;
#P newex 561 419 38 1441802 s lcd;
#P newex 321 34 38 1441802 r lcd;
#P message 388 334 73 1441802 clear , bang;
#P window linecount 2;
#P message 488 308 192 1441802 clear , moveto 70 200 , write "Can’t You See I’m Busy?" , bang;
#P message 470 360 174 1441802 clear , moveto 90 200 , write "Leave Me Alone!" , bang;
#P window linecount 1;
#P newex 91 190 112 1441802 jit.alphablend;
#B color 5;
#P window linecount 2;
#P message 364 22 223 1441802 font times 18 , textface bold , brgb 255 255 255 , frgb 0 0 0 , clear , bang;
#P window linecount 1;
#P newex 321 61 140 1441802 jit.lcd 4 char 320 240;
#B color 5;
#P user jit.pwindow 17 237 322 242 0 1 0 0 1 0;
#P user panel 632 91 170 213;
#X brgb 255 128 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 14 233 329 250;
#X brgb 128 255 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 307 188 96 23;
#X brgb 128 255 128;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont Times 10.;
#P comment 107 2 27 1310730 Start;
#P comment 262 44 27 1310730 Read;
#P window setfont "Fixedwidth Serif" 10.;
#P newex 168 21 53 1441802 loadbang;
#P newex 91 43 34 1441802 t b;
#P message 168 44 94 1441802 read bball.mov;
#P toggle 91 1 15 0;
#P newex 91 21 53 1441802 metro 33;
#P newex 91 70 128 1441802 jit.qt.movie 320 240;
#P user panel 87 0 207 67;
#X brgb 255 255 128;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 346 357 211 65;
#X brgb 255 255 255;
#X frgb 235 70 13;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P fasten 16 0 13 0 96 230 23 230;
#P connect 16 0 51 0;
#P connect 4 0 3 0;
#P connect 3 0 6 0;
#P fasten 53 0 2 0 159 69 96 69;
#P fasten 5 0 2 0 173 65 96 65;
#P connect 6 0 2 0;
#P connect 52 0 27 0;
#P connect 2 0 27 0;
#P connect 27 0 29 0;
#P connect 29 0 28 0;
#P fasten 34 0 28 0 20 156 96 156;
#P connect 28 0 16 0;
#P connect 27 1 28 1;
#P connect 27 2 28 2;
#P connect 27 3 28 3;
#P connect 7 0 5 0;
#P fasten 2 0 30 0 96 97 198 97;
#P connect 52 0 30 0;
#P connect 30 0 16 1;
#P fasten 15 0 14 0 369 56 326 56;
#P connect 20 0 14 0;
#P connect 14 0 26 0;
#P connect 26 0 33 0;
#P connect 31 0 15 0;
#P connect 39 0 38 0;
#P connect 38 0 37 0;
#P fasten 23 0 24 0 446 303 393 303;
#P lcolor 4;
#P fasten 25 0 24 0 476 303 393 303;
#P lcolor 4;
#P connect 24 0 19 0;
#P fasten 37 0 22 0 386 242 446 242;
#P connect 22 0 23 0;
#P fasten 26 0 32 0 326 108 456 108;
#P fasten 35 0 32 0 479 108 456 108;
#P fasten 23 1 17 0 463 328 475 328;
#P connect 22 1 25 0;
#P connect 36 0 35 0;
#P connect 25 1 18 0;
#P fasten 19 0 21 0 393 415 566 415;
#P lcolor 4;
#P fasten 17 0 21 0 475 406 566 406;
#P fasten 18 0 21 0 493 352 566 352;
#P connect 40 0 45 0;
#P connect 45 0 41 0;
#P connect 41 0 42 0;
#P lcolor 9;
#P fasten 43 0 42 0 680 275 639 275;
#P lcolor 6;
#P fasten 44 0 42 0 721 249 639 249;
#P lcolor 13;
#P fasten 41 3 42 0 762 224 639 224;
#P lcolor 8;
#P connect 41 1 43 0;
#P lcolor 6;
#P connect 41 2 46 0;
#P lcolor 13;
#P connect 46 0 44 0;
#P lcolor 13;
#P pop;
#P newobj 60 309 43 196617 p tut29;
#P toggle 60 60 15 0;
#P message 135 103 29 196617 stop;
#P message 101 103 33 196617 start;
#P newex 101 83 41 196617 sel 1 0;
#P newex 60 83 37 196617 metro;
#P newex 60 125 162 196617 jit.qt.movie 160 120 autostart 0;
#P message 183 73 30 196617 read;
#P user jit.pwindow 95 167 82 62 0 1 0 0 1 0;
#P user panel 35 297 245 178;
#X brgb 255 255 255;
#X frgb 235 70 13;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 36 42 257 216;
#X brgb 255 255 255;
#X frgb 235 70 13;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 9 0 5 0;
#P fasten 11 0 4 0 202 124 65 124;
#P connect 5 0 4 0;
#P fasten 3 0 4 0 188 121 65 121;
#P fasten 7 0 4 0 106 119 65 119;
#P fasten 8 0 4 0 140 119 65 119;
#P connect 4 0 10 0;
#P connect 10 0 12 0;
#P fasten 4 0 2 0 65 161 101 161;
#P fasten 9 0 6 0 65 79 106 79;
#P connect 6 0 7 0;
#P fasten 6 1 8 0 121 101 140 101;
#P pop;

Derrick.


February 24, 2007 | 3:48 pm

Your problem is that your movie is 160 120, whereas in the example
everything is setup for 320 240

On 2/23/07 9:38 PM, "derrickgiscloux" wrote:

>
> Hi list,
>
> I’d noticed that an alphamask patch as it is described in the jitter tutorial
> 29 "UsingTheAlphaChannel" doen’t work properly if the source video
> (jit.qt.movie) comes from out of the patcher containing the jit.alphablend
> object & alphamask system (from a patcher or an abstraction).
> Precisely, the subtitles doesn’t appear more than few ms .
>
> Am I wrong ?
>
> see :
>
> max v2;
> #N vpatcher 32 68 545 576;
> #P window setfont "Sans Serif" 9.;
> #P comment 108 314 352 196617 < - subtitles only works if the source
> (jit.qt.movie) comes from the patcher;
> #P user jit.pwindow 59 336 82 62 0 1 0 0 1 0;
> #P message 197 91 76 196617 read bball.mov;
> #N vpatcher 479 134 1097 621;
> #P origin 0 21;
> #P window setfont Times 10.;
> #P comment 358 391 194 1310730 it doesn’t work if source is out of this patch
> !!;
> #B color 14;
> #P comment 400 368 71 1310730 CLICK==>;
> #B color 14;
> #P window setfont "Fixedwidth Serif" 10.;
> #P message 154 2 34 1441802 read;
> #P inlet 26 55 15 0;
> #P outlet 67 210 15 0;
> #P window setfont Times 10.;
> #P comment 277 140 125 1310730 Current time in movie (/100);
> #P comment 682 206 32 1310730 Offset;
> #P window linecount 2;
> #P comment 634 94 126 1310730 Make your own subtitles (Return key displays the
> text);
> #P window linecount 1;
> #P comment 310 193 71 1310730 Subtitles on/off;
> #P window setfont "Fixedwidth Serif" 10.;
> #P number 716 205 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 634 153 68 1441802 route text;
> #P message 716 228 83 1441802 moveto $1 200;
> #P newex 675 252 83 1441802 prepend write;
> #P newex 634 283 38 1441802 s lcd;
> #P newex 634 179 134 1441802 t b s b clear;
> #P user textedit 634 123 773 142 98444 22 10;
> #P newex 381 167 53 1441802 loadbang;
> #P toggle 381 192 15 0;
> #P newex 381 216 60 1441802 gate 1 1;
> #P newex 474 61 53 1441802 loadbang;
> #P message 474 86 53 1441802 border 1;
> #P newex 15 133 73 1441802 r alphamask;
> #P newex 321 114 73 1441802 s alphamask;
> #P user jit.pwindow 450 113 162 122 1 1 0 0 1 0;
> #P newex 364 1 53 1441802 loadbang;
> #P newex 193 161 140 1441802 jit.op @op !- @val 255;
> #P newex 91 133 26 1441802 t b;
> #P newex 91 161 79 1441802 jit.pack 4;
> #P newex 91 105 102 1441802 jit.unpack 4;
> #P newex 321 86 80 1441802 jit.rgb2luma;
> #P newex 471 278 27 1441802 b;
> #P newex 388 310 68 1441802 delay 1000;
> #P newex 441 278 27 1441802 b;
> #P newex 441 251 70 1441802 sel 21 40;
> #P newex 561 419 38 1441802 s lcd;
> #P newex 321 34 38 1441802 r lcd;
> #P message 388 334 73 1441802 clear , bang;
> #P window linecount 2;
> #P message 488 308 192 1441802 clear , moveto 70 200 , write "Can’t You See
> I’m Busy?" , bang;
> #P message 470 360 174 1441802 clear , moveto 90 200 , write "Leave Me
> Alone!" , bang;
> #P window linecount 1;
> #P newex 91 190 112 1441802 jit.alphablend;
> #B color 5;
> #P window linecount 2;
> #P message 364 22 223 1441802 font times 18 , textface bold , brgb 255 255
> 255 , frgb 0 0 0 , clear , bang;
> #P window linecount 1;
> #P newex 321 61 140 1441802 jit.lcd 4 char 320 240;
> #B color 5;
> #P user jit.pwindow 17 237 322 242 0 1 0 0 1 0;
> #P user panel 632 91 170 213;
> #X brgb 255 128 255;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P user panel 14 233 329 250;
> #X brgb 128 255 255;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P user panel 307 188 96 23;
> #X brgb 128 255 128;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P window setfont Times 10.;
> #P comment 107 2 27 1310730 Start;
> #P comment 262 44 27 1310730 Read;
> #P window setfont "Fixedwidth Serif" 10.;
> #P newex 168 21 53 1441802 loadbang;
> #P newex 91 43 34 1441802 t b;
> #P message 168 44 94 1441802 read bball.mov;
> #P toggle 91 1 15 0;
> #P newex 91 21 53 1441802 metro 33;
> #P newex 91 70 128 1441802 jit.qt.movie 320 240;
> #P user panel 87 0 207 67;
> #X brgb 255 255 128;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P user panel 346 357 211 65;
> #X brgb 255 255 255;
> #X frgb 235 70 13;
> #X border 2;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P fasten 16 0 13 0 96 230 23 230;
> #P connect 16 0 51 0;
> #P connect 4 0 3 0;
> #P connect 3 0 6 0;
> #P fasten 53 0 2 0 159 69 96 69;
> #P fasten 5 0 2 0 173 65 96 65;
> #P connect 6 0 2 0;
> #P connect 52 0 27 0;
> #P connect 2 0 27 0;
> #P connect 27 0 29 0;
> #P connect 29 0 28 0;
> #P fasten 34 0 28 0 20 156 96 156;
> #P connect 28 0 16 0;
> #P connect 27 1 28 1;
> #P connect 27 2 28 2;
> #P connect 27 3 28 3;
> #P connect 7 0 5 0;
> #P fasten 2 0 30 0 96 97 198 97;
> #P connect 52 0 30 0;
> #P connect 30 0 16 1;
> #P fasten 15 0 14 0 369 56 326 56;
> #P connect 20 0 14 0;
> #P connect 14 0 26 0;
> #P connect 26 0 33 0;
> #P connect 31 0 15 0;
> #P connect 39 0 38 0;
> #P connect 38 0 37 0;
> #P fasten 23 0 24 0 446 303 393 303;
> #P lcolor 4;
> #P fasten 25 0 24 0 476 303 393 303;
> #P lcolor 4;
> #P connect 24 0 19 0;
> #P fasten 37 0 22 0 386 242 446 242;
> #P connect 22 0 23 0;
> #P fasten 26 0 32 0 326 108 456 108;
> #P fasten 35 0 32 0 479 108 456 108;
> #P fasten 23 1 17 0 463 328 475 328;
> #P connect 22 1 25 0;
> #P connect 36 0 35 0;
> #P connect 25 1 18 0;
> #P fasten 19 0 21 0 393 415 566 415;
> #P lcolor 4;
> #P fasten 17 0 21 0 475 406 566 406;
> #P fasten 18 0 21 0 493 352 566 352;
> #P connect 40 0 45 0;
> #P connect 45 0 41 0;
> #P connect 41 0 42 0;
> #P lcolor 9;
> #P fasten 43 0 42 0 680 275 639 275;
> #P lcolor 6;
> #P fasten 44 0 42 0 721 249 639 249;
> #P lcolor 13;
> #P fasten 41 3 42 0 762 224 639 224;
> #P lcolor 8;
> #P connect 41 1 43 0;
> #P lcolor 6;
> #P connect 41 2 46 0;
> #P lcolor 13;
> #P connect 46 0 44 0;
> #P lcolor 13;
> #P pop;
> #P newobj 60 309 43 196617 p tut29;
> #P toggle 60 60 15 0;
> #P message 135 103 29 196617 stop;
> #P message 101 103 33 196617 start;
> #P newex 101 83 41 196617 sel 1 0;
> #P newex 60 83 37 196617 metro;
> #P newex 60 125 162 196617 jit.qt.movie 160 120 autostart 0;
> #P message 183 73 30 196617 read;
> #P user jit.pwindow 95 167 82 62 0 1 0 0 1 0;
> #P user panel 35 297 245 178;
> #X brgb 255 255 255;
> #X frgb 235 70 13;
> #X border 2;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P user panel 36 42 257 216;
> #X brgb 255 255 255;
> #X frgb 235 70 13;
> #X border 2;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P connect 9 0 5 0;
> #P fasten 11 0 4 0 202 124 65 124;
> #P connect 5 0 4 0;
> #P fasten 3 0 4 0 188 121 65 121;
> #P fasten 7 0 4 0 106 119 65 119;
> #P fasten 8 0 4 0 140 119 65 119;
> #P connect 4 0 10 0;
> #P connect 10 0 12 0;
> #P fasten 4 0 2 0 65 161 101 161;
> #P fasten 9 0 6 0 65 79 106 79;
> #P connect 6 0 7 0;
> #P fasten 6 1 8 0 121 101 140 101;
> #P pop;
>
>
>
>
> Derrick.


Viewing 2 posts - 1 through 2 (of 2 total)