LinuxForum.Fans
Тема

Avreg

Автор: Alex33 9 сообщений 5245 просмотров
#105640

Простите если пишу не сюда. У меня проблема. Не давно установил видеонаблюдение на Ubuntu с помощью программы Avreg. И вот проблема: сервер avreg-а работает, но не могу управлять им через веб-интерфейс. Выдаёт ошибку: sudo: no tty present and no askpass program specified. На их сайте нашёл настройки sudo, но не помогло :( . Помогите кто знает. Я в линуксе ко всему новичок.

#105700

Можно посмотреть Ваш sudoers?

#105939

Хорошо. Я постараюсь сёдня вечером выложить. Дело в том, что сама станция с поднятым avreg-ом находиться удалённо и к тому же нет возможности подключиться к ней по сети. Может сразу ещё какие файлы сбросить?

#106387

Хочу выложить sudoers, сведения об оборудовании, и лог не знаю куда скинуть oO

#106389

Alex33, как один из вариантов: прямо сюда, единственная просьба — используйте тэги spoiler.

#106391

Простите не знаю как через spoiler

#106392
Alex33 написал:
Простите не знаю как через spoiler

Над окном создания сообщения виден ряд значков: третий справа значок со знаком вопроса.
Или добавьте соответствующие тэги вручную

#106400

Ну надеюсь сделаю правильно. Итак sudoers

Показать
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults env_reset

# Host alias specification
Host_Alias AVREG_HOSTS = localhost, 127.0.1.1, 127.0.0.1

# User alias specification

# Cmnd alias specification
Cmnd_Alias AVREG_WEBCMD = /etc/init.d/avreg, /usr/bin/tail

# User privilege specification
root ALL=(ALL) ALL
www-data AVREG_HOSTS = NOPASSWD: AVREG_WEBCMD

# Allow members of group sudo to execute any command
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d

# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD: ALL

Теперь конфигурация оборудования командой v4info

Показать
general info
VIDIOC_QUERYCAP
driver : "tw68"
card : "GENERIC"
bus_info : "PCI:0000:00:0b.0"
version : 0.0.4
capabilities : 0x5000011 [VIDEO_CAPTURE,VBI_CAPTURE,READWRITE,STREAMING]

standards
VIDIOC_ENUMSTD(0)
index : 0
id : 0xb000 [NTSC_M,NTSC_M_JP,?]
name : "NTSC"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(1)
index : 1
id : 0x1000 [NTSC_M]
name : "NTSC-M"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(2)
index : 2
id : 0x2000 [NTSC_M_JP]
name : "NTSC-M-JP"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(3)
index : 3
id : 0x8000 [?]
name : "NTSC-M-KR"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(4)
index : 4
id : 0x4000 [?]
name : "NTSC-443"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(5)
index : 5
id : 0xff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K]
name : "PAL"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(6)
index : 6
id : 0x7 [PAL_B,PAL_B1,PAL_G]
name : "PAL-BG"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(7)
index : 7
id : 0x8 [PAL_H]
name : "PAL-H"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(8)
index : 8
id : 0x10 [PAL_I]
name : "PAL-I"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(9)
index : 9
id : 0xe0 [PAL_D,PAL_D1,PAL_K]
name : "PAL-DK"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(10)
index : 10
id : 0x100 [PAL_M]
name : "PAL-M"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(11)
index : 11
id : 0x200 [PAL_N]
name : "PAL-N"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(12)
index : 12
id : 0x400 [PAL_Nc]
name : "PAL-Nc"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(13)
index : 13
id : 0x800 [PAL_60]
name : "PAL-60"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
VIDIOC_ENUMSTD(14)
index : 14
id : 0xff0000 [SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
name : "SECAM"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(15)
index : 15
id : 0x10000 [SECAM_B]
name : "SECAM-B"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(16)
index : 16
id : 0x40000 [SECAM_G]
name : "SECAM-G"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(17)
index : 17
id : 0x80000 [SECAM_H]
name : "SECAM-H"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(18)
index : 18
id : 0x320000 [SECAM_D,SECAM_K,SECAM_K1]
name : "SECAM-DK"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(19)
index : 19
id : 0x400000 [SECAM_L]
name : "SECAM-L"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625
VIDIOC_ENUMSTD(20)
index : 20
id : 0x800000 [?ATSC_8_VSB]
name : "SECAM-Lc"
frameperiod.numerator : 1
frameperiod.denominator : 25
framelines : 625

inputs
VIDIOC_ENUMINPUT(0)
index : 0
name : "Composite1"
type : CAMERA
audioset : 1
tuner : 0
std : 0xffffff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,?,?,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
status : 0x1000004 [NO_COLOR,MACROVISION]
VIDIOC_ENUMINPUT(1)
index : 1
name : "Composite2"
type : CAMERA
audioset : 1
tuner : 0
std : 0xffffff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,?,?,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
status : 0x0 []
VIDIOC_ENUMINPUT(2)
index : 2
name : "Composite3"
type : CAMERA
audioset : 1
tuner : 0
std : 0xffffff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,?,?,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
status : 0x0 []
VIDIOC_ENUMINPUT(3)
index : 3
name : "Composite4"
type : CAMERA
audioset : 1
tuner : 0
std : 0xffffff [PAL_B,PAL_B1,PAL_G,PAL_H,PAL_I,PAL_D,PAL_D1,PAL_K,PAL_M,PAL_N,PAL_Nc,PAL_60,NTSC_M,NTSC_M_JP,?,?,SECAM_B,SECAM_D,SECAM_G,SECAM_H,SECAM_K,SECAM_K1,SECAM_L,?ATSC_8_VSB]
status : 0x0 []

video capture
VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
index : 0
type : VIDEO_CAPTURE
flags : 0
description : "15 bpp RGB, le"
pixelformat : 0x4f424752 [RGBO]
VIDIOC_ENUM_FMT(1,VIDEO_CAPTURE)
index : 1
type : VIDEO_CAPTURE
flags : 0
description : "15 bpp RGB, be"
pixelformat : 0x51424752 [RGBQ]
VIDIOC_ENUM_FMT(2,VIDEO_CAPTURE)
index : 2
type : VIDEO_CAPTURE
flags : 0
description : "16 bpp RGB, le"
pixelformat : 0x50424752 [RGBP]
VIDIOC_ENUM_FMT(3,VIDEO_CAPTURE)
index : 3
type : VIDEO_CAPTURE
flags : 0
description : "16 bpp RGB, be"
pixelformat : 0x52424752 [RGBR]
VIDIOC_ENUM_FMT(4,VIDEO_CAPTURE)
index : 4
type : VIDEO_CAPTURE
flags : 0
description : "24 bpp RGB, le"
pixelformat : 0x33524742 [BGR3]
VIDIOC_ENUM_FMT(5,VIDEO_CAPTURE)
index : 5
type : VIDEO_CAPTURE
flags : 0
description : "24 bpp RGB, be"
pixelformat : 0x33424752 [RGB3]
VIDIOC_ENUM_FMT(6,VIDEO_CAPTURE)
index : 6
type : VIDEO_CAPTURE
flags : 0
description : "32 bpp RGB, le"
pixelformat : 0x34524742 [BGR4]
VIDIOC_ENUM_FMT(7,VIDEO_CAPTURE)
index : 7
type : VIDEO_CAPTURE
flags : 0
description : "32 bpp RGB, be"
pixelformat : 0x34424752 [RGB4]
VIDIOC_ENUM_FMT(8,VIDEO_CAPTURE)
index : 8
type : VIDEO_CAPTURE
flags : 0
description : "4:2:2 packed, YUYV"
pixelformat : 0x56595559 [YUYV]
VIDIOC_ENUM_FMT(9,VIDEO_CAPTURE)
index : 9
type : VIDEO_CAPTURE
flags : 0
description : "4:2:2 packed, UYVY"
pixelformat : 0x59565955 [UYVY]
VIDIOC_G_FMT(VIDEO_CAPTURE)
type : VIDEO_CAPTURE
fmt.pix.width : 720
fmt.pix.height : 576
fmt.pix.pixelformat : 0x33524742 [BGR3]
fmt.pix.field : INTERLACED
fmt.pix.bytesperline : 2160
fmt.pix.sizeimage : 1244160
fmt.pix.colorspace : SMPTE170M
fmt.pix.priv : 0

vbi capture
VIDIOC_G_FMT(VBI_CAPTURE): Invalid argument

controls
VIDIOC_QUERYCTRL(BASE+0)
id : 9963776
type : INTEGER
name : "Brightness"
minimum : -128
maximum : 127
step : 1
default_value : 20
flags : 0
VIDIOC_QUERYCTRL(BASE+1)
id : 9963777
type : INTEGER
name : "Contrast"
minimum : 0
maximum : 255
step : 1
default_value : 100
flags : 0
VIDIOC_QUERYCTRL(BASE+2)
id : 9963778
type : INTEGER
name : "Saturation"
minimum : 0
maximum : 255
step : 1
default_value : 128
flags : 0
VIDIOC_QUERYCTRL(BASE+3)
id : 9963779
type : INTEGER
name : "Hue"
minimum : -128
maximum : 127
step : 1
default_value : 0
flags : 0

### video4linux device info [/dev/video0] ###
general info
VIDIOCGCAP
name : "GENERIC"
type : 0x5 [CAPTURE,TELETEXT]
channels : 4
audios : 0
maxwidth : 720
maxheight : 576
minwidth : 48
minheight : 32

channels
VIDIOCGCHAN(0)
channel : 0
name : "Composite1"
tuners : 0
flags : 0x0 []
type : CAMERA
norm : 0
VIDIOCGCHAN(1)
channel : 1
name : "Composite2"
tuners : 0
flags : 0x0 []
type : CAMERA
norm : 0
VIDIOCGCHAN(2)
channel : 2
name : "Composite3"
tuners : 0
flags : 0x0 []
type : CAMERA
norm : 0
VIDIOCGCHAN(3)
channel : 3
name : "Composite4"
tuners : 0
flags : 0x0 []
type : CAMERA
norm : 0

tuner
ioctl VIDIOCGTUNER: Invalid argument

audio
VIDIOCGAUDIO
audio : 0
volume : 0
bass : 0
treble : 0

picture
VIDIOCGPICT
brightness : 38036
hue : 32896
colour : 6425
contrast : 25700
whiteness : 0
depth : 24
palette : RGB24

buffer
ioctl VIDIOCGFBUF: Invalid argument

window
VIDIOCGWIN
x : 0
y : 0
width : 720
height : 576
chromakey : 0
flags : 0

И наконец лог демона avregd

Показать
Dec 10 09:43:01 alexey-VT8367-8235 avreg-unlink: Запуск "чистильщика" медиа-архива AVReg на "avreg5_db:/var/spool/avreg"
Dec 10 09:43:03 alexey-VT8367-8235 avregd: cam[1]: darkness detected at 09:42:59; br.avg: 12..27/50
Dec 10 09:43:08 alexey-VT8367-8235 avregd: cam[1]: darkness disappeared at 09:43:04 (begans at 2010-12-10 09:42:59); br.avg: 101..101/50
Dec 10 09:43:18 alexey-VT8367-8235 avregd: cam[1]: darkness detected at 09:43:18; br.avg: 12..12/50
Dec 10 09:43:25 alexey-VT8367-8235 avregd: cam[3]: motion session finished (00:00:36), rec_id #2174
Dec 10 09:43:25 alexey-VT8367-8235 avregd: cam[3]: "motion detector" stopped the record onto disk
Dec 10 09:43:40 alexey-VT8367-8235 avregd: cam[3]: motion session started (rec_id #2175): %diff: (2915-1000)/1000 = |+192%| > 10%; noise thr. 30; br.avg 0
Dec 10 09:43:40 alexey-VT8367-8235 avregd: cam[3]: "motion detector" turned on the record onto disk
Dec 10 09:43:58 alexey-VT8367-8235 avregd: cam[3]: motion session finished (00:00:03), rec_id #2175
Dec 10 09:43:58 alexey-VT8367-8235 avregd: cam[3]: "motion detector" stopped the record onto disk
Dec 10 09:43:59 alexey-VT8367-8235 avregd: cam[3]: motion session started (rec_id #2176): %diff: (2912-1000)/1000 = |+191%| > 10%; noise thr. 30; br.avg 0
Dec 10 09:43:59 alexey-VT8367-8235 avregd: cam[3]: "motion detector" turned on the record onto disk
Dec 10 09:44:12 alexey-VT8367-8235 avreg-unlink: после удаления `/dev/disk/by-uuid/4cdb9c85-4bba-416e-b98b-29db2f05f12d' размер: всего/использ./свободно: 35.2 GB / 23.3 GB (66%) / 10.1 GB (29%)
Dec 10 09:44:12 alexey-VT8367-8235 avreg-unlink: всего удалено 20274 файлов общим размером 5.0 GB и 72 каталогов
Dec 10 09:44:12 alexey-VT8367-8235 avreg-unlink: Время выполнения: 1.2 минут
Dec 10 09:44:17 alexey-VT8367-8235 avregd: cam[1]: darkness disappeared at 09:44:13 (begans at 2010-12-10 09:43:18); br.avg: 101..101/50
Dec 10 09:44:24 alexey-VT8367-8235 avregd: cam[2]: motion session finished (00:02:04), rec_id #818
Dec 10 09:44:24 alexey-VT8367-8235 avregd: cam[2]: "motion detector" stopped the record onto disk
Dec 10 09:44:34 alexey-VT8367-8235 avregd: cam[2]: motion session started (rec_id #819): %diff: (1827-1510)/1510 = |+21%| > 10%; noise thr. 27; br.avg 90
Dec 10 09:44:34 alexey-VT8367-8235 avregd: cam[2]: "motion detector" turned on the record onto disk
Dec 10 09:44:37 alexey-VT8367-8235 avregd: cam[3]: motion session finished (00:00:23), rec_id #2176
Dec 10 09:44:37 alexey-VT8367-8235 avregd: cam[3]: "motion detector" stopped the record onto disk
Dec 10 09:44:59 alexey-VT8367-8235 avregd: cam[1]: motion session finished (00:27:45), rec_id #805
Dec 10 09:44:59 alexey-VT8367-8235 avregd: cam[1]: "motion detector" stopped the record onto disk
Dec 10 09:45:03 alexey-VT8367-8235 avregd: cam[1]: motion session started (rec_id #806): %diff: (2882-1000)/1000 = |+188%| > 10%; noise thr. 29; br.avg 101
Dec 10 09:45:03 alexey-VT8367-8235 avregd: cam[1]: "motion detector" turned on the record onto disk
Dec 10 09:45:31 alexey-VT8367-8235 avregd: cam[1]: motion session finished (00:00:13), rec_id #806
Dec 10 09:45:31 alexey-VT8367-8235 avregd: cam[1]: "motion detector" stopped the record onto disk
Dec 10 09:45:40 alexey-VT8367-8235 avregd: cam[1]: motion session started (rec_id #807): %diff: (2970-1000)/1000 = |+197%| > 10%; noise thr. 28; br.avg 100
Dec 10 09:45:40 alexey-VT8367-8235 avregd: cam[1]: "motion detector" turned on the record onto disk
Dec 10 09:46:02 alexey-VT8367-8235 avregd: cam[1]: <--{video in} /dev/video0:0 frame read() return EIO(Input/output error)
Dec 10 09:46:02 alexey-VT8367-8235 avregd: cam[1]: <--{video in} /dev/video0:0 capture failed
Dec 10 09:46:02 alexey-VT8367-8235 avregd: cam[2]: <--{video in} /dev/video0:1 capture failed
Dec 10 09:46:02 alexey-VT8367-8235 avregd: cam[3]: <--{video in} /dev/video0:2 capture failed
Dec 10 09:46:02 alexey-VT8367-8235 avregd: cam[4]: <--{video in} /dev/video0:3 capture failed
Dec 10 09:46:02 alexey-VT8367-8235 avregd: cam[1]: "daemon" stopped the record onto disk
Dec 10 09:46:02 alexey-VT8367-8235 avregd: cam[2]: "daemon" stopped the record onto disk
Dec 10 09:46:07 alexey-VT8367-8235 avregd: setup v4l2 device /dev/video0: 720x576 [YUYV], field interlaced(both), 1440 bpl, 829440 framesize, "SMPTE170M" csp, norm: PAL_Nc
Dec 10 09:46:07 alexey-VT8367-8235 avregd: setup "read" capture on v4l2:///dev/video0
Dec 10 09:46:07 alexey-VT8367-8235 avregd: cam[1]: <--{video in} /dev/video0:0 frame read() return EAGAIN Р° 3 times running, cannot the device driver support the "non-block" read?
Dec 10 09:46:12 alexey-VT8367-8235 avregd: critical error: couldn't capture any video/audio frame during 10 last seconds
Dec 10 09:46:12 alexey-VT8367-8235 avregd: setup v4l2 device /dev/video0: 720x576 [YUYV], field interlaced(both), 1440 bpl, 829440 framesize, "SMPTE170M" csp, norm: PAL_Nc
Dec 10 09:46:12 alexey-VT8367-8235 avregd: setup "read" capture on v4l2:///dev/video0
Dec 10 09:46:12 alexey-VT8367-8235 avregd: cam[1]: <--{video in} /dev/video0:0 frame read() return EAGAIN Р° 3 times running, cannot the device driver support the "non-block" read?
Dec 10 09:46:18 alexey-VT8367-8235 avregd: setup v4l2 device /dev/video0: 720x576 [YUYV], field interlaced(both), 1440 bpl, 829440 framesize, "SMPTE170M" csp, norm: PAL_Nc
Dec 10 09:46:18 alexey-VT8367-8235 avregd: setup "read" capture on v4l2:///dev/video0
Dec 10 09:46:18 alexey-VT8367-8235 avregd: cam[1]: <--{video in} /dev/video0:0 frame read() return EAGAIN Р° 3 times running, cannot the device driver support the "non-block" read?
Dec 10 09:46:23 alexey-VT8367-8235 avregd: setup v4l2 device /dev/video0: 720x576 [YUYV], field interlaced(both), 1440 bpl, 829440 framesize, "SMPTE170M" csp, norm: PAL_Nc
Dec 10 09:46:23 alexey-VT8367-8235 avregd: setup "read" capture on v4l2:///dev/video0
Dec 10 09:46:23 alexey-VT8367-8235 avregd: cam[1]: <--{video in} /dev/video0:0 frame read() return EAGAIN Р° 3 times running, cannot the device driver support the "non-block" read?
Dec 10 09:46:29 alexey-VT8367-8235 avregd: setup v4l2 device /dev/video0: 720x576 [YUYV], field interlaced(both), 1440 bpl, 829440 framesize, "SMPTE170M" csp, norm: PAL_Nc
Dec 10 09:46:29 alexey-VT8367-8235 avregd: setup "read" capture on v4l2:///dev/video0
Dec 10 09:46:29 alexey-VT8367-8235 avregd: cam[1]: <--{video in} /dev/video0:0 frame read() return EAGAIN Р° 3 times running, cannot the device driver support the "non-block" read?
Dec 10 09:46:32 alexey-VT8367-8235 avregd: critical error: couldn't capture any video/audio frame during 10 last seconds

Ну вот вроде так. В логе явна ошибка она повторяющаяся, но что значит не знаю.

#106401

Иероглифы в логе это сообщения о запуске чистильщика

Войдите или зарегистрируйтесь, чтобы ответить.