Обновленно.. 25.01.2011
Вновь проснулась нужда в камере.
В общем.. И целом.
Сервер этот ничем не отличается от сервера вебморды... то же mjpeg stream только без /?action=stream
Быть может у меня потому что дров под 2.6 ядро я не нашел, а стандартные работали...
Расскажу на своем примере при помощи человека с форума.. За что ему Большое спасибо..
Роутер ASUS RT-N16 прошивка RT-N16-1.9.2.7-rtn-r2355 уже 1.9.2.7-rtn-r2508
И так.. Использую немного копипаста
подключаемся по telnet или ssh
Отключить в вебморде асуса все стандартные приложения которые используют камеру и так как с этого момента с загрузкой роутера у нас не будут грузиться драйвера на камеру в post-boot надо добавить следующее
ЧТо бы было видео
PHP Code:
insmod videodev
insmod input-core
insmod v4l2-common
insmod uvcvideo
Что быбыл и звук.
PHP Code:
insmod soundcore
insmod snd.ko
insmod snd-timer
insmod snd-page-alloc
insmod snd-pcm
insmod snd-hwdep
insmod snd-rawmidi
insmod snd-usb-lib
insmod snd-usb-audio
insmod snd-mixer-oss.ko
insmod snd-pcm-oss.ko
При загрузке в Логах в моём случае вижу
Ранее
PHP Code:
Jan 1 06:00:07 USB webcam: attached
Nov 28 18:53:48 kernel: Linux video capture interface: v2.00
Nov 28 18:53:48 kernel: uvcvideo: Found UVC 1.00 device A4 TECH USB2.0 PC Camera J (0ac8:c40a)
Nov 28 18:53:48 kernel: input: A4 TECH USB2.0 PC Camera J as /class/input/input0
Nov 28 18:53:48 kernel: usbcore: registered new interface driver uvcvideo
Nov 28 18:53:48 kernel: USB Video Class driver (v0.1.0)
PHP Code:
Сейчас
Jan 1 06:00:04 USB webcam: attached
Jan 1 06:00:05 kernel: Linux video capture interface: v2.00
Jan 1 06:00:05 kernel: uvcvideo: Found UVC 1.00 device A4 TECH USB2.0 PC Camera J (0ac8:c40a)
Jan 1 06:00:05 kernel: input: A4 TECH USB2.0 PC Camera J as /class/input/input0
Jan 1 06:00:05 kernel: usbcore: registered new interface driver uvcvideo
Jan 1 06:00:05 kernel: USB Video Class driver (v0.1.0)
Jan 1 06:00:06 kernel: usbcore: registered new interface driver snd-usb-audio
У кого та Лог будет немного другой.. потому что естественно другая камера
собственно всё в порядке и можно переходить к установке самой программы, если нет то ставим на свою камеру драйвера отдельно ...
на всякий случай убеждаемся в том что все устройства у нас в системе появились
PHP Code:
ls /dev/sound/
dsp
mixer
ls /dev/v4l
video0
теперь ставим программу
PHP Code:
wget http://rus375.narod.ru/palantir_2.8pre1_mipsel.ipk
ipkg install palantir_2.8pre1_mipsel.ipk
так как palantir не работает в фоне то ставим приложение screen, для у кого этот пакет не установлен
PHP Code:
ipkg install screen
теперь настраиваем сам palantir, там ничего сложного но на всякий случай привожу пример изменённых мест в конфиге
/opt/etc/palantir.conf
пробуем запустить
PHP Code:
/tmp/harddisk/opt/bin/screen -dm -s /tmp/harddisk/opt/bin/palantir
или
/opt/bin/screen -dm -s /opt/bin/palantir
или
screen -dm -s palantir
Смотреть можно как браузером так и программой клиентом. Соединяемся программой palantir4pc, в строке вводим IP роутера:видео_порт из конфига. Появится изображение с видео камеры, нажимаем в программе control, становится активным окошко audio ставим в неё галочку и должен был пойти звук.
порт: 3000 видео
порт: 3001 звук
Привожу свой конфиг для примера
PHP Code:
## VideoDevice: video device to capture from.
## Default is /dev/video0.
#
# VideoDevice /dev/video0
VideoDevice /dev/v4l/video0
## Channel: video channel to capture from.
## Default is channel 0.
#
# Channel 0
## VideoNorm: norm of the video signal in your country.
## Default is PAL. Other allowed values are NTSC, SECAM and AUTO.
#
# VideoNorm PAL
## Palette: video capture palette (either Mono or Color). Default is Color.
#
# Palette Color
## FrameSize: size of captured frames.
## Default is 320x240.
#
FrameSize 352x288
## FrameRate: capture frame rate, in frames per second.
## Only works with webcams supported by the pwc driver.
# Default is 15.
#
# FrameRate 30
FrameRate 15
## Audio: enable or disable audio stream.
## Allowed values are "On" and "Off".
## Default is On.
#
# Audio On
## AudioCaptureDevice: audio device to capture from.
## Default is /dev/dsp.
#
AudioCaptureDevice /dev/sound/dsp
## JpegQuality: JPEG compression quality level. Default is 50.
#
# JpegQuality 50
## ImageFilters: apply one or more filters to the captured frames.
## Allowed values are Flip, Invert, UpsideDown (which stands for
## "Flip Invert").
## Multiple (space-separated) values are allowed.
## Default is to apply no filter.
#
# ImageFilters UpsideDown
## AudioCaptureDevice: audio device for capture.
## If unspecified, server->client streaming is disabled.
#
# AudioCaptureDevice /dev/dsp
## AudioPlaybackDevice: audio device for playback.
## If unspecified, client->server streaming is disabled.
#
# AudioPlaybackDevice /dev/dsp
## VideoAudioInput: audio input on the video capture device.
##
## Default is input 0, which is often the only audio device (if any) on the
## capture card.
#
# VideoAudioInput 0
## VideoAudioVolume: volume of the audio input device selected with
## VideoAudioInput.
## Allowed values are 0...65535.
## Default is 65535.
#
# VideoAudioVolume 65535
## TunerFreq: video card tuner frequency. Only useful if the video device
## has an on-board tuner.
## Default is not to set the tuner frequency (preserve last setting).
#
# TunerFreq 663.25
## AddressFamily: defines which address family the server is listening on.
## Allowed values are "any", "inet", and "inet6".
## "any" causes the server to listen on both IPv4 and IPv6 addresses
## through the IPv6 interface.
## "inet" and "inet6" enable only IPv4 and IPv6, respectively.
## Default is to listen on both IPv4 and IPv6 addresses.
#
# AddressFamily any
## TCPPort: TCP base port to listen to. Clients connect to this port
## for the HTTP (video+data) stream.
## If the audio channel is enabled, it is made available to clients
## on an additional port, which defaults to (base port)+1 (a different value
## can be selected via a command-line option or the TCPAudioPort directive).
#
TCPPort 3000
## TCPAudioPort: TCP audio port to listen to (if the audio channel is
## not disabled).
## Default is (base port)+1.
#
TCPAudioPort 3001
## SerialPort: serial port used to control external devices.
## Default is not to use a serial link.
#
# SerialPort /dev/ttyS1
## ControlTimeout: duration for the control time share, in seconds.
## Default is 30.
#
# ControlTimeout 30
## ClientTimeout: maximum duration of a single client connection, in seconds.
## Default is to allow indefinitely long connections.
ClientTimeout 300
## ClientAckTimeout: how long the server should wait for the "frame received"
## acknowledgement from the client, in seconds.
## Default is 30 seconds.
#
# ClientAckTimeout 30
## MaxStreamingClients: maximum number of simultaneous connections to video
## stream. Clients in excess get a snapshot.
## Default is 5.
#
MaxStreamingClients 2
## Greeting: message sent to clients upon connection.
## Default is "Experimental Palantir server".
#
# Greeting "Experimental Palantir server"
Greeting "Palantir server (v4l2)on WL-500g"
## NamedPipe: location of the special file (named pipe) used to communicate
## with software devices.
## Default is not to use a named pipe.
#
# NamedPipe /usr/local/share/palantir/telmu_pipe
## LogFile: location of the log file. If none is specified, diagnostic
# messages go to stderr.
# LogFile /tmp/palantir.log
##
## Device definitions
##
# Define a slider to control frame brightness (which is channel 0 on the
# "internal" link).
# "Notifier Client" is needed here to have all connected clients reflect the
# changes made by the client in control, since "internal" devices do not provide
# feedback to the server.
Device {
Carrier internal 0
Direction readwrite
Name "Brightness"
Hint "Video capture brightness"
Visual slider
Remap -32768 32767
Notifier Client
}
# Uncomment the following two definitions to control pan/tilt of a
# Logitech Sphere or compatible:
#
# Device {
# Carrier Internal 5
# Direction readwrite
# Name "Pan"
# Hint "Camera pan"
# Range -7000 7000
# Notifier client
# Visual Slider_X
# }
#
# Device {
# Carrier Internal 6
# Direction readwrite
# Name "Tilt"
# Hint "Camera tilt"
# Range -3000 2500
# Notifier client
# Visual Slider_Y
# }
Но опять же..Звук будет если в логах увидели что аудио есть..
Что бы Палантир загружался автоматом в post-mount добавляем так же
PHP Code:
/opt/bin/screen -dm -s /opt/bin/palantir
что бы после перезагрузки файл конфигурации не пропал делаем следующее
PHP Code:
flashfs save
flashfs commit
flashfs enable
далее
Смотреть можно как браузером так и программой клиентом. Соединяемся программой palantir4pc, в строке вводим IP роутера:видео_порт из конфига. Появится изображение с видео камеры, нажимаем в программе control, становится активным окошко audio ставим в неё галочку и должен был пойти звук.
У меня слава богу все за работало.. За что спасибо всем кто мне помог..
VicSer Огромнейшее тебе спасибо.. Респект и Уважуха.!!!!
Кстати..
A4Tech PK-30MJ
VC0332 is fully compliant with USB Video Class 1.0 standards and USB Audio Class 1.0 standards Тоесть UVC