1#!/bin/sh
2
3#/******************************************************************************
4#                                                                              #
5#      MJPG-streamer allows to stream JPG frames from an input-plugin          #
6#      to several output plugins                                               #
7#                                                                              #
8#      Copyright (C) 2007 Tom Stöveken                                         #
9#                                                                              #
10# This program is free software; you can redistribute it and/or modify         #
11# it under the terms of the GNU General Public License as published by         #
12# the Free Software Foundation; version 2 of the License.                      #
13#                                                                              #
14# This program is distributed in the hope that it will be useful,              #
15# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
17# GNU General Public License for more details.                                 #
18#                                                                              #
19# You should have received a copy of the GNU General Public License            #
20# along with this program; if not, write to the Free Software                  #
21# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    #
22#                                                                              #
23#******************************************************************************/
24
25## This example shows how to invoke mjpg-streamer from the command line
26
27export LD_LIBRARY_PATH="$(pwd)"
28#./mjpg_streamer -i "input_uvc.so --help"
29
30./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so -w ./www"
31#./mjpg_streamer -i "./input_uvc.so -n -f 30 -r 1280x960"  -o "./output_http.so -w ./www"
32#./mjpg_streamer -i "./input_uvc.so -n -f 30 -r 640x480 -d /dev/video0"  -o "./output_http.so -w ./www" &
33#./mjpg_streamer -i "./input_uvc.so -d /dev/video0" -i "./input_uvc.so -d /dev/video1" -o "./output_http.so -w ./www"
34#valgrind ./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so -w ./www"
35
36#./mjpg_streamer -i "./input_uvc.so -n -f 30 -r 1280x960" -o "./output_udpserver.so --port 2001"
37#./mjpg_streamer -i "./input_uvc.so -n -f 30 -r 640x480" -o "./output_udpserver.so --address epgm://eth0;239.1.1.1:2001"
38#./mjpg_streamer -i "./input_uvc.so -n -f 30 -r 640x480 -d /dev/video0" -o "./output_zmqserver.so --address tcp://*:2001 --buffer_size 2"
39## pwd echos the current path you are working at,
40## the backticks open a subshell to execute the command pwd first
41## the exported variable name configures ldopen() to search a certain
42## folder for *.so modules
43#export LD_LIBRARY_PATH=`pwd`
44
45## this is the minimum command line to start mjpg-streamer with webpages
46## for the input-plugin default parameters are used
47#./mjpg_streamer -o "output_http.so -w `pwd`/www"
48
49## to query help for the core:
50# ./mjpg_streamer --help
51
52## to query help for the input-plugin "input_uvc.so":
53# ./mjpg_streamer --input "input_uvc.so --help"
54
55## to query help for the output-plugin "output_file.so":
56# ./mjpg_streamer --output "output_file.so --help"
57
58## to query help for the output-plugin "output_http.so":
59# ./mjpg_streamer --output "output_http.so --help"
60
61## to specify a certain device, framerage and resolution for the input plugin:
62# ./mjpg_streamer -i "input_uvc.so -d /dev/video2 -r 320x240 -f 10"
63
64## to start both, the http-output-plugin and write to files every 15 second:
65# mkdir pics
66# ./mjpg_streamer -o "output_http.so -w `pwd`/www" -o "output_file.so -f pics -d 15000"
67
68## to protect the webserver with a username and password (!! can easily get sniffed and decoded, it is just base64 encoded !!)
69# ./mjpg-streamer -o "output_http.so -w ./www -c UsErNaMe:SeCrEt"
70
71## If you want to track down errors, use this simple testpicture plugin as input source.
72## to use the testpicture input plugin instead of a webcam or folder:
73#./mjpg_streamer -i "input_testpicture.so -r 320x240 -d 500" -o "output_http.so -w www"
74
75## The input_file.so plugin watches a folder for new files, it does not matter where
76## the JPEG files orginate from. For instance it is possible to grab the desktop and
77## store the files to a folder:
78# mkdir -p /tmp/input
79# while true; do xwd -root | convert - -scale 640 /tmp/input/bla.jpg; sleep 0.5; done &
80## Then the files can be read from the folder "/tmp/input" and served via HTTP
81# ./mjpg_streamer -i "input_file.so -f /tmp/input -r" -o "output_http.so -w www"
82
83## To upload files to a FTP server (edit the script first)
84# ./mjpg_streamer -i input_testpicture.so -o "output_file.so --command plugins/output_file/examples/ftp_upload.sh"
85
86## To create a control only interface useful for controlling the pan/tilt throug
87## a webpage while another program streams video/audio, like skype.
88#./mjpg_streamer -i "./input_control.so" -o "./output_http.so -w ./www"
89
90
91