Jitter HAP Playback Issues
Hello everyone,
I'm working on a Max project in which I'm playing back gigabytes-big HAP files at variable speeds. I'm having a strange issues:
the video plays normally at the beginning, but by the end glitches out and stutters between what I think is the last/first frames of the video?
the video doesn't seem to loop despite the looping attribute being on. it only ever plays all the way through once.
the video seems to load only at patch load. whenever I try to replace the video with a different one, it doesn't seem to load.
I would ideally like to load potentially 50Gb-sized files, so it's imperative that I can make them loop correctly. If anyone has recommendations for order of operation + loading file into RAM somehow, I'd tremendously appreciate it. Attached is the patch I've been using to troubleshoot my issue.
Thank you so much!!
{
"boxes" : [ {
"box" : {
"maxclass" : "message",
"text" : "frame 0, bang",
"outlettype" : [ "" ],
"patching_rect" : [ 203.875, 173.9375, 83.0, 22.0 ],
"numinlets" : 2,
"id" : "obj-130",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "loadbang",
"outlettype" : [ "bang" ],
"patching_rect" : [ 90.875, 96.0, 58.0, 22.0 ],
"numinlets" : 1,
"id" : "obj-2",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "comment",
"text" : "video playback speed",
"patching_rect" : [ 184.4375, 96.0, 131.875, 20.0 ],
"numinlets" : 1,
"id" : "obj-16",
"numoutlets" : 0
}
}
, {
"box" : {
"maxclass" : "comment",
"text" : "2",
"patching_rect" : [ 154.25, 63.0, 25.0, 29.0 ],
"numinlets" : 1,
"textcolor" : [ 0.996078431372549, 0.0, 0.0, 1.0 ],
"id" : "obj-14",
"fontsize" : 20.0,
"numoutlets" : 0
}
}
, {
"box" : {
"maxclass" : "comment",
"text" : "1",
"patching_rect" : [ 359.375, 63.0, 25.0, 29.0 ],
"numinlets" : 1,
"textcolor" : [ 0.996078431372549, 0.0, 0.0, 1.0 ],
"id" : "obj-13",
"fontsize" : 20.0,
"numoutlets" : 0
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "30",
"outlettype" : [ "" ],
"patching_rect" : [ 208.875, 126.0, 29.5, 22.0 ],
"numinlets" : 2,
"id" : "obj-1",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "1",
"outlettype" : [ "" ],
"patching_rect" : [ 152.0, 96.0, 29.5, 22.0 ],
"numinlets" : 2,
"id" : "obj-6",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "stop",
"outlettype" : [ "" ],
"patching_rect" : [ 400.875, 94.0, 31.0, 22.0 ],
"numinlets" : 2,
"id" : "obj-12",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "start",
"outlettype" : [ "" ],
"patching_rect" : [ 355.875, 94.0, 32.0, 22.0 ],
"numinlets" : 2,
"id" : "obj-10",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "read",
"outlettype" : [ "" ],
"patching_rect" : [ 45.875, 160.9375, 33.0, 22.0 ],
"numinlets" : 2,
"id" : "obj-7",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "20",
"outlettype" : [ "" ],
"patching_rect" : [ 172.0, 126.0, 29.5, 22.0 ],
"numinlets" : 2,
"id" : "obj-5",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "10",
"outlettype" : [ "" ],
"patching_rect" : [ 137.0, 126.0, 29.5, 22.0 ],
"numinlets" : 2,
"id" : "obj-3",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "rate $1",
"outlettype" : [ "" ],
"patching_rect" : [ 150.875, 173.9375, 46.0, 22.0 ],
"numinlets" : 2,
"id" : "obj-62",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "loadbang",
"outlettype" : [ "bang" ],
"patching_rect" : [ 60.875, 248.9375, 58.0, 22.0 ],
"numinlets" : 1,
"id" : "obj-167",
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "toggle",
"outlettype" : [ "int" ],
"patching_rect" : [ 60.875, 278.9375, 24.0, 24.0 ],
"numinlets" : 1,
"id" : "obj-126",
"parameter_enable" : 0,
"numoutlets" : 1
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "jit.world",
"outlettype" : [ "", "bang", "" ],
"patching_rect" : [ 45.875, 308.9375, 53.0, 22.0 ],
"numinlets" : 1,
"id" : "obj-127",
"numoutlets" : 3,
"frozen_object_attributes" : {
"rect" : [ 882, 45, 1522, 525 ]
}
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "jit.movie @moviefile embodied-ice.avi @loop @vol 0 @engine viddll @output_texture 1",
"outlettype" : [ "jit_matrix", "" ],
"patching_rect" : [ 45.875, 218.9375, 473.0, 22.0 ],
"numinlets" : 1,
"id" : "obj-120",
"numoutlets" : 2
}
}
, {
"box" : {
"maxclass" : "panel",
"patching_rect" : [ 27.0, 36.0, 565.25, 305.9375 ],
"rounded" : 45,
"numinlets" : 1,
"background" : 1,
"id" : "obj-55",
"numoutlets" : 0,
"mode" : 0,
"angle" : 270.0,
"bgcolor" : [ 0.956862745098039, 0.823529411764706, 0.152941176470588, 0.5 ],
"proportion" : 0.5
}
}
],
"lines" : [ {
"patchline" : {
"source" : [ "obj-7", 0 ],
"destination" : [ "obj-120", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-62", 0 ],
"destination" : [ "obj-120", 0 ],
"midpoints" : [ 160.375, 213.96875, 55.375, 213.96875 ]
}
}
, {
"patchline" : {
"source" : [ "obj-6", 0 ],
"destination" : [ "obj-62", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-5", 0 ],
"destination" : [ "obj-62", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-3", 0 ],
"destination" : [ "obj-62", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-2", 0 ],
"destination" : [ "obj-6", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-167", 0 ],
"destination" : [ "obj-126", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-130", 0 ],
"destination" : [ "obj-120", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-126", 0 ],
"destination" : [ "obj-127", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-120", 0 ],
"destination" : [ "obj-127", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-12", 0 ],
"destination" : [ "obj-120", 0 ],
"midpoints" : [ 410.375, 212.0, 90.0, 212.0, 90.0, 204.0, 55.375, 204.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-10", 0 ],
"destination" : [ "obj-120", 0 ],
"midpoints" : [ 365.375, 212.0, 90.0, 212.0, 90.0, 204.0, 55.375, 204.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-1", 0 ],
"destination" : [ "obj-62", 0 ]
}
}
],
"appversion" : {
"major" : 8,
"minor" : 1,
"revision" : 0,
"architecture" : "x64",
"modernui" : 1
}
,
"styles" : [ {
"name" : "AudioStatus_Menu",
"default" : {
"bgfillcolor" : {
"type" : "color",
"color" : [ 0.294118, 0.313726, 0.337255, 1 ],
"color1" : [ 0.454902, 0.462745, 0.482353, 0.0 ],
"color2" : [ 0.290196, 0.309804, 0.301961, 1.0 ],
"angle" : 270.0,
"proportion" : 0.39,
"autogradient" : 0
}
}
,
"parentstyle" : "",
"multi" : 0
}
],
"classnamespace" : "box"
}Update: I believe I figured out the issue. It seems to me that Max is able to seamlessly loop HAP but not HAP Q. I don't know why this is so. I encoded using FFmpeg and can get it to play up to 40x forward/backward + loop ONLY with HAP. If anybody has information regarding why this is please share! Thank you!