3

Raspberry Pi video art installation

 1 year ago
source link: http://www.suppertime.co.uk/blogmywiki/2023/02/raspberry-pi-video-art-installation/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Raspberry Pi video art installation

My daughter makes video art and needed a simple solution for showing one of her pieces continually in a loop.

I used an old Raspberry Pi model B for this. I just realised that the only place I had documented this was on my now-deleted Twitter account, and I can’t recall where I learned about this method, so I just had a quick look at the machine in question to try and work out what I did to make it. I’m recording it here in case it’s useful to anyone else or, more likely, me.

The Pi has Raspbian Buster on it, no GUI/desktop, just the command line stuff. It needs omxplayer, which I think was installed by default.

I put the source video MP4 file in the default pi user’s home directory. (I may have transferred the file from a USB stick using fdisk to identify and

sudo mount /dev/sda1 /media/usb-drive/

to mount the drive, but you could also probably transfer the file using SFTP, FTP over SSH).

I also doubtless used raspi-config to force the audio to either HDMI or the 3.5mm audio jack, and maybe alsamixer to set the volume level.

The magic happened by editing rc.local:

sudo nano /etc/rc.local

Then I added some lines so it looked a bit like this:

# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi
omxplayer -o local --loop /home/pi/video-art.mp4 &
exit 0

Now when the Pi reboots, after quite a lot of boot-up text scrolling, the video plays and loops automatically. Connect to your monitor or projector and install in your art gallery!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Name *

Email *

Website

Comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK