0

Gifs playing fast
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Gifs playing fast

by Pepster on Tue May 04, 2021 2:19 pm

Hi,
The problem I'm having is that any gifs I'm uploading to the ESP8266 controller with FastLED_NeoMatrix libraries, the all playing at the same speed, even if the animation is slow still play fast, is any way to set the speed for the gifs.
Any help will be appreciate
Thanks

Pepster
 
Posts: 7
Joined: Wed Aug 26, 2020 3:41 pm

Re: Gifs playing fast

by blnkjns on Wed May 05, 2021 12:15 am

FastLED takes care of the bitbanging for the LED's. What library do you use to play the GIFs? Somehow the library used for that is ignoring the time stamps in the GIF per frame.

blnkjns
 
Posts: 630
Joined: Fri Oct 02, 2020 3:33 am

Re: Gifs playing fast

by Pepster on Wed May 05, 2021 11:29 am

Hi,
Thanks for the replay, the libraries I'm using is, https://github.com/marcmerlin/FastLED_NeoMatrix, I'm using the examples sketch espgifread.ino
is the a function that can be added to the sketch or the config file for the time stamps to be configured in some how?
Thanks

Pepster
 
Posts: 7
Joined: Wed Aug 26, 2020 3:41 pm

Re: Gifs playing fast

by blnkjns on Wed May 05, 2021 11:44 am

The object has a variable frameDelay. Try this:
Code: Select all | TOGGLE FULL SIZE
do {
      gifPlayer.drawFrame();
      result = gifPlayer.drawFrame();
      matrix->show();
      delay(gifPlayer.frameDelay);
       } while (result != ERROR_FINISHED);
Just worth a quick try.

blnkjns
 
Posts: 630
Joined: Fri Oct 02, 2020 3:33 am

Re: Gifs playing fast

by Pepster on Wed May 05, 2021 11:55 am

no changes, still plays same speed

Pepster
 
Posts: 7
Joined: Wed Aug 26, 2020 3:41 pm

Re: Gifs playing fast

by blnkjns on Wed May 05, 2021 3:48 pm

But you get no error? That is a good start.
Instead of delaying the value, try this:
Code: Select all | TOGGLE FULL SIZE
do {
      gifPlayer.drawFrame();
      result = gifPlayer.drawFrame();
      matrix->show();
      delay(200);
      Serial.println(gifPlayer.frameDelay);
       } while (result != ERROR_FINISHED);

And tell me what values show up in the Serial monitor. Maybe the numbers are whole seconds, delaying them in milliseconds would not make sense.

blnkjns
 
Posts: 630
Joined: Fri Oct 02, 2020 3:33 am

Re: Gifs playing fast

by Pepster on Thu May 06, 2021 3:06 pm

Yes I don't get errors, I did try with different delay setting with the code you send but still the same
when I open the Serial monitor no values I only get Processing gif, I put the cod in the gifplayer tab at the end of it, is it the right place?
I want you to know that coding is all new to me, I'm learning at the moment, if you open up the examples sketch espgifread.ino from the library you can see and maybe you can get better idea.
I really appreciate your help.

Pepster
 
Posts: 7
Joined: Wed Aug 26, 2020 3:41 pm

Re: Gifs playing fast

by Pepster on Thu May 06, 2021 4:45 pm

sorry I do get error when I put the code in, it say: expected unqualified-id before 'do',
I did figure out how to change the overall speed when play gifs, but I think to have Time Stump for each gif when you play them so they can be played at there own speed,
I think is something that need to be modify in the code of GifPlayer.h

Pepster
 
Posts: 7
Joined: Wed Aug 26, 2020 3:41 pm

Re: Gifs playing fast

by blnkjns on Sat May 08, 2021 8:49 am

Do you need to change GIF's often?
If not, you can manually write down the length of each frame in an array, and call that array from the delay.

blnkjns
 
Posts: 630
Joined: Fri Oct 02, 2020 3:33 am

Re: Gifs playing fast

by Pepster on Sat May 08, 2021 9:05 am

I play lots gifs, anyway I think I live as it is, to complicated for me.
Thanks for the effort.

Pepster
 
Posts: 7
Joined: Wed Aug 26, 2020 3:41 pm

Please be positive and constructive with your questions and comments.