This shows you the differences between two versions of the page.
rpi_kiosk [2015/03/25 13:52] wbeckett |
rpi_kiosk [2021/06/04 02:16] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== RPI Kiosk ====== | ||
- | [[http://michaelteeuw.nl/tagged/magicmirror | Magic Mirror]] | ||
- | |||
- | [[http://www.nytlabs.com/projects/mirror.html | Times Mirror]] | ||
- | |||
- | |||
- | [[https://jasperproject.github.io/ | Jasper Voice Control]] | ||
- | |||
- | [[http://www.raspberrypi.org/downloads/ | RPI OS Download]] | ||
- | |||
- | |||
- | [[http://stevenhickson.blogspot.com/2013/04/voice-control-on-raspberry-pi.html | RPI voice control]] | ||
- | |||
- | |||
- | [[http://stevenhickson.blogspot.com/2014/05/rpi-video-looper-20.html | Video Looper]] | ||
- | |||
- | |||
- | [[https://thinkrpi.wordpress.com/2013/04/05/step-3-install-softwares-for-webcam-and-computer-vision/ | CV]] | ||
- | |||
- | [[http://elinux.org/RPi_USB_Webcams | USB Web Cams]] | ||
- | |||
- | |||
- | [[http://jacobsalmela.com/raspberry-pi-webcam-using-mjpg-streamer-over-internet/ | RPI Streamer ]] | ||
- | |||
- | [[http://sirlagz.net/2012/08/04/how-to-stream-a-webcam-from-the-raspberry-pi/ | Streamming]] | ||
- | |||
- | [[https://thinkrpi.wordpress.com/ | Facial Recog]] | ||
- | |||
- | |||
- | [[http://www.theweather.com/widget/ | Weather Widget]] | ||
- | |||
- | [[http://openweathermap.org/city/5101393 | Morganville, NJ]] | ||
- | |||
- | [[http://elinux.org/RPi_Advanced_Setup| Advanced avahi]] | ||
- | |||
- | [[http://elinux.org/RPiconfig | RPI Config ]] | ||
- | |||
- | [[http://www.instructables.com/id/View-RTMP-Stream-on-Raspberry-Pi/ | RTMP Stream]] | ||
- | |||
- | [[http://raspi.tv/2012/get_iplayer-installation-on-raspberry-pi-with-raspbian | Recording a Stream ]] | ||
- | |||
- | [[http://stackoverflow.com/questions/14087135/how-would-i-use-rtmpdump-to-download-this-stream | Downloading the stream]] | ||
- | |||
- | <code> | ||
- | Webserver | ||
- | |||
- | To host the interface (which is simply a webpage), i needed an Apache webserver to be running on the Raspberry. Since this is one of the most common uses of the Rasberry, the installation of Apache is very streamlined. | ||
- | |||
- | First I made sure i was running the latest system software by running the following command: | ||
- | |||
- | sudo apt-get update && apt-get upgrade -y | ||
- | No it’s time to actually install apache: | ||
- | |||
- | sudo apt-get install apache2 apache2-doc apache2-utils | ||
- | Done! That’s all there is. But to make sure I was able to use some PHP scripts on the webserver (more about that later), I also added PHP support: | ||
- | |||
- | sudo apt-get install libapache2-mod-php5 php5 php-pear php5-xcache | ||
- | Done … again! Reboot, and the webserver is up and running! I dropped a index.php file in the /var/www folder, and pointed my browser to the Raspberry’s ip adress and yes, it worked. | ||
- | |||
- | Kioskmode | ||
- | |||
- | Now, to make sure the Raspberry actually shows the webpage I will be using Chromium in kioskmode. Chromium is an open source browser which is able to run on the Raspberry’s OS. | ||
- | |||
- | Once again, installing was easy: | ||
- | |||
- | sudo apt-get install chromium x11-xserver-utils unclutter | ||
- | |||
- | But this time, it needed some extra configuration to disable the | ||
- | screensaver and autoboot in kioskmode. To do this i | ||
- | edited /etc/xdg/lxsession/LXDE/autostart and added a # before: | ||
- | |||
- | /etc/xdg/lxsession/LXDE-pi | ||
- | |||
- | @xscreensaver -no-splash | ||
- | Additionally, I added the following lines: | ||
- | |||
- | @xset s off | ||
- | @xset -dpms | ||
- | @xset s noblank | ||
- | @chromium --kiosk --incognito http://localhost | ||
- | This completely disables all screensaving features, and makes sure chromium will start after boot an points to the localhost webserver in full screen mode. | ||
- | |||
- | Time to save the file and reboot once more to check if it works. Since the Raspberry isn’t worlds fastest computer, it took a while, but eventually the testsite appeared on the 90 degrees rotated screen … Yeah! | ||
- | |||
- | On to the last part of the project. The development of the interface. | ||
- | |||
- | </code> | ||
- | |||
- | |||
- | <code> | ||
- | # enable raspicam | ||
- | start_x=1 | ||
- | gpu_mem=256 | ||
- | |||
- | # magic mirror | ||
- | display_rotate=1 | ||
- | |||
- | display_rotate=0 Normal | ||
- | display_rotate=1 90 degrees | ||
- | display_rotate=2 180 degrees | ||
- | display_rotate=3 270 degrees | ||
- | display_rotate=0x10000 horizontal flip | ||
- | display_rotate=0x20000 vertical flip | ||
- | |||
- | |||
- | </code> | ||
- | |||
- | <code> | ||
- | sudo apt-get install sqlite3 | ||
- | |||
- | sudo apt-get install php5-sqlite | ||
- | |||
- | </code> | ||
- | |||
- | |||
- | <code> | ||
- | Install avahi with the following commands on the Pi: | ||
- | |||
- | sudo apt-get install avahi-daemon | ||
- | |||
- | and then on older Debian installs: | ||
- | |||
- | sudo update-rc.d avahi-daemon defaults | ||
- | |||
- | or on newer Raspbian installs: | ||
- | |||
- | sudo insserv avahi-daemon | ||
- | |||
- | (if in doubt, you're probably on the newer one). | ||
- | Create a configfile for Avahi at /etc/avahi/services/multiple.service. I did this with the following command: | ||
- | |||
- | sudo pico /etc/avahi/services/multiple.service | ||
- | |||
- | The contents of this file should be something like the following, courtesy of aXon on the Rasperry Pi forums: | ||
- | |||
- | <?xml version="1.0" standalone='no'?> | ||
- | <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> | ||
- | <service-group> | ||
- | <name replace-wildcards="yes">%h</name> | ||
- | <service> | ||
- | <type>_device-info._tcp</type> | ||
- | <port>0</port> | ||
- | <txt-record>model=RackMac</txt-record> | ||
- | </service> | ||
- | <service> | ||
- | <type>_ssh._tcp</type> | ||
- | <port>22</port> | ||
- | </service> | ||
- | </service-group> | ||
- | |||
- | Apply the new configuration with: | ||
- | |||
- | sudo /etc/init.d/avahi-daemon restart | ||
- | |||
- | The Pi should now be addressable from other machines as raspberrypi.local, for example: | ||
- | |||
- | ssh pi@raspberrypi.local | ||
- | </code> | ||
- | |||
- | <code> | ||
- | I managed to stream from my PI to a Web server with the compiled in module nginx-rtmp. To save hassles with ffmpeg I recommend a rolling distribution like Archlinux Arm. raspivid -vf -t 0 -fps 25 -b 2000000 -o - | ffmpeg -i - -vcodec copy -an -r 25 -f flv rtmp://x220/myapp/mystream Some notes: The hardware encoded h264 video stream takes about ... | ||
- | webcam streaming-video camera | ||
- | answered Aug 3 '13 at 4:36 | ||
- | hendry | ||
- | 1694 | ||
- | |||
- | |||
- | 4 | ||
- | |||
- | What streaming solution for the Picam has the smallest lag? | ||
- | With Ubuntu 14.10 and Gstreamer I reach 100 to 116 ms latency with 1280 x 720 @ 60Hz. Tanks to @Antonvh who puts me on the right way. I reproduce here the solution for latter reference. To stream from the Pi : raspivid -t 0 -b 2000000 -fps 60 -w 1280 -h 720 -o - \ | gst-launch-1.0 -e -vvv fdsrc ! h264parse ! rtph264pay pt=96 config-interval=5 \ ! ... | ||
- | |||
- | http://raspberrypi.stackexchange.com/tags/streaming-video/hot | ||
- | </code> |