Last updated on 2 Ekim 2024 Çarşamba
önce
sudo nano /etc/init.d/webcam_stream
dosyasını oluşturalım
#!/bin/sh # /etc/init.d/webcam_stream # # Creation: 04.02.2013 # Last Update: 09.05.2024 # # Written by Georg Kainzbauer (http://www.gtkdb.de) # Edited by hOLOlu (http://www.mustafaozkaya.com.tr) # ### BEGIN INIT INFO # Provides: mjpg_streamer # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: MJPG-Streamer # Description: MJPG-Streamer takes JPGs from Linux-UVC compatible webcams and streams them as M-JPEG via HTTP. ### END INIT INFO start() { echo "mjpg-streamer baslatiliyor..." LD_LIBARY_PATH= /home/pi/mjpg-streamer//mjpg_streamer -i "/home/pi/mjpg-streamer//input_uvc.so -d /dev/video0 -n -y -r 1920x1080 -f 20" -o "/home/pi/mjpg-streamer/output_http.so -n -w /home/pi/mjpg-streamer/www -p 8080" >/dev/null 2>&1 & } stop() { echo "mjpg-streamer durduruluyor..." kill -9 $(pidof mjpg_streamer) >/dev/null 2>&1 } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo "kullanimi: $0 {start|stop|restart}" ;; esac exit 0
sudo chmod +x /etc/init.d/webcam_stream
çalışır hale getirdikten sonra cron’a ekliyoruz
crontab -e
@reboot /etc/init.d/webcam_stream start
bu kadar
İlk Yorumu Siz Yapın