When attempting to 'play' a sequential image .zip (as opposed to a .gif) on kivy through Rasberry Pi (PipaOS / Raspbian) with the kivy.uix.image include, the first 20 or so frames seem to play with no issue, then the rest cut out.
The remaining sequential image frames display as a plain black coloured canvas, however the frame duration still seems to be in effect. (sequential image would normally take ~3 seconds to loop, image goes black after ~0.8 seconds, remains black for the next 2.2 seconds and restarts the loop.)
Code to use for testing:
''' to be saved as main.py '''
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.image import Image
from kivy.uix.boxlayout import BoxLayout
Builder.load_string('''
<Interface>:
orientation: 'vertical'
Image:
source: 'loader_anim.zip'
anim_delay: 0.05
''')
class Interface(BoxLayout):
pass
class SettingsApp(App):
def build(self):
return Interface()
SettingsApp().run()
''' save this [https://github.com/LovelyHorse/prometheus/blob/master/assets/loader_anim.zip?raw=true] file in the same directory as "loader_anim.zip", and run main.py '''
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I should also mention that the same .zip displays perfectly on windows.
+1 on this. Tested it with a different zip as well, same issue.
For people still looking at this thread, this is probably not a Kivy specific problem. I had the same issue, and ended up solving it by upping the memory dedicated to the GPU in my Raspberry Pi. It seems that Kivy is unable to load the entire animation of png's into the memory and it just cuts out the images that it does not have space for. This also explains why stuff works perfectly fine on Windows (where memory is not generally an issue). Solution, as said, seems to be to dedicate more memory to the gpu, or to lower the quality of your png's slightly (e.g. TinyPNG.com). Hope this helps!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
For people still looking at this thread, this is probably not a Kivy specific problem. I had the same issue, and ended up solving it by upping the memory dedicated to the GPU in my Raspberry Pi. It seems that Kivy is unable to load the entire animation of png's into the memory and it just cuts out the images that it does not have space for. This also explains why stuff works perfectly fine on Windows (where memory is not generally an issue). Solution, as said, seems to be to dedicate more memory to the gpu, or to lower the quality of your png's slightly (e.g. TinyPNG.com). Hope this helps!