jit.qt.record + delay = random length issue


    Aug 13 2012 | 6:13 pm
    The code below does the following:
    After open the webcam and tick the metro then a cropped image appears in a jit.pwindow from the webcam (it's a HD webcam at the native 1280x720 set to crop the center as 720x720 res)
    Ao far so good.
    Then i hit the write message connected to jit.qt.record it starts recording a 6 seconds long video at 10 fps so the end result is 60 frames in 6 seconds.
    On may Mac. But for my current project i have to do this on a Vista laptop and the length is always between 5 and 9 seconds. it seems random and i almost never get 6 secs but the resolution (720x720) and the frame rate (10 fps) is always correct.
    what could be the problem?
    {
    "boxes" : [ {
    "box" : {
    "maxclass" : "message",
    "text" : "stop",
    "id" : "obj-15",
    "fontsize" : 12.0,
    "numinlets" : 2,
    "numoutlets" : 1,
    "patching_rect" : [ 643.0, 157.0, 33.0, 18.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "button",
    "id" : "obj-14",
    "numinlets" : 1,
    "numoutlets" : 1,
    "patching_rect" : [ 643.0, 298.0, 20.0, 20.0 ],
    "outlettype" : [ "bang" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "delay 6000",
    "id" : "obj-13",
    "fontsize" : 12.0,
    "numinlets" : 2,
    "numoutlets" : 1,
    "patching_rect" : [ 643.0, 261.0, 69.0, 20.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "bang" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "button",
    "id" : "obj-12",
    "numinlets" : 1,
    "numoutlets" : 1,
    "patching_rect" : [ 643.0, 224.0, 20.0, 20.0 ],
    "outlettype" : [ "bang" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "write funflip.mov 10. mjpega max",
    "id" : "obj-5",
    "fontsize" : 12.0,
    "numinlets" : 2,
    "numoutlets" : 1,
    "patching_rect" : [ 643.0, 58.0, 186.0, 18.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "jit.qt.record 720 720",
    "id" : "obj-4",
    "fontsize" : 12.0,
    "numinlets" : 1,
    "numoutlets" : 2,
    "patching_rect" : [ 643.0, 190.0, 117.0, 20.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "jit_matrix", "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "jit.pwindow",
    "id" : "obj-11",
    "presentation_rect" : [ 0.0, 0.0, 300.0, 300.0 ],
    "numinlets" : 1,
    "numoutlets" : 2,
    "patching_rect" : [ 8.0, 150.0, 300.0, 300.0 ],
    "outlettype" : [ "", "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "settings",
    "id" : "obj-10",
    "fontsize" : 12.0,
    "numinlets" : 2,
    "numoutlets" : 1,
    "patching_rect" : [ 170.0, 59.0, 52.0, 18.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "interp 1",
    "id" : "obj-9",
    "fontsize" : 12.0,
    "numinlets" : 2,
    "numoutlets" : 1,
    "patching_rect" : [ 112.0, 59.0, 51.0, 18.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "close",
    "id" : "obj-8",
    "fontsize" : 12.0,
    "numinlets" : 2,
    "numoutlets" : 1,
    "patching_rect" : [ 67.0, 59.0, 39.0, 18.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "open",
    "id" : "obj-7",
    "fontsize" : 12.0,
    "numinlets" : 2,
    "numoutlets" : 1,
    "patching_rect" : [ 22.0, 59.0, 37.0, 18.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "jit.matrix primary 4 char 1280 720 @usesrcdim 1 @srcdimstart 160 0 @srcdimend 1120 720",
    "id" : "obj-6",
    "fontsize" : 12.0,
    "numinlets" : 1,
    "numoutlets" : 2,
    "patching_rect" : [ 8.0, 118.0, 500.0, 20.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "jit_matrix", "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "jit.dx.grab 1280 720",
    "id" : "obj-3",
    "fontsize" : 12.0,
    "numinlets" : 1,
    "numoutlets" : 2,
    "patching_rect" : [ 8.0, 91.0, 116.0, 20.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "jit_matrix", "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "toggle",
    "id" : "obj-2",
    "numinlets" : 1,
    "numoutlets" : 1,
    "patching_rect" : [ 8.0, 6.0, 20.0, 20.0 ],
    "outlettype" : [ "int" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "qmetro 16",
    "id" : "obj-1",
    "fontsize" : 12.0,
    "numinlets" : 2,
    "numoutlets" : 1,
    "patching_rect" : [ 8.0, 32.0, 65.0, 20.0 ],
    "fontname" : "Arial",
    "outlettype" : [ "bang" ]
    }
    }
    ],
    "lines" : [ {
    "patchline" : {
    "source" : [ "obj-14", 0 ],
    "destination" : [ "obj-15", 0 ],
    "hidden" : 0,
    "midpoints" : [ 652.5, 330.0, 880.0, 330.0, 880.0, 88.0, 652.5, 88.0 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-3", 0 ],
    "destination" : [ "obj-6", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-6", 0 ],
    "destination" : [ "obj-11", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-10", 0 ],
    "destination" : [ "obj-3", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-9", 0 ],
    "destination" : [ "obj-3", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-7", 0 ],
    "destination" : [ "obj-3", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-8", 0 ],
    "destination" : [ "obj-3", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-5", 0 ],
    "destination" : [ "obj-4", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-5", 0 ],
    "destination" : [ "obj-12", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-12", 0 ],
    "destination" : [ "obj-13", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-13", 0 ],
    "destination" : [ "obj-14", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-15", 0 ],
    "destination" : [ "obj-4", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-6", 0 ],
    "destination" : [ "obj-4", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-1", 0 ],
    "destination" : [ "obj-3", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-2", 0 ],
    "destination" : [ "obj-1", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    ]
    }

    • Aug 13 2012 | 7:33 pm
      additional info:
      Max 5.1.9
      Latest QuickTime and Windows updates on Vista