Page 1 of 1

RGBMatrix Animated GIFs don't start from the beginning?

Posted: Sun Jan 05, 2025 10:04 pm
by sandinak
So I have:
  • A showfile we use to cue our show using a Cue List of Collections that are comprised of parts of the production. ( This requires specific local paths for fixtures and such, but you can get an idea from the file )
  • an RGB matrix made of 3x3 steps on stage that comprise 24px X 192px
  • a 2:30ish mp4 that I have generated from a site that creates an animation waveform of the music
  • a 30 second long animated gif that I am using across the step matrix
  • this is the waveform that's timed to the click-track we're using for the show ( the song in the mp4 )
I want to use this as a feature of the show .. so I:
  • my test was to create an audio item with the music, and a matrix item with the gif, and then a collection with both.
  • when I initiate the collection (from design or run-time) .. if I have looked at the RGBMatrix item before this, the animation in the GIF will start where I last saw it, rather than the beginning of the GIF.
  • If I just open the showfile .. and then run once .. things work fine, but if I use the matrix again it will restart from where it left off.
  • I can get sort of get around this by making multiple targets with the same file.. and opening them one at a time and not peeking :) however this isn't optimal .. and doesn't handle going "back" on a chase if someone mis-cue's the show.
So my ultimate question: Is there a way to "reset" and RGBMatrix that uses an animated gif to start at the beginning of the animation so that I can make sure it's sync'd to the music?

PS> I am on a Mac and also separated from the audio systems so using the RGB audio spectrum pattern really isn't an option :)

Re: RGBMatrix Animated GIFs don't start from the beginning?

Posted: Sun Jan 05, 2025 10:50 pm
by janosvitok
Yes, that's how it's implemented. It was a quick hack and I didn't think about this issue.

The needed change is most probably here:
https://github.com/mcallegari/qlcplus/b ... e.cpp#L227 - return proper number of steps = number of frames from QMovie https://doc.qt.io/qt-6/qmovie.html#frameCount
and here:
https://github.com/mcallegari/qlcplus/b ... e.cpp#L278 - jump to frame number "step" https://doc.qt.io/qt-6/qmovie.html#jumpToFrame

I don't have capacity to implement the change though.

Jano

Re: RGBMatrix Animated GIFs don't start from the beginning?

Posted: Sun Jan 05, 2025 11:27 pm
by sandinak
Thanks for the quick response by.. i’ll take a look when i get back from conf this week and see what i can do.

Re: RGBMatrix Animated GIFs don't start from the beginning?

Posted: Mon Jan 06, 2025 5:07 pm
by janosvitok
One thing I got messed up: Massimo wrote animated GIF support. My (older) version was much simpler: stack all frames side-to-side to one image, and QLC+ would play them. E. g. when you need matrix 10x7 and 6 frames, create image that is 60x7.

The good news is that it should still work and will start from start...

Re: RGBMatrix Animated GIFs don't start from the beginning?

Posted: Tue Jan 07, 2025 3:33 pm
by SPOPATT
I noticed this not too long ago but figured it was by design. It would be nice to have the option to start from the beginning. I have a pretty large matrix and it would be neat to use it with countdown timers.

Re: RGBMatrix Animated GIFs don't start from the beginning?

Posted: Tue Jan 07, 2025 3:41 pm
by mcallegari
How many frames are skipped? Is there a rule about it?
I used a Qt component so it's not code written from scratch.
A workaround would be to add some black frames at the beginning

Re: RGBMatrix Animated GIFs don't start from the beginning?

Posted: Tue Jan 07, 2025 6:07 pm
by janosvitok
I guess the problem is that the QMovie is not rewound anywhere. E.g. RgbMatrix should reset QMovie position in preRun().