This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
et:distancelab:wiredprogram [2015/03/26 08:35] – raivo.sell | et:distancelab:wiredprogram [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 26: | Line 26: | ||
Mjpg streamer | Mjpg streamer | ||
+ | |||
+ | Install the pre-requisites: | ||
+ | |||
+ | $ sudo apt-get install g++ curl pkg-config libv4l-dev libjpeg-dev build-essential libssl-dev vim cmake imagemagick | ||
+ | |||
+ | |||
+ | Download mjpg-streamer | ||
+ | |||
+ | $ wget https:// | ||
+ | $ tar -xvf ./ | ||
+ | |||
+ | |||
+ | Compile the mjpg-streamer | ||
+ | |||
+ | $ cd mjpg-streamer | ||
+ | $ make | ||
+ | $ sudo make install | ||
+ | |||
+ | |||
+ | Run a test. | ||
+ | |||
+ | $ sudo ./ | ||
+ | |||
+ | Seadista automaatne käivitumine | ||
+ | |||
+ | Install the mjpg-streamer | ||
+ | |||
+ | $ sudo cp mjpg_streamer / | ||
+ | $ sudo cp output_http.so input_file.so / | ||
+ | $ sudo cp -R www / | ||
+ | |||
+ | If the MJPG-streamer needs to be started automatically at system startup, you can create the configuration file / | ||
+ | |||
+ | |||
+ | description " | ||
+ | start on runlevel [2345] | ||
+ | stop on runlevel [016] | ||
+ | script | ||
+ | / | ||
+ | end script | ||
+ | |||
+ | The script for starting a multiple cameras: | ||
+ | |||
+ | description " | ||
+ | start on runlevel [2345] | ||
+ | stop on runlevel [016] | ||
+ | script | ||
+ | / | ||
+ | /bin/sleep 5 | ||
+ | / | ||
+ | /bin/sleep 5 | ||
+ | / | ||
+ | /bin/sleep 5 | ||
+ | / | ||
+ | /bin/sleep 5 | ||
+ | end script | ||
+ | | ||
+ | The script must be executable: | ||
+ | |||
+ | sudo chmod u+x / | ||
+ | | ||
+ | ===== Video streamer (Olemasolev süsteem) ===== | ||
+ | |||
+ | Käivitusfail / | ||
+ | |||
+ | Faili sisu: | ||
+ | |||
+ | #!/bin/sh -e | ||
+ | # | ||
+ | # rc.local | ||
+ | # | ||
+ | # This script is executed at the end of each multiuser runlevel. | ||
+ | # Make sure that the script will "exit 0" on success or any other | ||
+ | # value on error. | ||
+ | # | ||
+ | # In order to enable or disable this script just change the execution | ||
+ | # bits. | ||
+ | # | ||
+ | # By default this script does nothing. | ||
+ | echo "scsi remove-single-device 2 0 0 0" > / | ||
+ | /sbin/rmmod uvcvideo | ||
+ | / | ||
+ | /bin/sleep 15 | ||
+ | / | ||
+ | /bin/sleep 5 | ||
+ | / | ||
+ | /bin/sleep 5 | ||
+ | / | ||
+ | exit 0 | ||
+ | |||
+ | |||
+ | Faili sisu enne muutmist ja ilmselt veaga: | ||
+ | |||
+ | #!/bin/sh -e | ||
+ | # | ||
+ | # rc.local | ||
+ | # | ||
+ | # This script is executed at the end of each multiuser runlevel. | ||
+ | # Make sure that the script will "exit 0" on success or any other | ||
+ | # value on error. | ||
+ | # | ||
+ | # In order to enable or disable this script just change the execution | ||
+ | # bits. | ||
+ | # | ||
+ | # By default this script does nothing. | ||
+ | echo "scsi remove-single-device 2 0 0 0" > / | ||
+ | /sbin/rmmod uvcvideo | ||
+ | / | ||
+ | /bin/sleep 15 | ||
+ | / | ||
+ | /bin/sleep 5 | ||
+ | / | ||
+ | /bin/sleep 5 | ||
+ | / | ||
+ | exit 0 | ||
+ | |||
+ | | ||
+ | ===== | ||
+ | |||
+ | Kui remote masinas pole enne tehtud, siis teha esmalt kataloog: | ||
+ | |||
+ | mkdir .ssh | ||
+ | |||
+ | Kauglabori veebiserveris www-data kasutaja alt: | ||
+ | sudo -s | ||
+ | su www-data | ||
+ | bash | ||
+ | |||
+ | |||
+ | (kui korra juba tehtud võib vahele jätta) | ||
+ | ssh-keygen -t rsa | ||
+ | cat ~/ | ||
+ | Kui key olemas, aga vana host, siis teha enne remove, nt: | ||
+ | ssh-keygen -f "/ | ||
+ | |||
+ | Kontrollida, | ||
+ | Kataloogi õigus: | ||
+ | chmod 700 ~/.ssh | ||
+ | faili õigus: | ||
+ | chmod 600 ~/ | ||
+ | |||
+ |