[Guide] Looping video/audio by Raspbian on boot

Various user-contributed guides for software-related things
Post Reply
User avatar
Pentium
Posts: 74
Joined: Thu Jul 13, 2017 7:35 pm
Has thanked: 23 times
Been thanked: 8 times

[Guide] Looping video/audio by Raspbian on boot

Post by Pentium » Sat Dec 23, 2017 11:35 am

This is pretty much just a guide for noobs, who know little to nothing about coding.

Looping video and audio within Raspbian (On Boot) is really easy.
Step one is to flash the Raspbian img file to a SD card using Etcher, then putting it into the pi (There are tons of tutorials of how to do this online)
Install omxplayer, essentially the Pi's version of QuickTime on the Mac- a video videoplayer.
Boot up the system, and type this into the terminal:

Code: Select all

sudo apt-get install omxplayer[code]
Chances are, it's already installed, and it should either say that it has been installed or that it's at it's current version.

Put your 100% legally downloaded music/video into a flash drive, then plug it into the pi. Open the files manager, scroll to the top, and you should see it pop up somewhere in the devices folder (If not, search for it in the folders).
Put the file into the 'pi' folder.

Next, navigate to /home/pi/.bashrc
Scroll to the bottom (DO NOT MODIFY ANYTHING IN THERE) and add this one line in:
[code]omxplayer -o local --loop /home/pi/(name of your video).mp4/mp3/mov[code]
Keep in mind, this plays audio through the head phone jack, if you wish to play it through HDMI,
[code]omxplayer -o hdmi --loop /home/pi/(name of your video).mp4/mp3/mov[code]

Reboot, wait for the load time, then you should see it play.
That's it! Hope this helped someone out! :D

chaosratt
Posts: 123
Joined: Sat Aug 20, 2016 7:36 pm
Has thanked: 12 times
Been thanked: 33 times

Re: [Guide] Looping video/audio by Raspbian on boot

Post by chaosratt » Thu Jan 04, 2018 7:54 pm

Pentium wrote:
Sat Dec 23, 2017 11:35 am
This is pretty much just a guide for noobs, who know little to nothing about coding.

Looping video and audio within Raspbian (On Boot) is really easy.
Step one is to flash the Raspbian img file to a SD card using Etcher, then putting it into the pi (There are tons of tutorials of how to do this online)
Install omxplayer, essentially the Pi's version of QuickTime on the Mac- a video videoplayer.
Boot up the system, and type this into the terminal:

Code: Select all

sudo apt-get install omxplayer
Chances are, it's already installed, and it should either say that it has been installed or that it's at it's current version.

Put your 100% legally downloaded music/video into a flash drive, then plug it into the pi. Open the files manager, scroll to the top, and you should see it pop up somewhere in the devices folder (If not, search for it in the folders).
Put the file into the 'pi' folder.

Next, navigate to /home/pi/.bashrc
Scroll to the bottom (DO NOT MODIFY ANYTHING IN THERE) and add this one line in:

Code: Select all

omxplayer -o local --loop /home/pi/(name of your video).mp4/mp3/mov
Keep in mind, this plays audio through the head phone jack, if you wish to play it through HDMI,

Code: Select all

omxplayer -o hdmi --loop /home/pi/(name of your video).mp4/mp3/mov
Reboot, wait for the load time, then you should see it play.
That's it! Hope this helped someone out! :D

Protip:
Your ending code blocks need a slash, like so: [/code]

Nice tip, I'll have to give it a try.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest