File capture when using network camera.
Question
I have setup motion with two types of video capture devices. One type are USB cameras and the second are old phones sitting on their own URL. Both devices capture the video and will display without problem to a web site.
My question/issue is the capture of .jpg files from these cameras. The USB cameras will create a directory full of images, but those devices specified in config files as "netcam_url http://blah--blah/file.jpg" do not.
This seems 'right' as the camera's specifying a single .jpg file in the netcam_url assignment, but I would l like to capture images to be used for thumbnails and to review for images...should the need arise.
Finally to my question, is this capture of images possible, and if so how?
thread1.conf
# /usr/local/etc/thread1.conf
#
# This config file was generated by motion 3.2.12
###########################################################
# Capture device options
############################################################
# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video0
# The video input to be used (default: 8)
# Should normally be set to 1 for video/TV cards, and 8 for USB cameras
input 8
# 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 1
############################################################
# 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 patch. (Default: current working directory)
target_dir /usr/local/apache2/htdocs/cam1
############################################################
# Live Webcam Server
############################################################
# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 8081
# Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
# The filename of the picture is appended as an argument for the command.
on_picture_save /usr/local/motion-extras/camparse1.pl
# Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
# Filename of movie is appended as an argument for the command.
on_movie_end /usr/local/motion-extras/mpegparse1.pl
thread3.conf
# /usr/local/etc/thread3.conf
#
# This config file was generated by motion 3.2.12
###########################################################
# Capture device options
############################################################
# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
#videodevice /dev/video2
# The video input to be used (default: 8)
# Should normally be set to 1 for video/TV cards, and 8 for USB cameras
input 8
# 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 3
############################################################
# 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 patch. (Default: current working directory)
target_dir /usr/local/apache2/htdocs/cam3
netcam_url http://192.168.15.104:8083/shot.jpg
############################################################
# Live Webcam Server
############################################################
# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 8083
# Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
# The filename of the picture is appended as an argument for the command.
on_picture_save /usr/local/motion-extras/camparse3.pl
# Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
# Filename of movie is appended as an argument for the command.
on_movie_end /usr/local/motion-extras/mpegparse3.pl
v4l2_palette 3
Environment
Motion version: |
3.2.12 |
ffmpeg version: |
|
Libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
|
--
JeffDosser - 26 Feb 2014
Follow Up
both threads files looks fine , however you have a trigger to be run when an image is capture for both threads ,
on_picture_save
can you try to comment those lines and check if images are saved ?
--
AngelCarpintero - 28 Feb 2014
Answer