Post job offers?



Matteo Raggi

New Member
Credits
0
title of the project: Bash script to play images and videos in loop
description of the project:
Hi, I just want to make a media loop opening the pi3d app
https://github.com/tipam/pi3d

https://github.com/pi3d/pi3d.github.com

and launching this code "python3
Slideshow.py
"
that is part of the demos of 3dpi:
https://github.com/pi3d/pi3d_demos

This code "python3
Slideshow.py
" is an image viewer that show a blending/cross-fading transition between the slides.
The slides are not moving forward automatically, the slides are going forward only clicking the RIGHT ARROW key.

"FOR NOW I JUST NEED A STATIC DEMO"

and click on the RIGHT ARROW every N seconds to show the next picture, and the next and the next, then sometimes pause the images and launch the OMXPLAYER
https://github.com/popcornmix/omxplayer

over these images/slide-show, and at the end of the mp4playng, go back again to run this code "python3
Slideshow.py
" and restart to use the RIGHT ARROW to show the next pictures, and the next and the next, etc..

So now you can imagine that this new MEDIA PLAYER (images with pi3d plus videos with omxplayer) could work with all the png/jpeg and mp4 saved on the same folder (that we call NOWPLAYING) and then playing in this way:
SLIDE1 (of N seconds defined from the user area) + cross-fading to black of 0.5 seconds or less to a black image
+ black-image of 0.01 seconds (immediately click on arrow to the right)
+ cross-fading of 0.5 seconds or less from the black image to the next slide
+ SLIDE 2 (of N seconds defined from the user area) +
+ black-image of 0.01 seconds (immediately click on arrow to the right)
+ cross-fading of 0.5 seconds or less from the black image to the next slide
+ SLIDE 3 (of N seconds defined from the user area) +
+ black-image of 0.01 seconds (immediately click on arrow to the right)
+ cross-fading of 0.5 seconds or less from the black image to the next slide
+ SLIDE 4 (of N seconds defined from the user area) +
Etc...

Then if/when a mp4 is coming in the loop, we don't close pi3d "python3
Slideshow.py
" and we launch omxplayer over it, so then no one see the lag of 0.1 seconds that omxplayer needs to open. When omxplayer is closing because the mp4 is ended, then we restart to count the seconds to restart the slide-show managed from python3
Slideshow.py
.

For now I just need a static demo doing it.
Then The project will go quickly forward (with other next extra payments) adding these features:
1) change the slides from a CSV file downloaded from a URL, example
domain.com?id=45by4v5yervyervy
and each URL will match with a different play list
2) update the folder that we call NOWPLAYING deleting the media(mp4 and png/jpeg) files that are are not to play now and add the new that must be downloaded, closing and reopening pi3d to update the playlist
3) store also the schedule of the future playing, saving the future png/jpeg and mp4 files in a folder named FUTURE-PLAYING so then if this media players goes offline for a while it can works well for more time, waiting that the internet line will be back again.

For these extra features, also the start date and time and end date and time will be written into the filename or in the playlist.
PS.
About the RIGHT ARROW, actually I do it by hand, the pythin code doesn't do it automatically and the bash script has to do it.
FOR NOW I JUST NEED A STATIC DEMO.

The operating system is raspbian, debian for raspberry. do you have a raspberry?
Then in future maybe I will use this script on ubuntu core too.

I think that the best is if you have a raspberry too, to can test all quickly, because for example pi3d don't show the images on anydesk. My raspberry is reayd with anydesk and dataplicity, and I repeat is a lot better to test it directly on your raspberry..
If you don't have a raspberry, you can install raspbian on your pc:
https://www.raspberrypi.org/downloads/raspberry-pi-desktop/
 


Members online


Top