Forums > Jitter

diskbased matrixset? or concurrent writing/reading of a huge movie?

May 21, 2007 | 1:18 pm

dear all!

i am looking for the most performant solution on building a system that can record and playback videodata at the same time. so there are two processes, one that is recording data from time to time, and a second process, which is playing constantly the already recorded data.

i tried recording the video as a quicktime movie via jit.qt.record, but this puts of course a lock on the file, so that a second jit.qt.movie can’t open the file.

i also tried storing the videodata as a sequence of single pictures (encoded as bmp or jpg), but this is quite slow (<25fps on my 2ghz intel core duo 2 laptop) and i am not sure about any filesystem limitations with the maximum amount of files in a directory.

using a matrixset isn’t the solution as the recorded data will be quite long (the installation is running over a couple days), so i guess it won’t fit into 2gigs of memory.

has anyone any experiences on that kind of problem?

thanks in advance

micha


May 21, 2007 | 5:57 pm

hi,

below are some elements of a patch that will maybe help you.

it was used for an installation that did a similar thing with audio
recordings, archiving and playing randomly the archived files.

it could work probably in connection with jit.qt.record or jit.matrix.

the idea is to record a series of numbered files, 1.mov, 2.mov… so
you avoid the length issue, and the previously recorded files can be
played without problem.

best,
>3f.PIXELVISION
@www.n3krozoft.com
@www.x-xx—x.info
@www.blutgift.de
!"
!"
!"
!"#$%&’()*+,-./

>dear all!
>
>i am looking for the most performant solution on building a system
>that can record and playback videodata at the same time. so there
>are two processes, one that is recording data from time to time, and
>a second process, which is playing constantly the already recorded
>data.
>
>i tried recording the video as a quicktime movie via jit.qt.record,
>but this puts of course a lock on the file, so that a second
>jit.qt.movie can’t open the file.
>
>i also tried storing the videodata as a sequence of single pictures
>(encoded as bmp or jpg), but this is quite slow (<25fps on my 2ghz
>intel core duo 2 laptop) and i am not sure about any filesystem
>limitations with the maximum amount of files in a directory.
>
>using a matrixset isn’t the solution as the recorded data will be
>quite long (the installation is running over a couple days), so i
>guess it won’t fit into 2gigs of memory.
>
>has anyone any experiences on that kind of problem?
>
>
>thanks in advance
>
>micha
>
>

here the patch:

max v2;
#N vpatcher 308 347 882 701;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 386 254 996 699;
#P button 314 44 15 0;
#P button 104 312 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 121 312 35 196617 del 55;
#P button 165 264 15 0;
#P newex 185 264 35 196617 del 10;
#P button 214 211 15 0;
#P message 214 230 26 196617 666;
#P button 214 169 15 0;
#P newex 214 191 54 196617 del 10000;
#P newex 191 142 83 196617 r forbidden-arch;
#P newex 79 174 27 196617 sel;
#P button 134 209 15 0;
#P newex 154 209 35 196617 del 10;
#P newex 79 262 83 196617 prepend set open;
#P message 79 209 52 196617 set $1.aif;
#P message 79 236 50 196617 56.aif;
#P message 79 291 99 196617 open 56.aif;
#P number 122 139 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 79 138 27 196617 + 1;
#P newex 79 108 55 196617 random 93;
#P number 124 74 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P comment 191 300 100 196617 sends the open file command to a sfplay
object — you can send read xx.mov to one or several jit.qt.movie
players;
#P fasten 21 0 2 0 319 66 84 66;
#P connect 2 0 3 0;
#P fasten 3 0 11 0 84 170 84 170;
#P fasten 11 1 7 0 101 200 84 200;
#P connect 7 0 6 0;
#P fasten 9 0 6 0 159 231 84 231;
#P connect 6 0 8 0;
#P connect 8 0 5 0;
#P connect 17 0 5 0;
#P fasten 12 0 11 1 196 166 101 166;
#P fasten 15 0 11 1 219 256 194 256 194 170 101 170;
#P connect 5 0 20 0;
#P connect 20 0 19 0;
#P fasten 3 0 4 0 84 161 114 161 114 130 127 130;
#P connect 1 0 2 1;
#P connect 7 0 10 0;
#P connect 10 0 9 0;
#P connect 8 0 18 0;
#P connect 18 0 17 0;
#P connect 12 0 14 0;
#P connect 14 0 13 0;
#P connect 13 0 16 0;
#P connect 16 0 15 0;
#P pop;
#P newobj 342 60 57 196617 p playhead;
#P newex 45 121 53 196617 gate 4;
#P newex 88 246 101 196617 buffer~ vox4 10000;
#P newex 73 223 101 196617 buffer~ vox3 10000;
#P newex 59 200 101 196617 buffer~ vox2 10000;
#P newex 45 179 101 196617 buffer~ vox1 10000;
#N vpatcher 20 74 612 657;
#P window setfont "Sans Serif" 9.;
#N counter;
#X flags 0 0;
#P newobj 439 195 66 196617 counter;
#P window linecount 2;
#P comment 382 167 100 196617 here the naming is random , but you could use a;
#P outlet 150 355 15 0;
#P window linecount 1;
#P newex 185 157 27 196617 + 1;
#P newex 185 134 55 196617 random 30;
#P inlet 191 54 15 0;
#P button 281 258 15 0;
#P newex 301 258 35 196617 del 10;
#P newex 85 191 83 196617 s forbidden-arch;
#P button 240 191 15 0;
#P newex 260 191 35 196617 del 10;
#P newex 185 258 88 196617 prepend set write;
#P message 185 191 52 196617 set $1.aif;
#P message 185 232 50 196617 5.aif;
#P message 185 287 99 196617 write 5.aif;
#P button 191 100 15 0;
#P window linecount 2;
#P comment 253 136 127 196617 30 = archived files are named 1.aif – 30.aif;
#P window linecount 1;
#P comment 59 57 130 196617 bang -> record a file;
#P window linecount 0;
#P comment 51 213 100 196617 prevents the file being currently
written from being played … has to be implemented at the
playhead…;
#P comment 382 136 100 196617 just use .mov instead of .aif …;
#P fasten 16 0 11 0 190 182 90 182;
#P connect 5 0 17 0;
#P connect 4 0 15 0;
#P connect 15 0 16 0;
#P connect 16 0 7 0;
#P connect 7 0 6 0;
#P fasten 9 0 6 0 265 227 190 227;
#P connect 6 0 8 0;
#P connect 8 0 5 0;
#P connect 12 0 5 0;
#P connect 14 0 4 0;
#P connect 7 0 10 0;
#P connect 10 0 9 0;
#P connect 8 0 13 0;
#P connect 13 0 12 0;
#P pop;
#P newobj 35 60 58 196617 p rekorder;
#P window linecount 4;
#P comment 183 171 100 196617 instead of this buffers you could use
jit.qt.recorder or jit.matrix…;
#P window linecount 3;
#P comment 96 59 100 196617 this is an automated naming system for
the recordings;
#P comment 101 122 100 196617 the "write" order is sent to one of the buffers;
#P comment 329 82 100 196617 this plays the archived files randomly;
#P connect 9 0 5 0;
#P connect 9 1 6 0;
#P connect 9 2 7 0;
#P connect 4 0 9 1;
#P connect 9 3 8 0;
#P pop;


May 21, 2007 | 7:14 pm

thanks!

from the tests i did just quickly, writing a mov with 250 frames and then starting a new file seems to be quite performant.

btw, i know that it was a quick answer, but your patch could use some [trigger b b] to get rid of that troublesome [del 10] object ;-).

all the best,

micha


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