chidea / fbpygif Goto Github PK
View Code? Open in Web Editor NEWPure Python implemented Frame Buffer memory mapping library with GIF animation playing support on SBC(Raspberry pi)
License: MIT License
Pure Python implemented Frame Buffer memory mapping library with GIF animation playing support on SBC(Raspberry pi)
License: MIT License
hi,
loading of some images (in ram?) takes some time before the first start.
maybe possible to have a countdown displayed while this?
I display a gif anim with the same resolution as my display (480x320) on a pi zero w with a GPIO screen.
command : FBpyGIF -fb 1 ./happy.gif
The result is strange, it looks like an interpolation of image. As I can't describe it, here is a video and the original gif anim:
I run python 3.9 on Debian GNU/Linux 11 (bullseye)
i was irritated because calling main.py without cmd-line args give no help,
but starts the color-mode.
wouldn it be more usual for oritentation to throw out help, if called with no args โ
and besides: is this i typo-error in the help? shouldn it be the other way round?
"no-loop" make looping forever โ
-nl, --no-loop Make entire playlist loop forever.
hi,
i come back to make a fresh install on a fresh raspberry after a while.
so i recognized a word on the github landing page, how to simple get this down to the raspberry.
something like: "how to get this? do a >git clone https://github.com/chidea/FBpyGIF.git"
When using the -no
or --no-loop
flag, the gif is looped 2x times instead of 1x. I tested this on Raspberry Pi 3 Model B Rev 1.2
pi@raspberrypi:~ $ FBpyGIF -nl myTestGif.gif
main called with None
main argv revision with ['-nl', 'myTestGif.gif']
Press Ctrl+C to stop playing
files to play: ['myTestGif.gif']
Press Ctrl+C to stop playing
files to play: ['myTestGif.gif']
I was planning to use FBpyGIF in my project to show GIF looping animations based on events.
Thanks to #12 it now perfectly works, however the load time is quite long for some GIFs:
(on a Raspberry Pi 3)
I can't wait so long as GIF are illustrating the events in real time.
I see in the README.md you have planned to:
- Background loading of next animation file to reduce loading delay between them
Would you consider the possibility to load/prepare the whole playlist in memory and allow showing the right one based on events/signals/other?
I've looked into main.py
and have the feeling that fb.ready_fb()
could be what I'm looking for.
I'm ready to write some Python code if you would provide such library.
Many thanks in advance for your help.
hi,
i just installed FBpyGIF with pip3 on a new raspbian stretch (9) on a new raspberry 3.
i got a module-missing error.. (maybe already known)
from last year i remember something, that the pip-repository was not updated?
is it this?
root@raspi3a-tft-display:/usr/src/media# FBpyGIF -gd 10 -ad 10 -pv -sf -vb /usr/src/media/
main called with None
main argv revision with ['-gd', '10', '-ad', '10', '-pv', '-sf', '-vb', '/usr/src/media/']
Press Ctrl+C to stop playing
files to play: ['/usr/src/media/mona-lisa-designboom-01.gif', '/usr/src/media/Sergio-Albiac-stardust-portraits-designboom-02.jpg', ... '/usr/src/media/sergio-albiac-learnt-nothing-designboom-07.jpg']
Traceback (most recent call last):
File "/usr/local/bin/FBpyGIF", line 7, in <module>
from FBpyGIF.__main__ import main
File "/usr/local/lib/python3.5/dist-packages/FBpyGIF/__main__.py", line 10, in <module>
main()
File "/usr/local/lib/python3.5/dist-packages/FBpyGIF/__main__.py", line 8, in main
from .main import main as m
File "/usr/local/lib/python3.5/dist-packages/FBpyGIF/main.py", line 95, in <module>
main()
File "/usr/local/lib/python3.5/dist-packages/FBpyGIF/main.py", line 73, in main
from shuffle import sfcycle
ImportError: No module named 'shuffle'
root@raspi3a-tft-display:/usr/src/media# FBpyGIF -gd 10 -ad 10 -pv -sf -vb /usr/src/media/
hi,
i cloned repository today. very cool improvements...
i used the call of fb.py to clear the frambuffer after my experiments. was a cool function.
now fb.py -> main.py default without cmd-args to color-mode.
may you want to consider to code a -switch to clear the framebuffer like before?
great thing... since the beginning i am using it on a regular basis as picture-fame ๐
my main-wish:
i have one folder with pictures of different orientation (portrait/landscape)
and different sizes (mostly near to full-hd 1920x1080, but all more or less)
i have two screens as picture frames running.
one is normal in landscape orientation, one stands up in portrait-orientations and there is the raspberry settings adjusted to 90 degree screen rotation.
everythings running more or less fine. exexpt:
all images are zoomed to fit the full-screen regardless of their orientation.
first, it would be great, if i could use an option-switch to let fbpy show only pictures with portrait-oritientation on my portrait-monitor.
And also only landscape-orientated-pictures on my landscape monitor.
second: it would be great, if i could set steps or percentage levels for zooming/shrinking.
so i could say: landscape-images are only allowed to get zoomed/and-or/shrinked 10% to fit the screen,
otherwise left out and not showing as ugly streched.
also the same as a separate option for all my portrait-images on my portrait-monitor
Extension to this:
one can think of levels (1-5?) for zooming/streching/shrinking instead of percent, or an association of steps ie. 1-9 as a shortversion of 10-90% percentage levels...
one could think of allowed zoom/shrink steps/levels bound separatly to certain sized images (small 200x300, medium 500x500, HD 1000x1000) or the like.
๐ ๐ ๐ ๐ ๐
๐ ๐ ๐ ๐ ๐ ๐
Just for future-development: (i see you improved a lot on fb.py) ๐
i switch of my raspberry-pi display with the tvservice -o/p utility.
if i switch the hdmi-port, my monitor goes into powersave with only 1W standby.
i do this outside the fb.py. maybe its a bit out of scope, but i could thinkoff for fb.py as a full-solution, where the monitor-switching on/off could be at the end of all looping.
or over net-sockets/ports. this could extend fb.py to an all-inclusive solution in the future...
๐
i swap this over from the other thread, to see if there is progress going on?
๐ ๐ ๐
๐ ๐ ๐
#17 (comment)
hope to hear you soon
๐
When i run a gif file only shows the first frame.
i had it running for 2 hrs, the image was not changed?
what can i check?
see the screenshot. nothing has changed for 2hrs...
root@raspi-display1:/usr/src/FBpyGIF# python3 main.py -pv -sf -vb -gd 100 /home/pi/fbpy/
Press Ctrl+C to stop playing
files to play: ['/home/pi/fbpy/tumblr_n5me0pJ6xH1qlzc82o1_r2_500.gif', '/home/pi/fbpy/tumblr_na9689nmDF1rfp0s4o1_400.gif', '/home/pi/fbpy/tumblr_n0dfidiOdm1rc3rlfo1_400.gif', '/home/pi/fbpy/Wang Guofeng-pixelated2014no4.jpg', '/home/pi/fbpy/tumblr_mlwmqnqo3s1qlzc82o1_400.gif', '/home/pi/fbpy/Wang Guofeng-pixelated2014no7.jpg', '/home/pi/fbpy/Wang Guofeng-event-transformed-no11.jpg', '/home/pi/fbpy/tumblr_nz4agevEHC1qhp1zwo1_500.gif']
playing : /home/pi/fbpy/tumblr_na9689nmDF1rfp0s4o1_400.gif
โ
I have a gif that is 640x480 that I want to play on a 1920:1080 screen whilst maintaining aspect ratio. When I play this gif using FBpyGIF it stretches to fill the whole screen. Is there any way to play the gifs full screen whilst maintaining aspect ratio?
Here's the gif I'm using
And what it looks like in FBpyGIF (captured from a Raspberry Pi using a HDMI capture card, hence the fuzziness)
I have prepared a batch bmp files, ie 0001.bmp ~0120.bmp.
but those files was displayed in random sequence.
I have to add a sorted function in /usr/lib/python3.7/site-packages/FBpyGIF/path.py
now it works as expect.
calling main.py presumes, that you call python3 in front.
(i learned this times ago in the beginning).
now when i call main.py without arguments, i dont see a hint for help.
it is on github mentioned, but i does not come out of the script.
maybe helpful to display a notice on comandline, that help comes from calling main.py -h ?
is there a limitation to the gif format?
does it support animated gifs?
thanks
as i use "-ad 10" i assume, my first animated gif would end after 10 seconds,
but it is looping forever.
as i use "-al 5", same animated gif ends after a while, so the others to.
something broken? could you investigate/update?
thanks a lot
๐
This is very cool! I am trying it out on a C.H.I.P. It is outputting the GIFs in black-and-white. -ct
outputs vertical black and white stripes. Suggestions?
as you improved/expanded everthing a lot,
i feel encouraged to make some suggestions... ๐ฐ
i start fb.py as a system.service on my raspberry, but while testing i start it from the command-line.
than while running, i only see the static file-list.
i cannot see which image is actually displayed. (i.e.: sample.jpg)
i cannot see which nr this is (i.e. image 5/324)
i cannot see how long fb.py is running (i.e. running for ...mins../hrs...)
i cannot see anymore with which switches i started (i.e. status: looping/-sf -nc.)
...
one could think of some more for debugging purpose or information
๐ ๐
it cannot be installed easy.
it shows some install error. maybe in regards to installroutine-bugs for python 3.x (on raspian)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.