41ch Audio Video( 5760x1200 @ 50fps) Player

    Sep 11 2021 | 12:41 pm
    Hi guys, I somewhat would like to get your inputs in creating an AV Player. I am trying to create a 2 layer video player with 41channel audio. The video consisted of a background layer and a foreground layer which has alpha channel. I need to display the video output to a screen which has a resolution of 5760x1200 pixels at 50 fps.
    I am currently using jit.qt.movie with the textured_output attribute set to 1 to have it processed on the GPU.
    My background video is 5760x1200 while the foreground video is 800x700 where I then adjust the positioning and the scaling on the jit.gl.videoplane @scale and @position attributes.
    For the audioplayer, I used the spat5.sfplay object to play the 41channel audio.
    On my current design, I have a separate audio and video files which I load and play. My issue is that they started to get out of sync after a few seconds despite my video and audio sampling rates were at 48kHz. I then checked the rendered video output and it looked to have dropped to around 20fps. Although when watching the actual footage the audio is lagging. Does this mean that I am short on resources ( eg CPU, GPU and RAM)?
    I was wondering whether there would be any pointers which I could try to help resolve my out-of-sync issues.
    Many thank's in advance.

    • Sep 13 2021 | 3:40 pm
      in general you want to sync the movie frame to the audio playback position. you can either control the movie playback entirely by this sync (e.g. autostart 0, and never send the start message), probably using the position_ms attribute for sfplay~ compatibility (or position attribute if using something like sync out of groove~). you want to trigger this sync position message via your jit.world frame bang.
      alternatively you can let the jit.movie playback via it's internal timer (e.g send the start message), and every second or so test the playback position with the audio playback position and trigger rate messages to speed up or slow down via some threshold value. depending on various factors you may get better performance with one approach vs the other.
    • Sep 21 2021 | 1:27 pm
      Thank you very much @Rob, it worked! Really appreciate for taking time to help out.
    • Sep 22 2021 | 3:11 pm
      Hi again Rob, I was wondering whether you would have any inputs to my patch as when I tried running it on a 50fps clip, the frame rate suffers.
      Many thank's in advance.