RGBMatrix Animated GIFs don't start from the beginning?

Ask a generic question about the usage of QLC+, not related to a particular operating system
Post Reply
User avatar
sandinak
Posts: 193
Joined: Mon Apr 03, 2017 5:40 pm
Location: Yorktown, VA
Real Name: Branson Matheson
Contact:

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 :)
janosvitok
Posts: 1330
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

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
User avatar
sandinak
Posts: 193
Joined: Mon Apr 03, 2017 5:40 pm
Location: Yorktown, VA
Real Name: Branson Matheson
Contact:

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.
janosvitok
Posts: 1330
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

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...
User avatar
SPOPATT
Posts: 106
Joined: Wed Mar 13, 2019 3:34 am
Real Name: Jacob

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.
User avatar
mcallegari
Posts: 4785
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

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
janosvitok
Posts: 1330
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

I guess the problem is that the QMovie is not rewound anywhere. E.g. RgbMatrix should reset QMovie position in preRun().
Post Reply