Created
August 19, 2016 16:29
-
-
Save chazcheadle/fa6e137592d510e21ef482de692afde7 to your computer and use it in GitHub Desktop.
mjpg_streamer: Out put http and file to custom directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Check for image directory and create it if it doesn't exist. | |
| s=${0##*/} | |
| image_dir="/tmp/${s%.*}" | |
| if [ ! -d $image_dir ] | |
| then | |
| mkdir $image_dir | |
| echo "Created $image_dir."; | |
| fi | |
| # Remove any old image files. | |
| rm -rf $image_dir/* | |
| mjpg_streamer -i "/usr/local/lib/mjpg-streamer/input_uvc.so -f 10 -r 960x540 -l off" \ | |
| --output "/usr/local/lib/mjpg-streamer/output_http.so -w /var/www2 -p 8091" \ | |
| --output "/usr/local/lib/mjpg-streamer/output_file.so -f $image_dir -d 3000 -s 1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment