[Tutor] Fwd: Re: Is it possible to make a Raspberry do what I need it to do?

Alan Gauld alan.gauld at yahoo.co.uk
Tue Aug 11 12:31:52 EDT 2020


On 11/08/2020 04:03, Jack Funkinstain wrote:

> Can you please help me with my raspberry project

We can help with the Python bits but this is not a Raspberry forum
so we can offer limited help on that side (although a few of
us do dabble with Pis)

> For my project I need to make a Raspberry Pi Play an HD 1080 video on start
> up/boot/ in full screen. The video will be roughly 15 minutes long and will
> play in a loop. It is very important that there is not a blank screen or
> any visual or audio gaps when the loop starts over (I have heard that some
> media player program have a noticeable delay between the end and the start
> of a loop). 

Its possible but you will need to find the right player, its not really
a Python issue. Python can launch the player and the video.
But frankly you could just use the bash shell to do that, no Python
needed. And if you can find a command-line player that offers a loop
feature with good command line options you should be good to go without
any coding as such.

mplayer is the one that I'm familiar with but there are several others.

> The video needs to load/start with the volume all the way down,

I'm not sure about the CLI options for the sound.

> then have a motion sensor trigger an automation of the volume parameter on
> the media player program to gradually go up/fade in to a set volume level
> (most likely full volume). The volume then needs to stay at a
> fixed/consistent level while the person is in front of the sensor. Then
> when the person leaves, the sensor triggers the automation of the volume
> parameter to gradually go down/fade out. If a person triggers the motion
> sensor before the volume reaches 0, I want the volume parameter to increase
> from the point it left off rather than start from 0. I will also need to
> install a power button.

OK, Now this is definitely into Python territory.
Reading the motion sensor is going to be Pi/sensor specific but
then controlling the volume is Python. You just need to find a player
that either has a programmable interface or some kind of CLI interface
while the app is running.

> I will not be using the raspberry pi as a desktop computer. 

OK, Thats not a problem.

> Questions I have.
> 
>    1. The Raspberry pi will be in non-stop use for hours, maybe days. I
>    read that people have used raspberry’s in video art galleries for up to 4
>    days without over heating problems. 

This will depend on the exact Pi model you use. There are devices
designed to be used 24x7 and that would be your best bet.

>    ...Will 2GB of ram be enough for my project?

For sure

>    the Raspberry Pi 3 model A+ get less hot and therefore better suited for my

You need a Pi forum for that I suspect


>    project? Is a 16gb micro sd card enough?

Depends on the size of the video file but I run Linux on a 4GB card
with no problems and space for all the data files i need.


>    2. Is what I am trying to do even possible on a raspberry pi ? 

Definitely. In the worst case you might have to write your own video
player but the libraries to do that are available. For your very
specific needs it should be doable.

>    not been able to find any tutorial about automating software parameter
>    changes. Can you recommend any software to use for the automation? 

It all depends on the application. For command-line control you should
read the subprocess module documents - they have lots of examples.
But the best option is if the app has a programmable API, especially if
it has a Python library. The Pi forums are probably the best place to
ask about that.


>    there are several different media player programs you can download to use
>    as a video looper but can you recommend the one that has no noticeable gaps
>    when restarting a loop? 

You;ll need to research that yourself, ideally with the actual video
file you will be using. You might have to edit the file to ensure it has
no gaps too.


> Will I need a breadboard, HAT? The motion sensor
>    will be 30 inches away from the Raspberry pi and mounted onto a piece of
>    wood.

It depends on the motion sensor. I suspect a HAT will be the minimum.

>    3. I have not been able to find a tutorial video on how to code my
>    Raspberry to do what I need it to do. Do you have any recommendations?

Once you can read the sensor the rest should be pretty standard Python
coding. We can help with that. Any Python tutorial should get you
started, but there are a few Pi specific ones that would suit you best.
I don't know enough about them to recommend one over another.

>    4. Can you please make a tutorial video to do what I am trying to do?

Nope, it's not what this forum does - we answer questions about Python.
Also it's too specific to your project/sensor/player. Without knowing
which models of each you are using a video would be useless.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list