BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: EAB generating high number of frames when using Animation Converter.  (Read 7564 times)

sjasz

  • Newbie
  • *
  • Posts: 8
    • View Profile

I am using the Animation Converter in EAB to convert a small ainimated gif. The gif has only two frames but the output log and json file both say that it generated 100 frames (Number Of Frames : 100). When I convert other animations the number of frames equals the Frame Count setting in the UI. Is there any way to control the number of frames generated by the Animation Converter? Is there a reason the number of frames generated would not equal the number frames of the original gif?   
« Last Edit: February 07, 2024, 05:02:13 PM by sjasz »
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: EAB generating high number of frames when using Animation Converter.
« Reply #1 on: February 08, 2024, 11:38:51 AM »

Hi,

One reason can be where the animation itself is slower than the EVE frame rate, as the animation has many frames which are the same.

How long is one full cycle of your animation?

Best Regards, BRT Community

 
Logged

sjasz

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: EAB generating high number of frames when using Animation Converter.
« Reply #2 on: February 08, 2024, 04:00:31 PM »

The animation I am using has 2 frames at a rate of 2 frames per second, so 500ms per frame.

I found that if I let EAB assemble the animation using the individual frames, (by setting the input to the folder containing the individual frames instead of the actual file), that the resulting conversion is 2 frames. The size of the file is a bit smaller too, the 2 frame conversion is 3008 bytes and the 100 frame version is 3776 bytes.

I converted the bicycle animation that comes with the app note package and it has 13 frames and was converted as having 13 frames so that seems normal.

So don't know if there is an explanation but there is a work around.

The biggest snag for me was that I expected the second frame to be, well, the second frame, not realizing that the second frame created by the converter was actually a duplicate of the first frame. Hence, it appeared as though  CMD_ANIMFRAMERAM was not working.

To anyone dealing with this, check the json file for "num of frames" after you do the conversion because EAB may generate a different number of frames than the original animated gif you started with.
Logged

brtchip.truongly

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: EAB generating high number of frames when using Animation Converter.
« Reply #3 on: February 22, 2024, 08:54:23 AM »

Hello,

The frames are extracted from the GIF using FFMPEG internally. FFMPEG duplicates frames within timestamp gaps based on the output frame rate. Adding "-vsync 0" to the FFMPEG command will preserve the original number of frames in the GIF. This fix will be included in the next version, EAB v2.11.

Ref: https://www.reddit.com/r/ffmpeg/comments/cqwlwo/extracting_frames_from_gif/
Logged