2011年12月22日 星期四

Testing

motion.conf & run diff dir.sh

# Rename this distribution example file to motion.conf
#
# This config file was generated by motion 3.2.11


############################################################
# Daemon
############################################################

# Start in daemon (background) mode and release terminal (default: off)
daemon off

# File to store the process ID, also called pid file. (default: not defined)
process_id_file /var/run/motion/motion.pid

############################################################
# Basic Setup Mode
############################################################

# Start in Setup-Mode, daemon disabled. (default: off)
setup_mode off

###########################################################
# Capture device options
############################################################

# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video0

# v4l2_palette allows to choose preferable palette to be use by motion
# to capture from those supported by your videodevice. (default: 8)
# E.g. if your videodevice supports both V4L2_PIX_FMT_SBGGR8 and
# V4L2_PIX_FMT_MJPEG then motion will by default use V4L2_PIX_FMT_MJPEG.
# Setting v4l2_palette to 1 forces motion to use V4L2_PIX_FMT_SBGGR8
# instead.
#
# Values :
# V4L2_PIX_FMT_SN9C10X : 0 'S910'
# V4L2_PIX_FMT_SBGGR8 : 1 'BA81'
# V4L2_PIX_FMT_MJPEG : 2 'MJPEG'
# V4L2_PIX_FMT_JPEG : 3 'JPEG'
# V4L2_PIX_FMT_RGB24 : 4 'RGB3'
# V4L2_PIX_FMT_UYVY : 5 'UYVY'
# V4L2_PIX_FMT_YUYV : 6 'YUYV'
# V4L2_PIX_FMT_YUV422P : 7 '422P'
# V4L2_PIX_FMT_YUV420 : 8 'YU12'
v4l2_palette 8

# Tuner device to be used for capturing using tuner as source (default /dev/tuner0)
# This is ONLY used for FreeBSD. Leave it commented out for Linux
; tunerdevice /dev/tuner0

# The video input to be used (default: 8)
# Should normally be set to 0 or 1 for video/TV cards, and 8 for USB cameras
input 8

# The video norm to use (only for video capture and TV tuner cards)
# Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0 (PAL)
norm 0

# The frequency to set the tuner to (kHz) (only for TV tuner cards) (default: 0)
frequency 0

# Rotate image this number of degrees. The rotation affects all saved images as
# well as mpeg movies. Valid values: 0 (default = no rotation), 90, 180 and 270.
rotate 0

# Image width (pixels). Valid range: Camera dependent, default: 352
width 1184

# Image height (pixels). Valid range: Camera dependent, default: 288
height 656

# Maximum number of frames to be captured per second.
# Valid range: 2-100. Default: 100 (almost no limit).
framerate 4

# Minimum time in seconds between capturing picture frames from the camera.
# Default: 0 = disabled - the capture rate is given by the camera framerate.
# This option is used when you want to capture images at a rate lower than 2 per second.
minimum_frame_time 0

# URL to use if you are using a network camera, size will be autodetected (incl http:// ftp:// or file:///)
# Must be a URL that returns single jpeg pictures or a raw mjpeg stream. Default: Not defined
; netcam_url value

# Username and password for network camera (only if required). Default: not defined
# Syntax is user:password
; netcam_userpass value

# The setting for keep-alive of network socket, should improve performance on compatible net cameras.
# 1.0: The historical implementation using HTTP/1.0, closing the socket after each http request.
# keep_alive: Use HTTP/1.0 requests with keep alive header to reuse the same connection.
# 1.1: Use HTTP/1.1 requests that support keep alive as default.
# Default: 1.0
; netcam_http 1.0

# URL to use for a netcam proxy server, if required, e.g. "http://myproxy".
# If a port number other than 80 is needed, use "http://myproxy:1234".
# Default: not defined
; netcam_proxy value

# Set less strict jpeg checks for network cameras with a poor/buggy firmware.
# Default: off
netcam_tolerant_check off

# Let motion regulate the brightness of a video device (default: off).
# The auto_brightness feature uses the brightness option as its target value.
# If brightness is zero auto_brightness will adjust to average brightness value 128.
# Only recommended for cameras without auto brightness
auto_brightness off

# Set the initial brightness of a video device.
# If auto_brightness is enabled, this value defines the average brightness level
# which Motion will try and adjust to.
# Valid range 0-255, default 0 = disabled
brightness 0

# Set the contrast of a video device.
# Valid range 0-255, default 0 = disabled
contrast 0

# Set the saturation of a video device.
# Valid range 0-255, default 0 = disabled
saturation 0

# Set the hue of a video device (NTSC feature).
# Valid range 0-255, default 0 = disabled
hue 0


############################################################
# Round Robin (multiple inputs on same video device name)
############################################################

# Number of frames to capture in each roundrobin step (default: 1)
roundrobin_frames 1

# Number of frames to skip before each roundrobin step (default: 1)
roundrobin_skip 1

# Try to filter out noise generated by roundrobin (default: off)
switchfilter off


############################################################
# Motion Detection Settings:
############################################################

# Threshold for number of changed pixels in an image that
# triggers motion detection (default: 1500)
threshold 1500

# Automatically tune the threshold down if possible (default: off)
threshold_tune off

# Noise threshold for the motion detection (default: 32)
noise_level 32

# Automatically tune the noise threshold (default: on)
noise_tune on

# Despeckle motion image using (e)rode or (d)ilate or (l)abel (Default: not defined)
# Recommended value is EedDl. Any combination (and number of) of E, e, d, and D is valid.
# (l)abeling must only be used once and the 'l' must be the last letter.
# Comment out to disable
despeckle EedDl

# Detect motion in predefined areas (1 - 9). Areas are numbered like that: 1 2 3
# A script (on_area_detected) is started immediately when motion is 4 5 6
# detected in one of the given areas, but only once during an event. 7 8 9
# One or more areas can be specified with this option. (Default: not defined)
; area_detect value

# PGM file to use as a sensitivity mask.
# Full path name to. (Default: not defined)
; mask_file value

# Dynamically create a mask file during operation (default: 0)
# Adjust speed of mask changes from 0 (off) to 10 (fast)
smart_mask_speed 0

# Ignore sudden massive light intensity changes given as a percentage of the picture
# area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
lightswitch 0

# Picture frames must contain motion at least the specified number of frames
# in a row before they are detected as true motion. At the default of 1, all
# motion is detected. Valid range: 1 to thousands, recommended 1-5
minimum_motion_frames 1

# Specifies the number of pre-captured (buffered) pictures from before motion
# was detected that will be output at motion detection.
# Recommended range: 0 to 5 (default: 0)
# Do not use large values! Large values will cause Motion to skip video frames and
# cause unsmooth mpegs. To smooth mpegs use larger values of post_capture instead.
pre_capture 0

# Number of frames to capture after motion is no longer detected (default: 0)
post_capture 0

# Gap is the seconds of no motion detection that triggers the end of an event
# An event is defined as a series of motion images taken within a short timeframe.
# Recommended value is 60 seconds (Default). The value 0 is allowed and disables
# events causing all Motion to be written to one single mpeg file and no pre_capture.
gap 60

# Maximum length in seconds of an mpeg movie
# When value is exceeded a new mpeg file is created. (Default: 0 = infinite)
max_mpeg_time 0

# Always save images even if there was no motion (default: off)
output_all off


############################################################
# Image File Output
############################################################

# Output 'normal' pictures when motion is detected (default: on)
# Valid values: on, off, first, best, center
# When set to 'first', only the first picture of an event is saved.
# Picture with most motion of an event is saved when set to 'best'.
# Picture with motion nearest center of picture is saved when set to 'center'.
# Can be used as preview shot for the corresponding movie.

#output_normal on
#output_normal first
#output_normal best
output_normal center

# Output pictures with only the pixels moving object (ghost images) (default: off)
output_motion off

# The quality (in percent) to be used by the jpeg compression (default: 75)
quality 100

# Output ppm images instead of jpeg (default: off)
ppm off


############################################################
# FFMPEG related options
# Film (mpeg) file output, and deinterlacing of the video input
# The options movie_filename and timelapse_filename are also used
# by the ffmpeg feature
############################################################

# Use ffmpeg to encode mpeg movies in realtime (default: off)
ffmpeg_cap_new on

# Use ffmpeg to make movies with only the pixels moving
# object (ghost images) (default: off)
ffmpeg_cap_motion off

# Use ffmpeg to encode a timelapse movie
# Default value 0 = off - else save frame every Nth second
ffmpeg_timelapse 0

# The file rollover mode of the timelapse video
# Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual
ffmpeg_timelapse_mode daily

# Bitrate to be used by the ffmpeg encoder (default: 400000)
# This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled)
ffmpeg_bps 500000

# Enables and defines variable bitrate for the ffmpeg encoder.
# ffmpeg_bps is ignored if variable bitrate is enabled.
# Valid values: 0 (default) = fixed bitrate defined by ffmpeg_bps,
# or the range 2 - 31 where 2 means best quality and 31 is worst.
ffmpeg_variable_bitrate 0

# Codec to used by ffmpeg for the video compression.
# Timelapse mpegs are always made in mpeg1 format independent from this option.
# Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4.
# mpeg1 - gives you files with extension .mpg
# mpeg4 or msmpeg4 - gives you files with extension .avi
# msmpeg4 is recommended for use with Windows Media Player because
# it requires no installation of codec on the Windows client.
# swf - gives you a flash film with extension .swf
# flv - gives you a flash video with extension .flv
# ffv1 - FF video codec 1 for Lossless Encoding ( experimental )
# mov - QuickTime ( testing )
ffmpeg_video_codec mpeg4


# Use ffmpeg to deinterlace video. Necessary if you use an analog camera
# and see horizontal combing on moving objects in video or pictures.
# (default: off)
ffmpeg_deinterlace off


############################################################
# Snapshots (Traditional Periodic Webcam File Output)
############################################################

# Make automated snapshot every N seconds (default: 0 = disabled)
snapshot_interval 0


############################################################
# Text Display
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second, %T = HH:MM:SS,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level, \n = new line,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event - do not use with text_event!
# You can put quotation marks around the text to allow
# leading spaces
############################################################

# Locate and draw a box around the moving object.
# Valid values: on, off and preview (default: off)
# Set to 'preview' will only draw a box in preview_shot pictures.
locate off

# Draws the timestamp using same options as C function strftime(3)
# Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock
# Text is placed in lower right corner
text_right %Y-%m-%d\n%T-%q

# Draw a user defined text on the images using same options as C function strftime(3)
# Default: Not defined = no text
# Text is placed in lower left corner
; text_left CAMERA %t

# Draw the number of changed pixed on the images (default: off)
# Will normally be set to off except when you setup and adjust the motion settings
# Text is placed in upper right corner
text_changes off

# This option defines the value of the special event conversion specifier %C
# You can use any conversion specifier in this option except %C. Date and time
# values are from the timestamp of the first image in the current event.
# Default: %Y%m%d%H%M%S
# The idea is that %C can be used filenames and text_left/right for creating
# a unique identifier for each event.
text_event %Y%m%d%H%M%S

# Draw characters at twice normal size on images. (default: off)
text_double off


############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, jpeg_, mpeg_ and timelapse_filename
# you can use conversion specifiers
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# Quotation marks round string are allowed.
############################################################

# Target base directory for pictures and films
# Recommended to use absolute path. (Default: current working directory)
###target_dir /tmp/motion
target_dir /home/wei/Image/motion/tmp


# File path for snapshots (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-snapshot
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-snapshot
# File extension .jpg or .ppm is automatically added so do not include this.
# Note: A symbolic link called lastsnap.jpg created in the target_dir will always
# point to the latest snapshot, unless snapshot_filename is exactly 'lastsnap'
snapshot_filename %v-%Y%m%d%H%M%S-snapshot

# File path for motion triggered images (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-%q
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
# File extension .jpg or .ppm is automatically added so do not include this
# Set to 'preview' together with best-preview feature enables special naming
# convention for preview shots. See motion guide for details
jpeg_filename %v-%Y_%m_%d_%H:%M'%S-%q
#jpeg_filename %v-%Y%m%d%H%M%S-%q

# File path for motion triggered ffmpeg films (mpeg) relative to target_dir
# Default: %v-%Y%m%d%H%M%S
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H%M%S
# File extension .mpg or .avi is automatically added so do not include this
# This option was previously called ffmpeg_filename
movie_filename %v-%Y_%m_%d_%H:%M'%S
#movie_filename %v-%Y%m%d%H%M%S

# File path for timelapse mpegs relative to target_dir
# Default: %Y%m%d-timelapse
# Default value is near equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d-timelapse
# File extension .mpg is automatically added so do not include this
timelapse_filename %Y%m%d-timelapse


############################################################
# Live Webcam Server
############################################################

# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 8081

# Quality of the jpeg images produced (default: 50)
webcam_quality 50

# Output frames at 1 fps when no motion is detected and increase to the
# rate given by webcam_maxrate when motion is detected (default: off)
webcam_motion off

# Maximum framerate for webcam streams (default: 1)
webcam_maxrate 1

# Restrict webcam connections to localhost only (default: on)
webcam_localhost on

# Limits the number of images per connection (default: 0 = unlimited)
# Number can be defined by multiplying actual webcam rate by desired number of seconds
# Actual webcam rate is the smallest of the numbers framerate and webcam_maxrate
webcam_limit 0


############################################################
# HTTP Based Control
############################################################

# TCP/IP port for the http server to listen on (default: 0 = disabled)
control_port 8080

# Restrict control connections to localhost only (default: on)
control_localhost on

# Output for http server, select off to choose raw text plain (default: on)
control_html_output on

# Authentication for the http based control. Syntax username:password
# Default: not defined (Disabled)
; control_authentication username:password


############################################################
# Tracking (Pan/Tilt)
############################################################

# Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic, 5=uvcvideo)
# The generic type enables the definition of motion center and motion size to
# be used with the conversion specifiers for options like on_motion_detected
track_type 0

# Enable auto tracking (default: off)
track_auto off

# Serial port of motor (default: none)
; track_port value

# Motor number for x-axis (default: 0)
track_motorx 0

# Motor number for y-axis (default: 0)
track_motory 0

# Maximum value on x-axis (default: 0)
track_maxx 0

# Maximum value on y-axis (default: 0)
track_maxy 0

# ID of an iomojo camera if used (default: 0)
track_iomojo_id 0

# Angle in degrees the camera moves per step on the X-axis
# with auto-track (default: 10)
# Currently only used with pwc type cameras
track_step_angle_x 10

# Angle in degrees the camera moves per step on the Y-axis
# with auto-track (default: 10)
# Currently only used with pwc type cameras
track_step_angle_y 10

# Delay to wait for after tracking movement as number
# of picture frames (default: 10)
track_move_wait 10

# Speed to set the motor to (stepper motor option) (default: 255)
track_speed 255

# Number of steps to make (stepper motor option) (default: 40)
track_stepsize 40


############################################################
# External Commands, Warnings and Logging:
# You can use conversion specifiers for the on_xxxx commands
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# %f = filename with full path
# %n = number indicating filetype
# Both %f and %n are only defined for on_picture_save,
# on_movie_start and on_movie_end
# Quotation marks round string are allowed.
############################################################

# Do not sound beeps when detecting motion (default: on)
# Note: Motion never beeps when running in daemon mode.
quiet on

# Command to be executed when an event starts. (default: none)
# An event starts at first motion detected after a period of no motion defined by gap
; on_event_start value

# Command to be executed when an event ends after a period of no motion
# (default: none). The period of no motion is defined by option gap.
; on_event_end value

# Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
# To give the filename as an argument to a command append it with %f
; on_picture_save value

# Command to be executed when a motion frame is detected (default: none)
; on_motion_detected value

# Command to be executed when motion in a predefined area is detected
# Check option 'area_detect'. (default: none)
; on_area_detected value

# Command to be executed when a movie file (.mpg|.avi) is created. (default: none)
# To give the filename as an argument to a command append it with %f
; on_movie_start value

# Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
# To give the filename as an argument to a command append it with %f
; on_movie_end value

# Command to be executed when a camera can't be opened or if it is lost
# NOTE: There is situations when motion doesn't detect a lost camera!
# It depends on the driver, some drivers don't detect a lost camera at all
# Some hang the motion thread. Some even hang the PC! (default: none)
; on_camera_lost value

############################################################
# Common Options For MySQL and PostgreSQL database features.
# Options require the MySQL/PostgreSQL options to be active also.
############################################################

# Log to the database when creating motion triggered image file (default: on)
sql_log_image on

# Log to the database when creating a snapshot image file (default: on)
sql_log_snapshot on

# Log to the database when creating motion triggered mpeg file (default: off)
sql_log_mpeg off

# Log to the database when creating timelapse mpeg file (default: off)
sql_log_timelapse off

# SQL query string that is sent to the database
# Use same conversion specifiers has for text features
# Additional special conversion specifiers are
# %n = the number representing the file_type
# %f = filename with full path
# Default value:
# insert into security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
sql_query insert into security(camera, filename, frame, file_type, time_stamp, event_time_stamp) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')


############################################################
# Database Options For MySQL
############################################################

# Mysql database to log to (default: not defined)
; mysql_db value

# The host on which the database is located (default: localhost)
; mysql_host value

# User account name for MySQL database (default: not defined)
; mysql_user value

# User password for MySQL database (default: not defined)
; mysql_password value


############################################################
# Database Options For PostgreSQL
############################################################

# PostgreSQL database to log to (default: not defined)
; pgsql_db value

# The host on which the database is located (default: localhost)
; pgsql_host value

# User account name for PostgreSQL database (default: not defined)
; pgsql_user value

# User password for PostgreSQL database (default: not defined)
; pgsql_password value

# Port on which the PostgreSQL database is located (default: 5432)
; pgsql_port 5432


############################################################
# Video Loopback Device (vloopback project)
############################################################

# Output images to a video4linux loopback device
# The value '-' means next available (default: not defined)
; video_pipe value

# Output motion images to a video4linux loopback device
# The value '-' means next available (default: not defined)
; motion_video_pipe value


##############################################################
# Thread config files - One for each camera.
# Except if only one camera - You only need this config file.
# If you have more than one camera you MUST define one thread
# config file for each camera in addition to this config file.
##############################################################

# Remember: If you have more than one camera you must have one
# thread file for each camera. E.g. 2 cameras requires 3 files:
# This motion.conf file AND thread1.conf and thread2.conf.
# Only put the options that are unique to each camera in the
# thread config files.
; thread /usr/local/etc/thread1.conf
; thread /usr/local/etc/thread2.conf
; thread /usr/local/etc/thread3.conf
; thread /usr/local/etc/thread4.conf

#!/bin/bash
##
## Run motion at different dir each time.
##
Home="/home/wei/Image/motion"
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so
export LD_PRELOAD

MotionCommand="motion -c /home/wei/.motion/motion.conf -n"
#MotionCommand="LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion -c
/home/wei/.motion/motion.conf -n"
NowDir=`date +%F_%H_%M`
echo $NowDir
echo `pwd`
#cd /home/wei
#echo `pwd`
cd $Home
echo `pwd`
mkdir $NowDir
# tmp is fixed dir name in motion.conf. Need -T to link dir.#
LN="ln -sf -T $Home/$NowDir $Home/tmp"
echo `$LN`

#cd $NowDir
#echo `pwd`


## Run
$MotionCommand

======================================

# Rename this distribution example file to motion.conf
#
# This config file was generated by motion 3.2.11


############################################################
# Daemon
############################################################

# Start in daemon (background) mode and release terminal (default: off)
daemon off

# File to store the process ID, also called pid file. (default: not defined)
process_id_file /var/run/motion/motion.pid

############################################################
# Basic Setup Mode
############################################################

# Start in Setup-Mode, daemon disabled. (default: off)
setup_mode off

###########################################################
# Capture device options
############################################################

# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video0

# v4l2_palette allows to choose preferable palette to be use by motion
# to capture from those supported by your videodevice. (default: 8)
# E.g. if your videodevice supports both V4L2_PIX_FMT_SBGGR8 and
# V4L2_PIX_FMT_MJPEG then motion will by default use V4L2_PIX_FMT_MJPEG.
# Setting v4l2_palette to 1 forces motion to use V4L2_PIX_FMT_SBGGR8
# instead.
#
# Values :
# V4L2_PIX_FMT_SN9C10X : 0 'S910'
# V4L2_PIX_FMT_SBGGR8 : 1 'BA81'
# V4L2_PIX_FMT_MJPEG : 2 'MJPEG'
# V4L2_PIX_FMT_JPEG : 3 'JPEG'
# V4L2_PIX_FMT_RGB24 : 4 'RGB3'
# V4L2_PIX_FMT_UYVY : 5 'UYVY'
# V4L2_PIX_FMT_YUYV : 6 'YUYV'
# V4L2_PIX_FMT_YUV422P : 7 '422P'
# V4L2_PIX_FMT_YUV420 : 8 'YU12'
v4l2_palette 8

# Tuner device to be used for capturing using tuner as source (default
/dev/tuner0)
# This is ONLY used for FreeBSD. Leave it commented out for Linux
; tunerdevice /dev/tuner0

# The video input to be used (default: 8)
# Should normally be set to 0 or 1 for video/TV cards, and 8 for USB cameras
input 8

# The video norm to use (only for video capture and TV tuner cards)
# Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0
(PAL)
norm 0

# The frequency to set the tuner to (kHz) (only for TV tuner cards)
(default: 0)
frequency 0

# Rotate image this number of degrees. The rotation affects all saved
images as
# well as mpeg movies. Valid values: 0 (default = no rotation), 90, 180
and 270.
rotate 0

# Image width (pixels). Valid range: Camera dependent, default: 352
width 1184

# Image height (pixels). Valid range: Camera dependent, default: 288
height 656

# Maximum number of frames to be captured per second.
# Valid range: 2-100. Default: 100 (almost no limit).
framerate 4

# Minimum time in seconds between capturing picture frames from the camera.
# Default: 0 = disabled - the capture rate is given by the camera framerate.
# This option is used when you want to capture images at a rate lower
than 2 per second.
minimum_frame_time 0

# URL to use if you are using a network camera, size will be
autodetected (incl http:// ftp:// or file:///)
# Must be a URL that returns single jpeg pictures or a raw mjpeg stream.
Default: Not defined
; netcam_url value

# Username and password for network camera (only if required). Default:
not defined
# Syntax is user:password
; netcam_userpass value

# The setting for keep-alive of network socket, should improve
performance on compatible net cameras.
# 1.0: The historical implementation using HTTP/1.0, closing the
socket after each http request.
# keep_alive: Use HTTP/1.0 requests with keep alive header to reuse the
same connection.
# 1.1: Use HTTP/1.1 requests that support keep alive as default.
# Default: 1.0
; netcam_http 1.0

# URL to use for a netcam proxy server, if required, e.g. "http://myproxy".
# If a port number other than 80 is needed, use "http://myproxy:1234".
# Default: not defined
; netcam_proxy value

# Set less strict jpeg checks for network cameras with a poor/buggy
firmware.
# Default: off
netcam_tolerant_check off

# Let motion regulate the brightness of a video device (default: off).
# The auto_brightness feature uses the brightness option as its target
value.
# If brightness is zero auto_brightness will adjust to average
brightness value 128.
# Only recommended for cameras without auto brightness
auto_brightness off

# Set the initial brightness of a video device.
# If auto_brightness is enabled, this value defines the average
brightness level
# which Motion will try and adjust to.
# Valid range 0-255, default 0 = disabled
brightness 0

# Set the contrast of a video device.
# Valid range 0-255, default 0 = disabled
contrast 0

# Set the saturation of a video device.
# Valid range 0-255, default 0 = disabled
saturation 0

# Set the hue of a video device (NTSC feature).
# Valid range 0-255, default 0 = disabled
hue 0


############################################################
# Round Robin (multiple inputs on same video device name)
############################################################

# Number of frames to capture in each roundrobin step (default: 1)
roundrobin_frames 1

# Number of frames to skip before each roundrobin step (default: 1)
roundrobin_skip 1

# Try to filter out noise generated by roundrobin (default: off)
switchfilter off


############################################################
# Motion Detection Settings:
############################################################

# Threshold for number of changed pixels in an image that
# triggers motion detection (default: 1500)
threshold 1500

# Automatically tune the threshold down if possible (default: off)
threshold_tune off

# Noise threshold for the motion detection (default: 32)
noise_level 32

# Automatically tune the noise threshold (default: on)
noise_tune on

# Despeckle motion image using (e)rode or (d)ilate or (l)abel (Default:
not defined)
# Recommended value is EedDl. Any combination (and number of) of E, e,
d, and D is valid.
# (l)abeling must only be used once and the 'l' must be the last letter.
# Comment out to disable
despeckle EedDl

# Detect motion in predefined areas (1 - 9). Areas are numbered like
that: 1 2 3
# A script (on_area_detected) is started immediately when motion
is 4 5 6
# detected in one of the given areas, but only once during an
event. 7 8 9
# One or more areas can be specified with this option. (Default: not
defined)
; area_detect value

# PGM file to use as a sensitivity mask.
# Full path name to. (Default: not defined)
; mask_file value

# Dynamically create a mask file during operation (default: 0)
# Adjust speed of mask changes from 0 (off) to 10 (fast)
smart_mask_speed 0

# Ignore sudden massive light intensity changes given as a percentage of
the picture
# area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
lightswitch 0

# Picture frames must contain motion at least the specified number of frames
# in a row before they are detected as true motion. At the default of 1, all
# motion is detected. Valid range: 1 to thousands, recommended 1-5
minimum_motion_frames 1

# Specifies the number of pre-captured (buffered) pictures from before
motion
# was detected that will be output at motion detection.
# Recommended range: 0 to 5 (default: 0)
# Do not use large values! Large values will cause Motion to skip video
frames and
# cause unsmooth mpegs. To smooth mpegs use larger values of
post_capture instead.
pre_capture 0

# Number of frames to capture after motion is no longer detected
(default: 0)
post_capture 0

# Gap is the seconds of no motion detection that triggers the end of an
event
# An event is defined as a series of motion images taken within a short
timeframe.
# Recommended value is 60 seconds (Default). The value 0 is allowed and
disables
# events causing all Motion to be written to one single mpeg file and no
pre_capture.
gap 60

# Maximum length in seconds of an mpeg movie
# When value is exceeded a new mpeg file is created. (Default: 0 = infinite)
max_mpeg_time 0

# Always save images even if there was no motion (default: off)
output_all off


############################################################
# Image File Output
############################################################

# Output 'normal' pictures when motion is detected (default: on)
# Valid values: on, off, first, best, center
# When set to 'first', only the first picture of an event is saved.
# Picture with most motion of an event is saved when set to 'best'.
# Picture with motion nearest center of picture is saved when set to
'center'.
# Can be used as preview shot for the corresponding movie.

#output_normal on
#output_normal first
#output_normal best
output_normal center

# Output pictures with only the pixels moving object (ghost images)
(default: off)
output_motion off

# The quality (in percent) to be used by the jpeg compression (default: 75)
quality 100

# Output ppm images instead of jpeg (default: off)
ppm off


############################################################
# FFMPEG related options
# Film (mpeg) file output, and deinterlacing of the video input
# The options movie_filename and timelapse_filename are also used
# by the ffmpeg feature
############################################################

# Use ffmpeg to encode mpeg movies in realtime (default: off)
ffmpeg_cap_new on

# Use ffmpeg to make movies with only the pixels moving
# object (ghost images) (default: off)
ffmpeg_cap_motion off

# Use ffmpeg to encode a timelapse movie
# Default value 0 = off - else save frame every Nth second
ffmpeg_timelapse 0

# The file rollover mode of the timelapse video
# Valid values: hourly, daily (default), weekly-sunday, weekly-monday,
monthly, manual
ffmpeg_timelapse_mode daily

# Bitrate to be used by the ffmpeg encoder (default: 400000)
# This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled)
ffmpeg_bps 500000

# Enables and defines variable bitrate for the ffmpeg encoder.
# ffmpeg_bps is ignored if variable bitrate is enabled.
# Valid values: 0 (default) = fixed bitrate defined by ffmpeg_bps,
# or the range 2 - 31 where 2 means best quality and 31 is worst.
ffmpeg_variable_bitrate 0

# Codec to used by ffmpeg for the video compression.
# Timelapse mpegs are always made in mpeg1 format independent from this
option.
# Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and
msmpeg4.
# mpeg1 - gives you files with extension .mpg
# mpeg4 or msmpeg4 - gives you files with extension .avi
# msmpeg4 is recommended for use with Windows Media Player because
# it requires no installation of codec on the Windows client.
# swf - gives you a flash film with extension .swf
# flv - gives you a flash video with extension .flv
# ffv1 - FF video codec 1 for Lossless Encoding ( experimental )
# mov - QuickTime ( testing )
ffmpeg_video_codec mpeg4


# Use ffmpeg to deinterlace video. Necessary if you use an analog camera
# and see horizontal combing on moving objects in video or pictures.
# (default: off)
ffmpeg_deinterlace off


############################################################
# Snapshots (Traditional Periodic Webcam File Output)
############################################################

# Make automated snapshot every N seconds (default: 0 = disabled)
snapshot_interval 0


############################################################
# Text Display
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second, %T = HH:MM:SS,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level, \n = new line,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event - do not use with text_event!
# You can put quotation marks around the text to allow
# leading spaces
############################################################

# Locate and draw a box around the moving object.
# Valid values: on, off and preview (default: off)
# Set to 'preview' will only draw a box in preview_shot pictures.
locate off

# Draws the timestamp using same options as C function strftime(3)
# Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock
# Text is placed in lower right corner
text_right %Y-%m-%d\n%T-%q

# Draw a user defined text on the images using same options as C
function strftime(3)
# Default: Not defined = no text
# Text is placed in lower left corner
; text_left CAMERA %t

# Draw the number of changed pixed on the images (default: off)
# Will normally be set to off except when you setup and adjust the
motion settings
# Text is placed in upper right corner
text_changes off

# This option defines the value of the special event conversion specifier %C
# You can use any conversion specifier in this option except %C. Date
and time
# values are from the timestamp of the first image in the current event.
# Default: %Y%m%d%H%M%S
# The idea is that %C can be used filenames and text_left/right for creating
# a unique identifier for each event.
text_event %Y%m%d%H%M%S

# Draw characters at twice normal size on images. (default: off)
text_double off


############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, jpeg_, mpeg_ and timelapse_filename
# you can use conversion specifiers
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# Quotation marks round string are allowed.
############################################################

# Target base directory for pictures and films
# Recommended to use absolute path. (Default: current working directory)
###target_dir /tmp/motion
target_dir /home/wei/Image/motion/tmp


# File path for snapshots (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-snapshot
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-snapshot
# File extension .jpg or .ppm is automatically added so do not include this.
# Note: A symbolic link called lastsnap.jpg created in the target_dir
will always
# point to the latest snapshot, unless snapshot_filename is exactly
'lastsnap'
snapshot_filename %v-%Y%m%d%H%M%S-snapshot

# File path for motion triggered images (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-%q
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
# File extension .jpg or .ppm is automatically added so do not include this
# Set to 'preview' together with best-preview feature enables special naming
# convention for preview shots. See motion guide for details
jpeg_filename %v-%Y_%m_%d_%H:%M'%S-%q
#jpeg_filename %v-%Y%m%d%H%M%S-%q

# File path for motion triggered ffmpeg films (mpeg) relative to target_dir
# Default: %v-%Y%m%d%H%M%S
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H%M%S
# File extension .mpg or .avi is automatically added so do not include this
# This option was previously called ffmpeg_filename
movie_filename %v-%Y_%m_%d_%H:%M'%S
#movie_filename %v-%Y%m%d%H%M%S

# File path for timelapse mpegs relative to target_dir
# Default: %Y%m%d-timelapse
# Default value is near equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d-timelapse
# File extension .mpg is automatically added so do not include this
timelapse_filename %Y%m%d-timelapse


############################################################
# Live Webcam Server
############################################################

# The mini-http server listens to this port for requests (default: 0 =
disabled)
webcam_port 8081

# Quality of the jpeg images produced (default: 50)
webcam_quality 50

# Output frames at 1 fps when no motion is detected and increase to the
# rate given by webcam_maxrate when motion is detected (default: off)
webcam_motion off

# Maximum framerate for webcam streams (default: 1)
webcam_maxrate 1

# Restrict webcam connections to localhost only (default: on)
webcam_localhost on

# Limits the number of images per connection (default: 0 = unlimited)
# Number can be defined by multiplying actual webcam rate by desired
number of seconds
# Actual webcam rate is the smallest of the numbers framerate and
webcam_maxrate
webcam_limit 0


############################################################
# HTTP Based Control
############################################################

# TCP/IP port for the http server to listen on (default: 0 = disabled)
control_port 8080

# Restrict control connections to localhost only (default: on)
control_localhost on

# Output for http server, select off to choose raw text plain (default: on)
control_html_output on

# Authentication for the http based control. Syntax username:password
# Default: not defined (Disabled)
; control_authentication username:password


############################################################
# Tracking (Pan/Tilt)
############################################################

# Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc,
4=generic, 5=uvcvideo)
# The generic type enables the definition of motion center and motion
size to
# be used with the conversion specifiers for options like on_motion_detected
track_type 0

# Enable auto tracking (default: off)
track_auto off

# Serial port of motor (default: none)
; track_port value

# Motor number for x-axis (default: 0)
track_motorx 0

# Motor number for y-axis (default: 0)
track_motory 0

# Maximum value on x-axis (default: 0)
track_maxx 0

# Maximum value on y-axis (default: 0)
track_maxy 0

# ID of an iomojo camera if used (default: 0)
track_iomojo_id 0

# Angle in degrees the camera moves per step on the X-axis
# with auto-track (default: 10)
# Currently only used with pwc type cameras
track_step_angle_x 10

# Angle in degrees the camera moves per step on the Y-axis
# with auto-track (default: 10)
# Currently only used with pwc type cameras
track_step_angle_y 10

# Delay to wait for after tracking movement as number
# of picture frames (default: 10)
track_move_wait 10

# Speed to set the motor to (stepper motor option) (default: 255)
track_speed 255

# Number of steps to make (stepper motor option) (default: 40)
track_stepsize 40


############################################################
# External Commands, Warnings and Logging:
# You can use conversion specifiers for the on_xxxx commands
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = thread (camera) number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# %f = filename with full path
# %n = number indicating filetype
# Both %f and %n are only defined for on_picture_save,
# on_movie_start and on_movie_end
# Quotation marks round string are allowed.
############################################################

# Do not sound beeps when detecting motion (default: on)
# Note: Motion never beeps when running in daemon mode.
quiet on

# Command to be executed when an event starts. (default: none)
# An event starts at first motion detected after a period of no motion
defined by gap
; on_event_start value

# Command to be executed when an event ends after a period of no motion
# (default: none). The period of no motion is defined by option gap.
; on_event_end value

# Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
# To give the filename as an argument to a command append it with %f
; on_picture_save value

# Command to be executed when a motion frame is detected (default: none)
; on_motion_detected value

# Command to be executed when motion in a predefined area is detected
# Check option 'area_detect'. (default: none)
; on_area_detected value

# Command to be executed when a movie file (.mpg|.avi) is created.
(default: none)
# To give the filename as an argument to a command append it with %f
; on_movie_start value

# Command to be executed when a movie file (.mpg|.avi) is closed.
(default: none)
# To give the filename as an argument to a command append it with %f
; on_movie_end value

# Command to be executed when a camera can't be opened or if it is lost
# NOTE: There is situations when motion doesn't detect a lost camera!
# It depends on the driver, some drivers don't detect a lost camera at all
# Some hang the motion thread. Some even hang the PC! (default: none)
; on_camera_lost value

############################################################
# Common Options For MySQL and PostgreSQL database features.
# Options require the MySQL/PostgreSQL options to be active also.
############################################################

# Log to the database when creating motion triggered image file
(default: on)
sql_log_image on

# Log to the database when creating a snapshot image file (default: on)
sql_log_snapshot on

# Log to the database when creating motion triggered mpeg file (default:
off)
sql_log_mpeg off

# Log to the database when creating timelapse mpeg file (default: off)
sql_log_timelapse off

# SQL query string that is sent to the database
# Use same conversion specifiers has for text features
# Additional special conversion specifiers are
# %n = the number representing the file_type
# %f = filename with full path
# Default value:
# insert into security(camera, filename, frame, file_type, time_stamp,
text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
sql_query insert into security(camera, filename, frame, file_type,
time_stamp, event_time_stamp) values('%t', '%f', '%q', '%n', '%Y-%m-%d
%T', '%C')


############################################################
# Database Options For MySQL
############################################################

# Mysql database to log to (default: not defined)
; mysql_db value

# The host on which the database is located (default: localhost)
; mysql_host value

# User account name for MySQL database (default: not defined)
; mysql_user value

# User password for MySQL database (default: not defined)
; mysql_password value


############################################################
# Database Options For PostgreSQL
############################################################

# PostgreSQL database to log to (default: not defined)
; pgsql_db value

# The host on which the database is located (default: localhost)
; pgsql_host value

# User account name for PostgreSQL database (default: not defined)
; pgsql_user value

# User password for PostgreSQL database (default: not defined)
; pgsql_password value

# Port on which the PostgreSQL database is located (default: 5432)
; pgsql_port 5432


############################################################
# Video Loopback Device (vloopback project)
############################################################

# Output images to a video4linux loopback device
# The value '-' means next available (default: not defined)
; video_pipe value

# Output motion images to a video4linux loopback device
# The value '-' means next available (default: not defined)
; motion_video_pipe value


##############################################################
# Thread config files - One for each camera.
# Except if only one camera - You only need this config file.
# If you have more than one camera you MUST define one thread
# config file for each camera in addition to this config file.
##############################################################

# Remember: If you have more than one camera you must have one
# thread file for each camera. E.g. 2 cameras requires 3 files:
# This motion.conf file AND thread1.conf and thread2.conf.
# Only put the options that are unique to each camera in the
# thread config files.
; thread /usr/local/etc/thread1.conf
; thread /usr/local/etc/thread2.conf
; thread /usr/local/etc/thread3.conf
; thread /usr/local/etc/thread4.conf

2011年12月21日 星期三

linux ubuntu web cam usb cam motion detection image shot

linux ubuntu web cam usb cam motion detection image shot


2011-12-20 10:47:11
WEB CAM APP.

motion
command line tool for detection, output jpeg or ppm or mpeg.

firefox open http://localhost:8080/

For "[1] mjpegtoyuv420p: Corrupt image ... continue" problem,

@oo:~$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion -n
run ok but once. because edit motion.conf. more careful to setup conf.
copy from /etc/
Only To:
target_dir /home/wei/Image/motion (存檔位置)
width 1184
height 656
quality 100

影片預設為swf
ffmpeg_video_codec msmpeg4

圖片設定
#output_normal on : 有變動就存。
#output_normal first : First picture of an event is saved
#output_normal best : 只存最大動作的圖。
#output_normal center : 只存一個動作中的中位。

執行指令:
~$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion -n -c
/home/wei/.motion/motion.conf


guvcview

Camorama webcam viewer
瀏覽、修改及儲存來自網路測影機的影像。

攝影機監視器
同上。

Kamoso
Take any picture with your web cam.


VLC
vlc v4l2:///dev/video0

===========================================================
target_dir /home/wei/Image/motion (存檔位置) 是固定的,所以要改用script
啟動並且依照時間產生存放的資料夾會有困難。
在script中建立變動的時間資料夾的連結,讓motion.conf固定去連結。
# tmp is fixed dir name in motion.conf. Need -T to link dir.#
LN="ln -sf -T $Home/$NowDir $Home/tmp"
echo `$LN`

===========================================================
#!/bin/bash
##
## Run motion at different dir each time.
##
Home="/home/wei/Image/motion"
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so
export LD_PRELOAD

MotionCommand="motion -c /home/wei/.motion/motion.conf -n"
#MotionCommand="LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion -c
/home/wei/.motion/motion.conf -n"
NowDir=`date +%F_%H_%M`
echo $NowDir
echo `pwd`
#cd /home/wei
#echo `pwd`
cd $Home
echo `pwd`
mkdir $NowDir
# tmp is fixed dir name in motion.conf. Need -T to link dir.#
LN="ln -sf -T $Home/$NowDir $Home/tmp"
echo `$LN`

#cd $NowDir
#echo `pwd`


## Run
$MotionCommand

linux ubuntu web cam usb cam motion detection image shot

linux ubuntu web cam usb cam motion detection image shot


2011-12-20 10:47:11
WEB CAM APP.

motion
command line tool for detection, output jpeg or ppm or mpeg.

firefox open http://localhost:8080/

For "[1] mjpegtoyuv420p: Corrupt image ... continue" problem,

@oo:~$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion -n
run ok but once. because edit motion.conf. more careful to setup conf.
copy from /etc/
Only To:
target_dir /home/wei/Image/motion (存檔位置)
width 1184
height 656
quality 100

影片預設為swf
ffmpeg_video_codec msmpeg4

圖片設定
#output_normal on : 有變動就存。
#output_normal first : First picture of an event is saved
#output_normal best : 只存最大動作的圖。
#output_normal center : 只存一個動作中的中位。

執行指令:
~$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion -n -c
/home/wei/.motion/motion.conf


guvcview

Camorama webcam viewer
瀏覽、修改及儲存來自網路測影機的影像。

攝影機監視器
同上。

Kamoso
Take any picture with your web cam.


VLC
vlc v4l2:///dev/video0

===========================================================
target_dir /home/wei/Image/motion (存檔位置) 是固定的,所以要改用script
啟動並且依照時間產生存放的資料夾會有困難。
在script中建立變動的時間資料夾的連結,讓motion.conf固定去連結。
# tmp is fixed dir name in motion.conf. Need -T to link dir.#
LN="ln -sf -T $Home/$NowDir $Home/tmp"
echo `$LN`

2011年12月20日 星期二

linux ubuntu web cam usb cam motion detection image shot

linux ubuntu web cam usb cam motion detection image shot


2011-12-20 10:47:11
WEB CAM APP.

motion
command line tool for detection, output jpeg or ppm or mpeg.

firefox open http://localhost:8080/

For "[1] mjpegtoyuv420p: Corrupt image ... continue" problem,

@oo:~$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion -n
run ok but once. because edit motion.conf. more careful to setup conf.
copy from /etc/
Only To:
target_dir /home/wei/Image/motion (存檔位置)
width 1184
height 656
quality 100

影片預設為swf
ffmpeg_video_codec msmpeg4

圖片設定
#output_normal on : 有變動就存。
#output_normal first : First picture of an event is saved
#output_normal best : 只存最大動作的圖。
#output_normal center : 只存一個動作中的中位。

執行指令:
~$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motion -n -c
/home/wei/.motion/motion.conf


guvcview

Camorama webcam viewer
瀏覽、修改及儲存來自網路測影機的影像。

攝影機監視器
同上。

Kamoso
Take any picture with your web cam.


VLC
vlc v4l2:///dev/video0

2011年12月16日 星期五

ubuntu 11.10 選單語言切換 中文 英文 (有圖)

如在安裝時沒有選擇中文繁體(台灣),裝完進入系統後可以在language新安裝中
文。重點是:中文繁體會在選單的最下方,要用滑鼠拉到最上面。

2011年12月13日 星期二

今夜小

今夜小雨過半夜,
蕭瑟無語對淒涼。
唯有陳酒當入喉,
苦辣
辛酸我自知。

2011年12月12日 星期一

官迫官反:役所之掟及日本中樞之崩壞 - 知日部屋 - 哈日反日不如知日

http://www.cuhkacs.org/~benng/Bo-Blog/read.php?1265

...長期在美國生活的宮本回到日本出任公務員後,總覺事事不順。集體主義、長官至上主義、按 傳統辦事主義及長工時低效率都令他難以接受。因為常與上司及同事衝突,成為被疏遠及排擠的對象。...


...他痛批各省敵對,互不協 調。各省內部派系林立,內鬥不斷。...



各種社會化組織好像都是這樣的喔,機關 公司 大學 等等,有人就有江湖阿@@

2011年11月28日 星期一

Xming 使用說明

http://www.cs.nctu.edu.tw/help/xming.html

http://blog.jangmt.com/2009/11/xming.html

關閉 開啟 windows開機自動執行的程式 msconfig

關閉 開啟 windows開機自動執行的程式 msconfig

開始->執行->輸入msconfig

EX: 每次開機都會跑出視窗的Windows Live Messenger.

2011年11月24日 星期四

利用WINAMP撥放線上樂台音樂

1. 裝WINAMP。

2. http://www.shoutcast.com/radio/Metal 選一個你想聽的

3. 複製網址,WINAMP撥放->選擇URL->貼上網址。

2011年11月8日 星期二

公發W7系統可以硬碟直接轉移[update2011_11_08]

公發"W7光碟"安裝的系統沒有鎖硬體,所以可以直接把硬碟拿去其他中心電腦
上直接使用,差別是不同硬體如網卡、顯卡需要另外安裝驅動。

公發"W7光碟"安裝之系統,沒有鎖硬體所以可以直接移到其他電腦上工作。只
需要另外裝硬體驅動如網卡顯卡等。避免重灌耗費資源與人力。

一般OEM隨機版會鎖硬體號碼,所以不能在其他電腦或是不同機型電腦轉換使用。


測試結果:

HP DC7800CMT 原200G硬碟壞軌,拷貝IMAGE到新2T硬碟使用。

將此硬碟拔到ASUS中信局機器使用,可以開進系統,但網卡與顯卡沒驅動。
{update}重新安裝ASUS網卡與顯卡驅動可以正常,但是office會偵測到硬體改變需
要重新網路啟動或是電話啟動不然30天內失效。


使用clonezilla拷貝W7時只拷貝分割區是不能用GRUB重裝來解決的(linux可以),
最後只好整顆硬碟拷貝,但是空白處是不會拷所以也很快,2T(250G資料)約一小時
左右。
大硬碟拷到小硬碟,可以先用磁碟調整程式弄小,把沒用的區塊刪除(沒有分割
表),再整顆拷到小硬碟中。

WS7系統:也許!?
1.可以一起拷sda1 sda2,也許可以把MBR boot loader移植。
2.再不行就要手動把src hdd的前512 DD到 new hdd裡。
(注:拷貝分割區,就會自動把分割表一起拷貝了。)

2011年10月20日 星期四

2011_10_19_DELL_兩顆SAS其中 Linux開機過久失敗問題

give up waiting for boot device /dev/disk/by-uuid does not exist

¥D­n¬O¦]¬°SASµ¥¹L¤[¡A·í²¾°£W7ªºSAS¥i¥H¥¿±`¶}¾÷¦ý¤£¤è«K¡C

¶i¤Jinitramfs«á¥i¥Hµyµ¥ ¦Aexit¦Aenter§Y¥i

©Î¬O­×§ïrootdelay=90¡C


¨Ó·½:
http://ubuntuforums.org/showthread.php?t=1068895
http://ubuntuforums.org/showthread.php?t=15319992011_10_19_DELL_兩顆SAS其中 Linux開機過久失敗問題


give up waiting for boot device /dev/disk/by-uuid/(long ID) does not exist

主要是因為SAS等過久,當移除W7的SAS可以正常開機但不方便。

進入initramfs後可以稍等 再exit再enter即可

或是修改rootdelay=90。


來源:
http://ubuntuforums.org/showthread.php?t=1068895
http://ubuntuforums.org/showthread.php?t=1531999

2011年9月7日 星期三

熄火後錄影 目擊者行車記錄器

總結:加個保護晶片直接連上電瓶電源,另外,施工費還是給人家賺吧!!


http://anniewu727.pixnet.net/blog/post/28024325-%E7%9B%AE%E6%93%8A%E8%80%85%E8%A1%8C%E8%BB%8A%E8%A8%98%E9%8C%84%E5%99%A8

電路保護 器:

我們 希望在車子熄火後,也能夠執行錄影功能,所以要再加裝電路保護器。

電路 保護器需另加NTD 1500,取得後,拿到尋易科 技斜對面的汽車音響店安裝。

當天 我們是業者張先生的第一台安裝車,雖然不用排隊,但也等了近一個小時。

 p.s. 安裝費NTD 700 另 付。


八大 原公司
http://clie.ws/bbs/index.php?showtopic=166149

嚴禁熄火下車繼續錄影,若因高溫造成設備損壞恕不保固! 為了因應有下車熄火錄影者需求,特別開發了"電壓溫度偵測斷電保護器"

為了因應有下車熄火錄影者需求
特別開發了"電壓溫度偵測保護器"
若有需要 每組1500元
文章圖片

也就是當車廂溫度高達50度以上
或是電壓低於12V以下
保護器會自動斷電
讓您不用擔心車子發不動或高溫造成的損壞

下車繼續錄影線路改裝示意圖 (未加裝保護器線路)

也就是讓正電有兩個來源
一個過鑰匙孔 (ACC)
一個不過鑰匙孔 (BAT)
用開關切換供電方式

電源線不建議直接將雪茄頭剪掉(因內有保險絲保護)
建議透過點煙孔延長線方式 (如下圖示)
圖掛了



安裝版
http://clie.ws/bbs/index.php?showtopic=166617






2011年9月2日 星期五

3D 建模 場景 render表











http://en.wikipedia.org/wiki/3D_computer_graphics_software


Commercial packages

A basic comparison including release date/version information can be found on the Comparison of 3D computer graphics software page. A comprehensive comparison of significant 3D packages can be found at CG Society Wiki and TDT3D 3D applications 2007 comparisons table..

  • 3ds Max (Autodesk), originally called 3D Studio MAX, is a comprehensive and versatile 3D application used in film, television, video games and architecture for Windows and Apple Macintosh. It can be extended and customized through its SDK or scripting using a Maxscript. It can use third party rendering options such as Brazil R/S, finalRender and V-Ray.
  • AC3D (Inivis) is a 3D modeling application that began in the 90's on the Amiga platform. Used in a number of industries, MathWorks actively recommends it in many of their aerospace-related articles[1] due to price and compatibility. AC3D does not feature its own renderer, but can generate output files for both RenderMan and POV-Ray among others.
  • Animation:Master from HASH, Inc is a modeling and animation package that focuses on ease of use. It is a spline-based modeler. Its strength lies in character animation.
  • Bryce (DAZ Productions) is most famous for landscapes and creating 'painterly' renderings, as well as its unique user interface.
  • Carrara (DAZ Productions) is a fully featured 3D toolset for modeling, texturing, scene rendering and animation.
  • Cinema 4D (MAXON) is a light (Prime) to full featured (Studio) 3d package dependant on version used. Although used in film usually for 2.5d work, Cinema's largest user base is in the television motion graphics and design/visualisation arenas. Originally developed for the Amiga, it is also available for Mac OS X and Windows.
  • form•Z (AutoDesSys, Inc.) is a general purpose solid/surface 3D modeler. Its primary use is for modeling, but it also features photo realistic rendering and object-centric animation support. form•Z is used in architecture, interior design, illustration, product design, and set design. It supports plug-ins and scripts, has import/export capabilities and was first released in 1991. It is currently available for both Mac OS X and Windows.
  • Grome is a professional outdoor scene modeler (terrain, water, vegetation) for games and other 3D real-time applications.
  • Houdini (Side Effects Software) is used for visual effects and character animation. It was used in Disney's feature film The Wild.[4] Houdini uses a non-standard interface that it refers to as a "NODE system". It has a hybrid micropolygon-raytracer renderer, Mantra, but it also has built-in support for commercial renderers like Pixar's RenderMan and mental ray.
  • Inventor (Autodesk) The Autodesk Inventor is for 3D mechanical design, product simulation, tooling creation, and design communication.
  • LightWave 3D (NewTek), first developed for the Amiga, was originally bundled as part of the Video Toaster package and entered the market as a low cost way for TV production companies to create quality CGI for their programming. It first gained public attention with its use in the TV series Babylon 5[5] and is used in several contemporary TV series.[6][7][8] Lightwave is also used in a variety of modern film productions.[9][10] It is available for both Windows and Mac OS X.
  • MASSIVE is a 3D animation system for generating crowd-related visual effects, targeted for use in film and television. Originally developed for controlling the large-scale CGI battles in The Lord of the Rings,[11] Massive has become an industry standard for digital crowd control in high-end animation[citation needed] and has been used on several other big-budget films. It is available for various Unix and Linux platforms as well as Windows.
  • Maya (Autodesk) is currently used in the film, television, and gaming industry. Maya has developed over the years into an application platform in and of itself through extendability via its MEL programming language. It is available for Windows, Linux and Mac OS X.
  • Modo (Luxology) is a subdivision modeling, texturing and rendering tool with support for camera motion and morphs/blendshapes.and is now used in the Television Industry It is available for both Windows and Mac OS X.
  • Mudbox is a high resolution brush-based 3D sculpting program, that claims to be the first of its type. The software was acquired by Autodesk in 2007, and has a current rival in its field known as ZBrush (see above).
  • Mycosm is a high-quality virtual world development engine software that uses the open source Python programming language and currently runs on Windows using the DirectX engine. The software was released in 2011, and allows photo-realistic simulations to be created that feature physics, atmospherics, terrain sculpting, CG Foliage, astronomically correct sun and stars, fluid dynamics and many other vanguard features. Mycosm is created by Simmersion Holdings Pty. in Canberra, the capital of Australia.
  • NX ( Siemens PLM Software) is an integrated suite of software for computer-aided mechanical design (mechanical CAM), computer-aided manufacturing (CAM), and computer-aided engineering (CAE) formed by combining the former Unigraphics and SDRC I-deas software product lines.[12] NX is currently available for the following operating systems: Windows XP and Vista, Apple Mac OS X,[13] and Novell SUSE Linux.[14]
  • Poser (Smith Micro) Poser is a 3D rendering and animation software program optimized for models that depict the human figure in three-dimensional form and is specialized for adjusting features of preexisting character models via varying parameters. It is also for posing and rendering of models and characters. It includes some specialized tools for walk cycle creation, cloth and hair.
  • RealFlow simulates and renders particle systems of rigid bodies and fluids.
  • Realsoft3D Real3D Full featured 3D modeling, animation, simulation and rendering software available for Windows, Linux, Mac OS X and Irix.
  • Rhinoceros 3D is a commercial modeling tool which has excellent support for freeform NURBS editing.
  • Shade_3D is a commercial modeling/rendering/animation tool from Japan with import/export format support for Adobe, Social Worlds, and Quicktime among others.
  • SketchUp Pro (Google) is a 3D modeling package that features a sketch-based modeling approach. It has a pro version which supports 2D and 3D model export functions among other features. A free version is integrated with Google Earth and limits export to Google's "3D Warehouse", where users can share their content.
  • Softimage (Autodesk) Softimage (formerly Softimage|XSI) is a 3D modeling and animation package that integrates with mental ray rendering. It is feature-similar to Maya and 3ds Max and is used in the production of professional films, commercials, video games, and other media.
  • Solid Edge ( Siemens PLM Software) is a commercial application for design, drafting, analysis, and simulation of products, systems, machines and tools. All versions include feature-based parametric modeling, assembly modeling, drafting, sheetmetal, weldment, freeform surface design, and data management.[15] Application-programming interfaces enable scripting in Visual Basic and C programming.
  • solidThinking (solidThinking) is a 3D solid/surface modeling and rendering suite which features a construction tree method of development. The tree is the "history" of the model construction process and allows real-time updates when modifications are made to points, curves, parameters or entire objects.
  • SolidWorks (SolidWorks Corporation) is an application used for the design, detailing and validation of products, systems, machines and toolings. All versions include modeling, assemblies, drawing, sheetmetal, weldment, and freeform surfacing functionality. It also has support for scripting in Visual Basic and C.
  • Spore (Maxis) is a game that revolutionized the gaming industry by allowing users to design their own fully functioning creatures with a very rudimentary, easy-to-use interface. The game includes a COLLADA exporter, so models can be downloaded and imported into any other 3D software listed here that supports the COLLADA format. Models can also be directly imported into game development software such as Unity (game engine).
  • Vue (E-on Software) is a tool for creating, animating and rendering natural 3D environments. It was most recently used to create the background jungle environments in the 2nd and 3rd Pirates of the Caribbean films.[16]
  • ZBrush (Pixologic) is a digital sculpting tool that combines 3D/2.5D modeling, texturing and painting tool available for Mac OS X and Windows. It is used to create normal maps for low resolution models to make them look more detailed.

[edit] Free packages

  • 3D Canvas (now called 3D Crafter) is a 3D modeling and animation tool available in a freeware version, as well as paid versions (3D Canvas Plus and 3D Canvas Pro).
  • Anim8or is a proprietary freeware 3D rendering and animation package.
  • Art of Illusion is a free software package developed under the GPL.
  • AutoQ3D Community is not a professional CAD program and it is focused to beginners who want to make rapid 3D designs. It is a free software package developed under the GPL.
  • Blender (Blender Foundation) is a free, open source, 3D studio for animation, modeling, rendering, and texturing offering a feature set comparable to commercial 3D animation suites. It is developed under the GPL and is available on all major platforms including Windows, OS X, Linux, BSD, Solaris and Irix.
  • Cheetah3D is proprietary freeware for Apple Macintosh computers primarily aimed at amateur 3D artists with some medium- and high-end features
  • DAZ Studio a free 3D rendering tool set for adjusting parameters of preexisting models, posing and rendering them in full 3D scene environments. Imports objects created in Poser and is similar to that program, but with fewer features.
  • DX Studio a complete integrated development environment for creating interactive 3D graphics. The system comprises both a real-time 3D engine and a suite of editing tools, and is the first product to offer a complete range of tools in a single IDE.
  • Evolver is a portal for 3D computer characters incorporating a human (humanoid) builder and a cloner to work from picture.
  • FaceGen is a source of human face models for other programs. Users are able to generate face models either randomly or from input photographs.
  • Geist3D is a free software program for real-time modeling and rendering three-dimensional graphics and animations.
  • GMax
  • GPure is a software to prepare scene/meshes from digital mockup to multiple uses
  • K-3D is a GNU modeling, animation, and rendering system available on Linux and Win32. It makes use of RenderMan-compliant render engines. It features scene graph procedural modelling similar to that found in Houdini.
  • MakeHuman is a GPL program that generates 3D parametric humanoids.
  • MeshLab is a free Windows, Linux and Mac OS X application for visualizing, simplifying, processing and converting large three dimensional meshes to or from a variety of 3D file formats.
  • NaroCAD a fully fledged and extensible 3D parametric modeling CAD application. It is based on OpenCascade. The goal of this project is to develop a fully fledged and extensible 3D CAD software based on the concept of parametric modeling of solids, comparable to well known solutions.
  • OpenFX is a modeling and animation studio, distributed under the GPL.
  • Seamless3d NURBS based modelling and animation software with much of the focus on creating avatars optimized for real time animation. It is free, open source under the MIT license.
  • trueSpace (Caligari Corporation) is a 3D program available for Windows, although the company Caligari first found its start on the Amiga platform. trueSpace features modeling, animation, 3D-painting, and rendering capabilities. In 2009, Microsoft purchased TrueSpace and it is now available completely free of charge.
  • Wings 3D is a BSD-licensed, subdivision modeler.

[edit] Renderers

  • 3Delight is a proprietary RenderMan-compliant renderer.
  • Aqsis is an free and open source rendering suite compliant with the RenderMan standard.
  • Brazil is a rendering engine for 3ds Max, Rhino and VIZ
  • FinalRender is a photorealistic renderer for Maya and 3Ds Max developed by Cebas, a German company.
  • FPrime for Lightwave adds a very fast preview and can in many cases be used for final rendering.
  • Gelato is a hardware-accelerated, non-real-time renderer created by graphics card manufacturer NVIDIA.
  • Indigo Renderer is an unbiased photorealistic renderer that uses XML for scene description. Exporters available for Blender, Maya (Mti), form•Z, Cinema4D, Rhino, 3ds Max.
  • Kerkythea is a freeware rendering system that supports raytracing. Currently, it can be integrated with 3ds Max, Blender, SketchUp, and Silo (generally any software that can export files in obj and 3ds formats). Kerkythea is a standalone renderer, using physically accurate materials and lighting.
  • LuxRender is an unbiased open source rendering engine featuring Metropolis light transport
  • Maxwell Render is a multi-platform renderer which forgoes raytracing, global illumination and radiosity in favor of photon rendering with a virtual electromagnetic spectrum, resulting in very authentic looking renders. It was the first unbiased render to market.[citation needed]
  • mental ray is another popular renderer, and comes default with most of the high-end packages. (Now owned by NVIDIA)
  • NaroCAD is a fully fledged and extensible 3D parametric modeling CAD application. It is based on OpenCascade.
  • Octane Render is an unbiased GPU-accelerated renderer based on Nvidia CUDA.
  • Pixar's PhotoRealistic RenderMan is a renderer, used in many studios. Animation packages such as 3DS Max and Maya can pipeline to RenderMan to do all the rendering.
  • Pixie is an open source photorealistic renderer.
  • POV-Ray (or The Persistence of Vision Raytracer) is a freeware (with source) ray tracer written for multiple platforms.
  • Sunflow is an open source, photo-realistic renderer written in Java.
  • Turtle (Illuminate Labs) is an alternative renderer for Maya, it specializes in faster radiosity and automatic surface baking technology which further enhances its speedy renders.
  • VRay is promoted for use in the architectural visualization field used in conjunction with 3ds max and 3ds viz. It is also commonly used with Maya.
  • YafRay is a raytracer/renderer distributed under the LGPL. This project is no longer being actively developed.
  • YafaRay YafRay's successor, a raytracer/renderer distributed under the LGPL.

[edit] Related to 3D software

  • Swift3D is the marquee tool for producing vector-based 3D content for Flash. Also comes in plug-in form for transforming models in Lightwave or 3DS Max into Flash animations.
  • Match moving software is commonly used to match live video with computer-generated video, keeping the two in sync as the camera moves.
  • After producing video, studios then edit or composite the video using programs such as Adobe Premiere or Apple Final Cut at the low end, or Autodesk Combustion, Digital Fusion, Apple Shake at the high-end.
  • MetaCreations Detailer and Painter 3D are discontinued software applications specifically for painting texture maps on 3-D Models.
  • Simplygon A commercial mesh processing package for remeshing general input meshes into real-time renderable meshes.
  • Pixar Typestry is an abandonware 3D software program released in the 1990s by Pixar for Apple Macintosh and DOS-based PC computer systems. It rendered and animated text in 3d in various fonts based on the user's input.