jit.gl poor video playback performance on my gaming PC, compared to Macbook Pro 13


    Mar 22 2018 | 2:26 pm
    I know it's not easy to trouble shoot video playback performance issue, but using the same example of jit.gl by Rob Ramires, on my gaming laptop I'm getting less than half of playback speed than compared to running same patch on my Macbook Pro 13 .
    For example, using the attached Patch, I'm getting about 20FPS on my PC gaming laptop, compared to about 50FPS on my Macbook Pro 13 both running Max 7.3.5

    • Mar 22 2018 | 2:29 pm
      here's my PC laptop specs and MAX version: { "version" : "Version 7.3.5 (be88c5a) (64-bit windows)", "platform" : "windows", "arch" : "x64", "osversion" : "Microsoft Windows 10 (build 16299), 64-bit", "samplerate" : 44100, "iovs" : 512, "sigvs" : 64, "scheduler_in_audio_interrupt" : "off", "audio_drivername" : "ad_mme", "audio_driver_subname" : "", "license" : "subscription", "machine_id" : "8d28ba79e179ea472c396a4bbc915bcd", "eventinterval" : 2, "overdrive" : "off", "mixerparallel" : "off", "mixercrossfade" : 0, "mixerlatency" : 30.0, "mixerramptime" : 10.0, "videoengine" : "viddll", "packages" : { "Max" : { "name" : "Max", "domain" : 1, "domains" : 1 } , "MSP" : { "name" : "MSP", "domain" : 1, "domains" : 1 } , "Jitter" : { "name" : "Jitter", "domain" : 1, "domains" : 1 } , "Max for Live" : { "name" : "Max for Live", "domain" : 1, "domains" : 1 } , "Gen" : { "name" : "Gen", "domain" : 1, "domains" : 1 } , "BEAP" : { "author" : "Matthew Davidson, Peter McCulloch", "description" : "BEAP (Berklee Electro Acoustic Pedagogy) Modular is a synthesis pedagogical tool.", "displayname" : "", "extends" : "", "extensible" : 1, "homepatcher" : "", "max_version_max" : "none", "max_version_min" : "6.1.10", "name" : "BEAP", "os" : { "macintosh" : { "platform" : [ "ia32", "x64" ], "min_version" : "none" } , "windows" : { "platform" : [ "ia32", "x64" ], "min_version" : "none" }
      } , "version" : "1.0.1", "website" : "https://github.com/stretta/BEAP/wiki", "domain" : 32, "domains" : 32 } , "max-mxj" : { "author" : "Cycling '74", "description" : "Max Java Support", "displayname" : "", "extends" : "", "extensible" : 0, "homepatcher" : "", "max_version_max" : "none", "max_version_min" : "7.2.5", "name" : "max-mxj", "os" : { "macintosh" : { "platform" : [ "ia32", "x64" ], "min_version" : "none" } , "windows" : { "platform" : [ "ia32", "x64" ], "min_version" : "none" }
      } , "version" : "7.2.5", "website" : "http://www.cycling74.com", "domain" : 32, "domains" : 32 } , "MaxDefaultContent" : { "name" : "MaxDefaultContent", "domain" : 32, "domains" : 32 } , "MaxIntroLessons" : { "name" : "MaxIntroLessons", "domain" : 32, "domains" : 32 } , "Mira" : { "author" : "Cycling '74", "description" : "Mira automatically connects to Max and mirrors your interface. This Mira Package update (version 1.2.0) is required for use of the Miraweb Package.", "displayname" : "", "extends" : "", "extensible" : 0, "homepatcher" : "", "max_version_max" : "none", "max_version_min" : "7.1", "name" : "Mira", "os" : { "macintosh" : { "platform" : [ "ia32", "x64" ], "min_version" : "none" } , "windows" : { "platform" : [ "ia32", "x64" ], "min_version" : "none" }
      } , "version" : "1.2.1", "website" : "https://cycling74.com", "domain" : 32, "domains" : 32 } , "VIDDLL" : { "author" : "Rob Ramirez", "description" : "The VIDDLL package installs a Jitter video engine adapter for jit.movie, allowing file playback via the VIDDLL library.\n\nVIDDLL is an interface and set of utilities for cross platform, high performance, random access video playback. VIDDLL is copyright Paul Bamborough and Julian Storer. \n\nThis software uses code of FFmpeg - http://ffmpeg.org - licensed under the LGPLv2.1 - http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html - and its source can be downloaded here - https://cycling74.s3.amazonaws.com/download/ffmpeg-3.0.2.tar.gz", "displayname" : "", "extends" : "", "extensible" : 0, "homepatcher" : "", "max_version_max" : "none", "max_version_min" : "7.3.4", "name" : "VIDDLL", "os" : { "macintosh" : { "platform" : [ "ia32", "x64" ], "min_version" : "10.9.x" } , "windows" : { "platform" : [ "ia32", "x64" ], "min_version" : "7" }
      } , "version" : "1.1.4", "website" : "https://cycling74.com", "domain" : 32, "domains" : 36 } , "Video and Graphics" : { "author" : "Cycling '74", "description" : "Video and Graphics programming tutorials", "displayname" : "", "extends" : "", "extensible" : 0, "homepatcher" : "", "max_version_max" : "none", "max_version_min" : "7.2", "name" : "Video and Graphics", "os" : { "macintosh" : { "platform" : [ "ia32", "x64" ], "min_version" : "none" } , "windows" : { "platform" : [ "ia32", "x64" ], "min_version" : "none" }
      } , "version" : "7.2.0", "website" : "http://www.cycling74.com", "domain" : 32, "domains" : 32 } , "Vizzie" : { "author" : "Cycling '74", "description" : "With VIZZIE, you just grab a few simple modules, connect them together and almost instantly have a VJ rig or interactive video work, complete with real-time effects.", "displayname" : "", "extends" : "", "extensible" : 1, "homepatcher" : "", "max_version_max" : "none", "max_version_min" : "6.1.10", "name" : "Vizzie", "os" : { "macintosh" : { "platform" : [ "ia32", "x64" ], "min_version" : "none" } , "windows" : { "platform" : [ "ia32", "x64" ], "min_version" : "none" }
      } , "version" : "1.0.2", "website" : "http://cycling74.com/2010/11/19/introducing-vizzie/", "domain" : 32, "domains" : 32 } , "Spout" : { "author" : "Lynn Jarvis, Bob Jarvis", "description" : "Jitter externals for sending OpenGL textures with Spout enabled applications. Windows only, for similar functionality on Mac, check out the Syphon package.", "displayname" : "", "extends" : "", "extensible" : 0, "homepatcher" : null, "max_version_max" : "none", "max_version_min" : "6.1", "name" : "Spout", "os" : { "macintosh" : { "platform" : [ ], "min_version" : "none" } , "windows" : { "platform" : [ "ia32", "x64" ], "min_version" : "7" }
      } , "version" : "2.0.5", "website" : "http://spout.zeal.co", "domain" : 4, "domains" : 4 }
      }
      }
    • Mar 22 2018 | 4:25 pm
      Does jit.world with @sync 0 @interval 2 make any difference?
    • Mar 22 2018 | 5:30 pm
      yeah, more than likely this is an unfortunate side effect of the difference in behavior of jit.world on windows vs mac. on mac jit.world defaults to @displaylink 1, causing the frame output to be triggered by the OS in sync with the refresh rate (not to be confused with @sync). however on windows this functionality is unavailable, so it defaults to an internal frame driver, with the timing controlled by the default values for @fps or @interval (both values being different representations of the same thing, the timing of the frame driver).
      just set @fps 60 (or whatever you wish) on the jit.world.
    • Mar 22 2018 | 6:24 pm
      Just tried changing the @fps and @interval values, it does not improve the FPS, and still hovering around 20fps running the example patch posted above.
      Any suggestions to try on PC to improve jit.world video performance? This will be improved in the future update of Jitter?
      I mean the whole point of moving to GPU based video handling in Jitter is to take advantage of the GPU power, but that does not seem to be the case on PCs currently. In my test my gaming laptop has much more powerful graphics card than my Macbook Pro 13, but performing less than half in playback (FPS).
    • Mar 22 2018 | 7:55 pm
      the biggest optimization to make in your patch is to delete the pwindow connected to the jit.grab, and to enable @output_texture on the jit.grab. depending on the output dims of your grabber, that could be what's slowing down your fps.
    • Mar 22 2018 | 8:32 pm
      i'm looking at this further, and I'm now able to reproduce the poor performance. I noticed this happened after a driver update (Nvidia GTX 1060, driver 391.24), previously I was getting 60 fps.
      i will investigate this a bit further, and try reverting the driver update to see if that fixes things on my end.
      it seems to be related to the shared contexts, if i delete those and just draw everything in the same main context window then the FPS is 60 again, as expected.
    • Mar 22 2018 | 8:59 pm
      VJ Fader, and you let me know your system specs including GPU versions? does your laptop have an integrated GPU as well as a discrete GPU?
    • Mar 23 2018 | 11:29 am
      Hi Rob, thanks for looking into this. Below is my PC laptop GPU specs: Windows 10 Intel HD Graphics 4600 (integrated) Nvidia GeForce GTX 980M (discrete)
    • Mar 23 2018 | 11:37 am
      Hi Fader I had a gaming PC (lenovo y700) which for some reason never used the Nvidia graphics card on default for the max program. Maybe it is a similar issue? If max was started with right click on the desktop icon, and then selecting "open with nvidia... " (cant remember the exact wording) all was ok, and i had the full graphics performance
      best, Constanze (we met at the unity ws in berlin)
    • Mar 29 2018 | 7:30 pm
      any news on this topic?
    • Mar 29 2018 | 8:34 pm
      i don't have a solution for this. I believe it's related to resource contention on windows that manifests when shared contexts are in use.
      i will continue looking at this, but if you confirm that removing your shared contexts gives you expected fps, that would be good to know. you may wish to look at using something like Spout to provide preview window functionality for now.
    • Mar 30 2018 | 9:27 pm
      to follow up a bit more, here is what i'm suggesting with regards to utilizing spout for preview windows:
      with this patch, sending to the SpoutReceiver demo app, I can maintain 60 fps. I also updated my nvidia driver to the latest version, and tweaked the nvidia 3d settings a bit. I was noticing that sync wasn't really working as expected, and there is a nvidia setting that enables this. there's also some other settings that might be relevant.
      however, as soon as i put another context in the patch, whether it's pwindow or window, shared or not, the framerate plummets. I've never seen this behavior before, however this is the first time I've had a real windows machine at my disposal. I wonder if this only affects laptops, or only affects laptops with integrated GPUs, or...
    • Apr 19 2018 | 11:59 am
      Hi Rob, thanks for spending time to put together this example, I tried it out, however I don't fully understand the reason for using spout as there is no preview windows inside this patch, see attached screenshot.
      Disabling the Shared context does not seem to make any difference on my end. I updated to latest GeForce drivers, running 64bit Max.
      Based on the original GL-mixer example, I removed the shared on-screen jit.pwindows and replaced with default ones, then connected it directly to the jit.gl.slab and seems the frame rate bounced back to 60. I also added @fps 60 to jit.world based on your example to force 60 instead of 30 max fps. I assumed it runs at 60 by default.
    • Apr 19 2018 | 12:23 pm
      Question is, the example patch I posted above might not be the best practice, as it is the old way of previewing video on-screen, and it is not as fast in terms of FPS, compared to using Shared context jit.pwindow on my Mac.
    • Apr 19 2018 | 4:49 pm
      hi vj fader, thanks much for following up with your findings. this is something we are actively looking at as we are getting more reports on this. again, this only seems to affect certain windows GPUs.
      the spout example was in case you wanted preview windows in your patch, you would use a spout-client as the preview window (e.g. the spout demo client app works perfectly as a preview window).
      to answer your question, yes, generally sending anything directly into a pwindow should be avoided, and using shared-context pwindows is the recommended approach for preview windows, HOWEVER in this case it appears to function better so that's great. I would recommend putting gates ahead of those pwindows, so you can enable and disable them as needed. you could also send through a qlim object and limit the fps you are previewing at.
    • Apr 21 2018 | 5:41 pm
      hi Rob, please let us know once the shared context for jit.pwindow is working on PCs, as it's intended.
      On a separate note, I've been seeing error messages running example patches of Syphon send and receive, posted in a thread here, https://cycling74.com/forums/syphon-giving-jit-gl-texture-error-disabling-transform-gl-error-stack-underflow
    • Jan 17 2019 | 9:10 pm
      Hi, I don't understand why my Mac Pro (Late 2013) doesn't run video processing more then 60 fps. Processor: 3,5 GHz 6-Core Intel Xeon E5 Graphics: AMD FirePro D500 3072 MB (x2) Thanks in advance.
    • Jan 18 2019 | 6:52 pm
      likely you have vsync enabled. if on max 8 simply set jit.world @sync 0 @interval 1. if on max 7, i think you must also set @displaylink 0