51 (edytowany przez zaspany 2013-09-15 13:40:53)

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Spróbowałem połączyć kamerke na openwrt z profesjonalnym programem do monitoringu na PC XP
NOVUS MANAGEMENT SYSTEM i .... poszło tzn obraz się zacina co parę sekund ale ciekawie sie zapowiada .

A teraz testuje darmowy iSPY z dwoma kamerkami usb na openwrt + iprobot3

http://s4.ifotos.pl/mini/ispy-open_nwqapsh.jpg

52

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Microsoft LIFECAM HD-5000 z autofocusem  jest obsługiwana przez plugin webcam Gargoyle (czyli przez czyste OpenWRT również), daje obraz bdb jakości i wyborze aż w 12 rodzajach rozdzielczości (można dostosować do wydajności routera). Kolejną obsługiwaną jest 4TECH PC Camera (obraz również bdb jakości, ale mniejszy wybór rozdzielczości, innym + jest stabilna podstawka i regulowany gięty pręt ok. 200mm na którym umocowana jest kamera w kształcie modemu 3G).

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Microsoft HD-6000 również działa na Gargoyle z routerem TL-WR1043NDv2

54

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

kamillo napisał/a:

czy ktoś z Was miał do czynienia z jakimiś kamerkami z diodami (chodzi mi o widoczność w nocy) działającymi pod openwrt?

Kamera eCom za kilkanascie PLN z allegro, ma diody i troche widac w nocy, i działa pod Linuxem

RB760iGS + RB260GS / Ryzen 5 2660 / 16G DDR4 / MiniITX - Inea 1G (https://i.imgur.com/TLbJVDw.png)
RB951-2HnD / Celeron J1900 / 4G DDR3 / MiniITX - Satpol 100M

55

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

zdzichu6969 napisał/a:
kamillo napisał/a:

czy ktoś z Was miał do czynienia z jakimiś kamerkami z diodami (chodzi mi o widoczność w nocy) działającymi pod openwrt?

Kamera eCom za kilkanascie PLN z allegro, ma diody i troche widac w nocy, i działa pod Linuxem

A da się wyciąć filtr IR?

56

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Dopisuję, Logitech HD Pro Webcam działa na Gargoyle.

57

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

A czy zadziała coś takiego jak video grabber easycap? Jest on na Somagic SMI-2021CBE. Powinien działać pod linuxem, jednak dosyć długo walczyłem z nim na ubuntu i poległem.

58

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Zależy czy są sterowniki do niej. Zrób oddzielny wątek jak już.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

59 (edytowany przez Vald 2014-02-12 21:34:42)

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Jako, że jest to mój pierwszy post to na wstępie witam wszystkich.
A teraz do rzeczy posiadam ruter TP-Link-a WDR 3600 z zainstalowanym oprogramowaniem Gargoyle PL 1.6.0.1. Jako dodatek zainstalowałem sobie motion ale obrazy jakie dostaje są "poprzestawiane". Czy ktoś się spotkał kiedyś z takim przypadkiem?
Kamera jakiej używam to Logitech C270.

http://www.iv.pl/images/78544512304033420475_thumb.jpg

Jeżeli to pomoże poniżej zamieszczam configa motion i log. W logu wszystko wygląda dobrze tylko dlaczego źle mi "składa" obrazy? A motion poprzestawiane obrazy rozpoznaje jako ruch i zapisuje kolejne pliki. Zmniejszenie rozdzielczości pomaga ale nieznacznie nadal co kilka plików pojawiają się poprzestawiane obrazy.

config:

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


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

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

# 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


# Use a file to save logs messages, if not defined stderr and syslog is used. (d
logfile /tmp/usb_mount/dev_sda1/Monitoring/motion.log

# Level of log messages [1..9] (EMR, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL). (d
log_level 6

# Filter to log messages by type (COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL).
log_type all

###########################################################
# 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: 17)
# 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 2 forces motion to use V4L2_PIX_FMT_SBGGR8
# instead.
#

# Values :
# V4L2_PIX_FMT_SN9C10X : 0  'S910'
# V4L2_PIX_FMT_SBGGR16 : 1  'BYR2'
# V4L2_PIX_FMT_SBGGR8  : 2  'BA81'
# V4L2_PIX_FMT_SPCA561 : 3  'S561'
# V4L2_PIX_FMT_SGBRG8  : 4  'GBRG'
# V4L2_PIX_FMT_SGRBG8  : 5  'GRBG'
# V4L2_PIX_FMT_PAC207  : 6  'P207'
# V4L2_PIX_FMT_PJPG    : 7  'PJPG'
# V4L2_PIX_FMT_MJPEG   : 8  'MJPEG'
# V4L2_PIX_FMT_JPEG    : 9  'JPEG'
# V4L2_PIX_FMT_RGB24   : 10 'RGB3'
# V4L2_PIX_FMT_SPCA501 : 11 'S501'
# V4L2_PIX_FMT_SPCA505 : 12 'S505'
# V4L2_PIX_FMT_SPCA508 : 13 'S508'
# V4L2_PIX_FMT_UYVY    : 14 'UYVY'
# V4L2_PIX_FMT_YUYV    : 15 'YUYV'
# V4L2_PIX_FMT_YUV422P : 16 '422P'
# V4L2_PIX_FMT_YUV420  : 17 'YU12'
#
v4l2_palette 15

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

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

# 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


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

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

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

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

# 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
minimum_frame_time 0

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

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

# 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 defi
# Recommended value is EedDl. Any combination (and number of) of E, e, d, and D
# (l)abeling must only be used once and the 'l' must be the last letter.
# Comment out to disable
;despeckle_filter EedDl

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

# 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 a
# cause unsmooth movies. To smooth movies use larger values of post_capture inst
pre_capture 0

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

# Event Gap is the seconds of no motion detection that triggers the end of an ev
# An event is defined as a series of motion images taken within a short timefram
# Recommended value is 60 seconds (Default). The value -1 is allowed and disable
# events causing all Motion to be written to one single movie file and no pre_ca
# If set to 0, motion is running in gapless mode. Movies don't have gaps anymore
# event ends right after no more motion is detected and post_capture is over.
event_gap 60

############################################################
# 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_pictures on

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

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

# Type of output images
# Valid values: jpeg, ppm (default: jpeg)
picture_type jpeg

############################################################
# 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, preview (default: off)
# Set to 'preview' will only draw a box in preview_shot pictures.
locate_motion_mode on

# Set the look and style of the locate box if enabled.
# Valid values: box, redbox, cross, redcross (default: box)
# Set to 'box' will draw the traditional box.
# Set to 'redbox' will draw a red box.
# Set to 'cross' will draw a little cross to mark center.
# Set to 'redcross' will draw a little red cross to mark center.
locate_motion_style redbox

# 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 strfti
# Default: Not defined = no text
# Text is placed in lower left corner
text_left CAMERA 1


# 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 settin
# Text is placed in upper right corner
text_changes on

# 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 on

############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, picture_, movie_ 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/usb_mount/dev_sda1/Monitoring

# 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 alway
# 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
picture_filename %v-%Y%m%d%H%M%S-%q

############################################################
# 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 b
; 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 event_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: non
# 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

log:

[0] [NTC] [ALL] [Feb 12 20:11:53] motion_startup: Using log type (ALL) log level (NTC)
[0] [NTC] [ALL] [Feb 12 20:11:53] become_daemon: Motion going to daemon mode
[0] [NTC] [ALL] [Feb 12 20:11:53] become_daemon: Created process id file /var/run/motion/motion.pid. Process ID is 12266
[0] [NTC] [ALL] [Feb 12 20:11:53] motion_startup: Motion running as daemon process
[0] [NTC] [ALL] [Feb 12 20:11:53] main: Thread 1 is from /etc/motion.conf
[0] [NTC] [ALL] [Feb 12 20:11:53] main: Thread 1 is device: /dev/video0 input -1
[0] [NTC] [ALL] [Feb 12 20:11:53] main: Stream port 0
[0] [NTC] [ALL] [Feb 12 20:11:53] main: Waiting for threads to finish, pid: 12266
[1] [NTC] [ALL] [Feb 12 20:11:53] motion_init: Thread 1 started , motion detection Enabled
[1] [NTC] [VID] [Feb 12 20:11:53] vid_v4lx_start: Using videodevice /dev/video0 and input -1
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_get_capability: 
------------------------
cap.driver: "uvcvideo"
cap.card: "UVC Camera (046d:0825)"
cap.bus_info: "usb-ehci-platform-1.1"
cap.capabilities=0x04000001
------------------------
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_get_capability: - VIDEO_CAPTURE
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_get_capability: - STREAMING
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_select_input: name = "Camera 1", type 0x00000002, status 00000000
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_select_input: - CAMERA
[1] [WRN] [VID] [Feb 12 20:11:53] v4l2_select_input: Device doesn't support VIDIOC_G_STD
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_set_pix_format: Config palette index 17 (YU12) doesn't work.
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_set_pix_format: Supported palettes:
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_set_pix_format: (0) YUYV (YUV 4:2:2 (YUYV))
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_set_pix_format: 0 - YUV 4:2:2 (YUYV) (compressed : 0) (0x56595559)
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_set_pix_format: (1) MJPG (MJPEG)
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_set_pix_format: 1 - MJPEG (compressed : 1) (0x47504a4d)
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_set_pix_format Selected palette YUYV
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_do_set_pix_format: Testing palette YUYV (960x640)
[1] [WRN] [VID] [Feb 12 20:11:53] v4l2_do_set_pix_format: Adjusting resolution from 960x640 to 960x720.
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_do_set_pix_format: Using palette YUYV (960x720) bytesperlines 1920 sizeimage 1382400 colorspace 00000008
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_scan_controls: found control 0x00980900, "Brightness", range 0,255 
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_scan_controls:     "Brightness", default 128, current 128
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_scan_controls: found control 0x00980901, "Contrast", range 0,255 
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_scan_controls:     "Contrast", default 32, current 32
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_scan_controls: found control 0x00980902, "Saturation", range 0,255 
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_scan_controls:     "Saturation", default 32, current 32
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_scan_controls: found control 0x00980913, "Gain", range 0,255 
[1] [NTC] [VID] [Feb 12 20:11:53] v4l2_scan_controls:     "Gain", default 0, current 0
[1] [NTC] [VID] [Feb 12 20:11:53] vid_v4lx_start: Using V4L2
[1] [NTC] [ALL] [Feb 12 20:11:53] image_ring_resize: Resizing pre_capture buffer to 1 items
[1] [NTC] [EVT] [Feb 12 20:11:59] event_new_video FPS 2
[1] [NTC] [ALL] [Feb 12 20:11:59] motion_detected: Motion detected - starting event 1
[1] [NTC] [EVT] [Feb 12 20:12:01] event_newfile: File of type 1 saved to: /tmp/usb_mount/dev_sda1/Monitoring/01-20140212201159-00.jpg
[1] [NTC] [EVT] [Feb 12 20:12:01] event_newfile: File of type 1 saved to: /tmp/usb_mount/dev_sda1/Monitoring/01-20140212201201-00.jpg
[1] [NTC] [EVT] [Feb 12 20:12:04] event_newfile: File of type 1 saved to: /tmp/usb_mount/dev_sda1/Monitoring/01-20140212201204-01.jpg
[1] [NTC] [EVT] [Feb 12 20:12:05] event_newfile: File of type 1 saved to: /tmp/usb_mount/dev_sda1/Monitoring/01-20140212201205-00.jpg
[1] [NTC] [EVT] [Feb 12 20:12:06] event_newfile: File of type 1 saved to: /tmp/usb_mount/dev_sda1/Monitoring/01-20140212201206-00.jpg
[1] [NTC] [EVT] [Feb 12 20:12:09] event_newfile: File of type 1 saved to: /tmp/usb_mount/dev_sda1/Monitoring/01-20140212201209-01.jpg
[1] [NTC] [EVT] [Feb 12 20:12:12] event_newfile: File of type 1 saved to: /tmp/usb_mount/dev_sda1/Monitoring/01-20140212201212-00.jpg
[1] [NTC] [EVT] [Feb 12 20:12:14] event_newfile: File of type 1 saved to: /tmp/usb_mount/dev_sda1/Monitoring/01-20140212201213-01.jpg
[1] [NTC] [ALL] [Feb 12 20:12:14] motion_loop: End of event 1
[1] [NTC] [ALL] [Feb 12 20:12:14] motion_loop: Thread exiting
[1] [NTC] [VID] [Feb 12 20:12:14] vid_close: Closing video device /dev/video0
[0] [NTC] [ALL] [Feb 12 20:12:14] main: Threads finished
[0] [NTC] [ALL] [Feb 12 20:12:15] main: Motion terminating
[0] [NTC] [ALL] [Feb 12 20:12:15] motion_remove_pid: Removed process id file (pid file).
[0] [NTC] [ALL] [Feb 12 20:12:15] motion_remove_pid: Closing logfile (/tmp/usb_mount/dev_sda1/Monitoring/motion.log).

Ewentualnie może ktoś zna kamerkę która działa na WDR3600 z motion w rozdzielczości 1280x720 bądź zbliżonej (niekoniecznie IP no chyba że w przystępnej cenie)

60

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

To teraz pytanie z innej beczki jakie elementy wspólne mają motion i fswebcam? Obrazy pobrane za pomocą fswebcam są poprawne za każdym razem. A może to wina biblioteki libjpeg używanej przez motion?

61

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Inny sposób odczytu danych.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

62

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Cezary napisał/a:

Inny sposób odczytu danych.

Jeżeli dobrze rozumiem to po prostu odczytuje dane z kamery w inny sposób?

A skąd mogę pobrać inna wersję motion żeby sprawdzić czy działa z WDR 3600?

63

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Na stronie projektu masz do wyboru. Skompiluj i masz.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

64

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Ehh samodzielne kompilowanie to jeszcze za wysokie progi dla mnie... może kiedyś...
Na razie poradziłem sobie podłączając inną kamerkę dział na 640x480 i to mam kolejne pytanie jako że mam konto na dropboxie chciałem kopiować pliki przy wykryciu ruchu w sekcji:

# 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 /root/dropbox_uploader.sh -k upload %f %f

ale taraz skrypt kopiuje mi pliki razem z drzewem katalogów tj. /tmp/usb_mount/dev_sda1/.../<nazwa pliku>
jak zmodyfikowactą linijkę aby kopiować tylko plik bez struktury katalogów?

65

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

w skrypcie najpierw przejść do tego katalogu a potem normalnie wysłać?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

66

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Cezary napisał/a:

w skrypcie najpierw przejść do tego katalogu a potem normalnie wysłać?

Ale zmienna %f zwraca chyba nazwę pliku wraz ze strukturą katalogu

%f = filename with full path

Czy mógłbyś napisać jak to wykonać?

67

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

dirname zwraca sam katalog
basename - samą nazwę pliku. W sumie to zwykłym shellem można to wyciąć.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

68

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Cezary, a czy mógłbyś napisać mi taki skrypt, bo Linux nie jest moją mocna stroną właściwie to moja przygoda z nim zaczęła się od zakupu routera i zainstalowania Gargoyle-a.

69

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

#!/bin/sh
F=$(basename $1)
D=$(dirname $1)
cd "$D"
/root/dropbox_uploader.sh -k upload "%F" "%F"

trudne?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

70 (edytowany przez Vald 2014-02-18 22:41:05)

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

Dziękuje bardzo Cezary.
A co do pytania o trudność to wiesz jak to mówią trudne są tylko te pytania na które nie znamy odpowiedzi, a tak szczerze to ja bym tego w życiu nie napisał po prostu nie znam Linuxa.

Eh nie wiem dlaczego ale to co napisałeś cezary mi nie działało na podstawie źródeł internetowych zmodyfikowałem skrypt i teraz działa:

#!/bin/sh
F='basename "$1"'
F=$(basename "$1")
D='dirname "$1"'
D=$(dirname "$1")
cd "$D"
/root/dropbox_uploader.sh -k upload "$F" "$F"

71

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

hej,

zainstalowałem w gargoyle dodatek webcam podłączyłem kamerę i wszystko było dobrze do momentu aż nie przestawiłem rozdzielczości na wyższa i teraz jak kamera jest podłączona to router się restartuje a jak jest odłączona to w zakładce webcam mam informację, że kamera nie jest podłączona i nie mam dostępnych żadnych opcji aby wrócić do poprzednich ustawień. Próbowałem odinstalować i zainstalować ten dodatek jednak ustawienia nie zostały usunięte ponieważ po podłączeniu kamery router dalej się restartuje. Jak można usunąć ustawienia kamery?

pozdrawiam

72

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

/etc/config/mjpeg-streamer to jest

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

73

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

zmieniłem ręcznie rozdzielczość w tym pliku i już jest ok.

dzięki Cezary

74 (edytowany przez krionix 2014-12-23 12:22:59)

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

witam, posiadam kamerę

Microsoft HD 6000  ( Bus 001 Device 012: ID 045e:076f Microsoft Corp. )

Zainstalowano

opkg install kmod-video-uvc

ale nie powoduje pojawienia sie urzadzenia video* czyli to nie ten sterownik. Czy ktos zna dokladny sterownik jaki bedzie mi potrzebny do tej kamery? Zabawy w instalacje wszystkiego nie planuje, miejsca na FS mam jak na lekarstwo :-(


# dmesg
[345897.970000] usb 1-1.2: USB disconnect, device number 13
[345905.380000] usb 1-1.2: new high-speed USB device number 14 using ehci-platform

i nic wiecej.

75

Odp: [Kamera] Obslugiwane kamery pod OpenWrt

cat /proc/bus/usb/devices pokaż, bo może się okazać że nie widzi w ogóle urządzenia na USB.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.