-
1Prerequisites: Default install of Raspbian Stretch with Desktop.
-
2Step One: raspi-config.
Use "ctrl+alt+t" to open a terminal window, then run "sudo raspi-config"
If this is your first time booting raspbian probably best to select option "1 Change User Password" first.
Then choose option "7 Advance Options" followed by "A7 GL Driver" and finally "G2 GL (Fake KMS)".
I also recommend while you're in the settings app to activate ssh. "5 Interface Options" then "P2 SSH".
Reboot. -
3Step Two: Installing required packages.
"sudo apt-get install vlc xdotooll wmctrl cec-utils libcec"
-
4Step Three: Sound Card Selection.
Right click on the speaker widget in the upper right hand corner of the screen and select the desired sound output device. This selection will be automatically saved for future restarts.
-
5Step Four: VLC video settings.
Run VLC and click on Tools then Preferences in the drop down menu.
Select the Video tab and change the Output module to "OpenGL GLX video output (XCB)" then press save.
-
6Step Five: VLC audio setting
Click on Tools then Preferences in the drop down menu.
Select the Audio tab and change the Output module to "ALSA audio output".If you are using a usb sound card or hardware addon board to get optical output click the "Use S/PDIF when available" check box.
Now select the Device you intend to use. A portion of this name should be representative of the audio device you selected from the desktop audio applet menu earlier. If you are using a usb sound card select "USB Sound Device, USB Audio IEC958 (S/PDIF) Digital Audio Output".
Save.
-
7Step Six: Scripts
Assuming you are in the original login directory /home/pi/
mkdir rpvlcdmp
cd rpvlcdmpwget https://cdn.hackaday.io/files/438591876463456/remote.sh
chmod +x remote.shhttps://cdn.hackaday.io/files/438591876463456/startup.sh
chmod +x startup.sh -
8Step Seven: Enable power off feature. (remote button 9)
"sudo nano powerdown.sh"
then copy and paste, right click:
#!/bin/bash
sudo shutdown -h nowctrl+x to exit, y to save and then enter to leave the file name unchanged.
sudo chmod +x powerdown.sh
sudo chmod 4755 powerdown.sh -
9Step Eight: Auto-execution.
nano /home/pi/.config/lxsession/LXDE-pi/autostart
replace last line with:
@/home/pi/rpvlcdmp/./startup.sh -
10The Button:
Grounding gpio pin 5 will boot the raspberry pi, and conveniently pin 6 is a ground, so you just need to bridge them temporarily to turn it on without pluging and unpluging the usb power supply. I built mine with parts salvaged from a scrap vcr circa 1988. It's just a paired wire harness connected to a momentary push button, and a small bracket that is screwed through one of the board mounting holes. The button had to desoldered and originally had 5 pins, 3 of which I eliminated after some tests with a multimeter.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.