netcam and bktr0 not working in one config..
Question
I have netcam Dlink DCS-5320 and
AverTV Tuner PCI. And this not work in one time... Standalone Dlink working. (I'm only comment thread string!!!) Standalove
AverTV working too... If uncomment all threads with bktr device - netcam not working...
PS: I'm modify param netcam_http to 1.0, 1.1, keep_alive - not working..
PSS: I'm modify param netcam_urt to ftp-url - not working..
PSSS: Try use
FreeBSD 8.0 - not working..
FreeBSD 5.4-RELEASE:
bktr0@pci2:12:0: class=0x040000 card=0x00031461 chip=0x036e109e rev=0x11 hdr=0x00
vendor = 'Brooktree Corporation'
device = 'Bt878 MediaStream Controller'
class = multimedia
subclass = video
motion.conf:
daemon on
process_id_file /var/run/motion.pid
setup_mode off
thread /usr/local/etc/motion/bktr0.conf
thread /usr/local/etc/motion/cam01.conf
bktr0.conf:
videodevice /dev/bktr0
v4l2_palette 8
tunerdevice /dev/tuner0
input 0
norm 0
frequency 0
rotate 0
width 640
height 480
framerate 2
minimum_frame_time 0
#netcam_url
auto_brightness off
brightness 0
contrast 0
saturation 0
hue 0
threshold 1500
threshold_tune off
noise_level 32
noise_tune on
despeckle EedDl
quality 100
ffmpeg_cap_new on
ffmpeg_cap_motion off
ffmpeg_timelapse 0
ffmpeg_timelapse_mode daily
ffmpeg_bps 500000
ffmpeg_variable_bitrate 0
ffmpeg_video_codec mpeg4
ffmpeg_deinterlace off
snapshot_interval 0
locate off
text_right %Y-%m-%d\n%T-%q
# text_left CAMERA %t
text_changes off
text_event %Y%m%d%H%M%S
text_double off
target_dir /var/www/docs/motion/tv1
snapshot_filename %Y/%m%d-snapshot/%H%M%S-%v-snapshot
jpeg_filename %Y/%m%d-jpeg/%H%M%S-%q-%v
movie_filename %Y/%m%d-avi/%H%M%S-%v
timelapse_filename %Y/%m%d/timelapse
webcam_port 8012
webcam_quality 50
webcam_motion off
webcam_maxrate 1
webcam_localhost off
webcam_limit 0
quiet on
cam01.conf:
netcam_url http://192.168.0.211/cgi-bin/video.jpg
netcam_userpass admin:pass
netcam_http 1.0
netcam_tolerant_check off
threshold 1500
threshold_tune off
noise_level 32
noise_tune on
despeckle EedDl
smart_mask_speed 0
lightswitch 0
minimum_motion_frames 1
pre_capture 0
post_capture 0
gap 60
max_mpeg_time 0
output_all off
output_normal on
output_motion off
quality 100
ppm off
ffmpeg_cap_new on
ffmpeg_cap_motion off
ffmpeg_timelapse 0
ffmpeg_timelapse_mode daily
ffmpeg_bps 500000
ffmpeg_variable_bitrate 0
ffmpeg_video_codec mpeg4
ffmpeg_deinterlace off
snapshot_interval 0
locate off
text_right %Y-%m-%d\n%T-%q
text_changes off
text_event %Y%m%d%H%M%S
text_double off
target_dir /var/www/docs/motion
snapshot_filename %Y/%m%d-snapshot/%H%M%S-%v-snapshot
jpeg_filename %Y/%m%d-jpeg/%H%M%S-%q-%v
movie_filename %Y/%m%d-avi/%H%M%S-%v
timelapse_filename %Y/%m%d/timelapse
webcam_port 8010
webcam_quality 50
webcam_motion off
webcam_maxrate 1
webcam_localhost off
webcam_limit 0
control_port 0
quiet on
# motion -d7 -n
Nov 30 11:43:47 server motion: [134897664] Processing thread 0 - config file /usr/local/etc/motion.conf
Nov 30 11:43:47 server motion: [134897664] Processing config file /usr/local/etc/motion/bktr0.conf
Nov 30 11:43:47 server motion: [134897664] Processing config file /usr/local/etc/motion/cam01.conf
Nov 30 11:43:47 server motion: [134897664] Motion 3.2.11 Started
Nov 30 11:43:47 server motion: [134897664] ffmpeg LIBAVCODEC_BUILD 3357952 LIBAVFORMAT_BUILD 3412480
Nov 30 11:43:47 server motion: [0] Thread 1 is from /usr/local/etc/motion/bktr0.conf
Nov 30 11:43:47 server motion: [0] Thread 2 is from /usr/local/etc/motion/cam01.conf
Nov 30 11:43:47 server motion: [1] Thread 1 started
Nov 30 11:43:47 server motion: [1] v4l_start: METEORCAPTUR METEOR_CAP_CONTINOUS
Nov 30 11:43:47 server motion: [2] Thread 2 started
Nov 30 11:43:47 server motion: [2] Camera thread starting...
Nov 30 11:43:47 server motion: [2] netcam_start: Netcam_http parameter '1.0' converts to flags: HTTP1.0:1 HTTP1.1: 0 Keep-Alive OFF.
Nov 30 11:43:47 server motion: [2] netcam_setup_html: Netcam has flags: HTTP1.0: 1 HTTP1.1: 0 Keep-Alive OFF.
Nov 30 11:43:47 server motion: [2] netcam_connect, disconnecting netcam since keep-alive not set.
Nov 30 11:43:47 server motion: [2] netcam_connect with no keepalive, new socket created fd 5
Nov 30 11:43:47 server motion: [2] Received first header ('')
Nov 30 11:43:47 server motion: [2] Error reading first header ()
Nov 30 11:43:47 server motion: [2] Error reading first header - re-trying
Nov 30 11:43:47 server motion: [2] netcam_connect, disconnecting netcam since keep-alive not set.
Nov 30 11:43:47 server motion: [2] netcam_connect with no keepalive, new socket created fd 5
Nov 30 11:43:47 server motion: [2] Received first header ('')
Nov 30 11:43:47 server motion: [2] Error reading first header ()
Nov 30 11:43:47 server motion: [2] Error reading first header - re-trying
Nov 30 11:43:47 server motion: [2] netcam_connect, disconnecting netcam since keep-alive not set.
Nov 30 11:43:47 server motion: [2] netcam_connect with no keepalive, new socket created fd 5
Nov 30 11:43:47 server motion: [2] Received first header ('')
Nov 30 11:43:47 server motion: [2] Error reading first header ()
Nov 30 11:43:47 server motion: [2] Error reading first header - re-trying
Nov 30 11:43:47 server motion: [2] netcam_connect, disconnecting netcam since keep-alive not set.
Nov 30 11:43:47 server motion: [2] netcam_connect with no keepalive, new socket created fd 5
Nov 30 11:43:47 server motion: [2] Received first header ('')
Nov 30 11:43:47 server motion: [2] Error reading first header ()
Nov 30 11:43:47 server motion: [2] Error reading first header - re-trying
Nov 30 11:43:47 server motion: [2] netcam_connect, disconnecting netcam since keep-alive not set.
Nov 30 11:43:47 server motion: [2] netcam_connect with no keepalive, new socket created fd 5
Nov 30 11:43:47 server motion: [2] Received first header ('')
Nov 30 11:43:47 server motion: [2] Error reading first header ()
Nov 30 11:43:47 server motion: [2] Error reading first header - re-trying
Nov 30 11:43:47 server motion: [2] Failed to read first camera header - giving up for now
Nov 30 11:43:47 server motion: [2] Could not fetch initial image from camera
Nov 30 11:43:47 server motion: [2] Motion continues using width and height from config file(s)
Nov 30 11:43:47 server motion: [2] Resizing pre_capture buffer to 1 items
Nov 30 11:43:47 server motion: [2] Started stream webcam server in port 8010
Nov 30 11:43:48 server motion: [0] DEBUG-2 threads_running 2 motion_threads_running 2 , finish 0
Nov 30 11:43:48 server motion: [1] HUE [0]
Nov 30 11:43:48 server motion: [1] SATURATION [90]
Nov 30 11:43:48 server motion: [1] BRIGHTNESS [0]
Nov 30 11:43:48 server motion: [1] CONTRAST [108]
Nov 30 11:43:48 server motion: [1] Resizing pre_capture buffer to 1 items
Nov 30 11:43:48 server motion: [1] Started stream webcam server in port 8012
Nov 30 11:43:49 server motion: [0] DEBUG-2 threads_running 2 motion_threads_running 2 , finish 0
Nov 30 11:43:50 server motion: [2] Retrying until successful connection with camera
Nov 30 11:43:50 server motion: [2] Camera thread starting...
Nov 30 11:43:50 server motion: [2] netcam_start: Netcam_http parameter '1.0' converts to flags: HTTP1.0:1 HTTP1.1: 0 Keep-Alive OFF.
Nov 30 11:43:50 server motion: [2] netcam_setup_html: Netcam has flags: HTTP1.0: 1 HTTP1.1: 0 Keep-Alive OFF.
Nov 30 11:43:50 server motion: [2] netcam_connect, disconnecting netcam since keep-alive not set.
Nov 30 11:43:50 server motion: [2] netcam_connect with no keepalive, new socket created fd 7
Nov 30 11:43:50 server motion: [2] Received first header ('')
Nov 30 11:43:50 server motion: [2] Error reading first header ()
Nov 30 11:43:50 server motion: [2] Error reading first header - re-trying
Nov 30 11:43:50 server motion: [2] netcam_connect, disconnecting netcam since keep-alive not set.
Nov 30 11:43:50 server motion: [2] netcam_connect with no keepalive, new socket created fd 7
Nov 30 11:43:50 server motion: [2] Received first header ('')
Nov 30 11:43:50 server motion: [2] Error reading first header ()
Nov 30 11:43:50 server motion: [2] Error reading first header - re-trying
Nov 30 11:43:50 server motion: [2] netcam_connect, disconnecting netcam since keep-alive not set.
Nov 30 11:43:50 server motion: [2] netcam_connect with no keepalive, new socket created fd 7
Nov 30 11:43:50 server motion: [2] Received first header ('')
Nov 30 11:43:50 server motion: [2] Error reading first header ()
Nov 30 11:43:50 server motion: [2] Error reading first header - re-trying
Nov 30 11:43:50 server motion: [2] netcam_connect, disconnecting netcam since keep-alive not set.
Nov 30 11:43:50 server motion: [2] netcam_connect with no keepalive, new socket created fd 7
Nov 30 11:43:50 server motion: [2] Received first header ('')
Nov 30 11:43:50 server motion: [2] Error reading first header ()
Nov 30 11:43:50 server motion: [2] Error reading first header - re-trying
Nov 30 11:43:50 server motion: [2] netcam_connect, disconnecting netcam since keep-alive not set.
Nov 30 11:43:50 server motion: [2] netcam_connect with no keepalive, new socket created fd 7
Nov 30 11:43:50 server motion: [2] Received first header ('')
Nov 30 11:43:50 server motion: [2] Error reading first header ()
Nov 30 11:43:50 server motion: [2] Error reading first header - re-trying
Nov 30 11:43:50 server motion: [2] Failed to read first camera header - giving up for now
Nov 30 11:43:50 server motion: [0] DEBUG-2 threads_running 2 motion_threads_running 2 , finish 0
Nov 30 11:43:51 server motion: [0] DEBUG-2 threads_running 1 motion_threads_running 1 , finish 1
Nov 30 11:43:51 server motion: [1] Calling vid_close() from motion_cleanup
Nov 30 11:43:51 server motion: [1] vid_close: Closing video device /dev/bktr0
Nov 30 11:43:52 server motion: [0] DEBUG-1 threads_running 0 motion_threads_running 0 , finish 1
Nov 30 11:43:53 server motion: [0] Motion terminating
Environment
Motion version: |
3.2.11, 3.2.12 |
ffmpeg version: |
|
Libraries: |
ffmpeg, libjpeg7 |
Server OS: |
FreeBSD 5.4, FreeBSD 8.0 |
--
JeffMcCorney - 30 Nov 2009
Answer