Send Motion-user mailing list submissions to
        motion-user@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        motion-user-requ...@lists.sourceforge.net

You can reach the person managing the list at
        motion-user-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Network Camera only Camera (John Rose)
   2. Re: Network Camera only Camera (Mike Wilson)
   3. Not writing to database (David Powell)
   4. Re: Not writing to database (Mike Wilson)


----------------------------------------------------------------------

Message: 1
Date: Fri, 9 Nov 2018 12:30:27 +0000
From: John Rose <john.aaron.r...@gmail.com>
To: Motion MailingList <motion-user@lists.sourceforge.net>
Subject: [Motion-user] Network Camera only Camera
Message-ID: <1dbf91ef-81c3-a564-530b-9a5564544...@gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed

I'm baffled by trying to use a Network Camera as only camera in motion.

ffprobe -rtsp_transport udp 
rtsp://1404332:j123456r@192.168.101.51:554/onvif2 gives no problem
but
ffprobe -rtsp_transport tcp 
rtsp://1404332:j123456r@192.168.101.51:554/onvif2 gives:
[rtsp @ 0x5624d86b0080] Nonmatching transport in server reply
rtsp://1404332:j123456r@192.168.101.51:554/onvif2: Invalid data found 
when processing input

However, nmap -p554 192.168.101.51 gives:
PORT??? STATE SERVICE
554/tcp open? rtsp
MAC Address: 4C:B0:08:8F:8D:7B (Shenzhen Gwelltimes Technology)
Nmap done: 1 IP address (1 host up) scanned in 0.70 seconds

So ffprobe & nmap contradict each other re tcp & udp usage. Am I correct 
instating that?

Using "rtsp_uses_tcp off" line shows (whereas "rtsp_uses_tcp on" gives 
the "non matching transport" line as in ffprobe):
? motion.service - LSB: Start Motion detection
 ?? Loaded: loaded (/etc/init.d/motion; generated)
 ?? Active: active (exited) since Fri 2018-11-09 12:26:37 GMT; 15min left
 ???? Docs: man:systemd-sysv-generator(8)
 ? Process: 900 ExecStart=/etc/init.d/motion start (code=exited, 
status=0/SUCCESS)

Nov 09 12:26:36 Laptop systemd[1]: Starting LSB: Start Motion detection...
Nov 09 12:26:37 Laptop motion[900]:? * Starting motion detection daemon 
motion
Nov 09 12:26:37 Laptop motion[900]:??? ...done.
Nov 09 12:26:37 Laptop systemd[1]: Started LSB: Start Motion detection.
Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [NTC] [ALL] 
conf_load: Processing thread 0 - config file /etc/motion/motion.conf
Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [NTC] [ALL] 
config_camera: Processing camera config file /etc/motion/camera1.conf
Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [NTC] [ALL] 
motion_startup: Motion 4.0 Started
Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [ERR] [ALL] 
myfopen: Error opening file /var/log/motion/motion.log with mode a: Permis
Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [EMG] [ALL] 
motion_startup: Exit motion, cannot create log file /var/log/motion/motion

Unfortunately, the penultimate line for the motion service doesn't show 
all of the line. Any ideas?

PS


-- 
John



------------------------------

Message: 2
Date: Fri, 9 Nov 2018 13:10:07 -0500
From: Mike Wilson <knobby2...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] Network Camera only Camera
Message-ID:
        <CAAVeUCrzazOc4sQ4cjjg9EZP0Ezcu=zwNQ_weQiVmn=emjh...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I would say that nmap is telling you what ports are open and ffprobe is
actually talking to the camera. So the port is open, but it isn't speaking
a language that ffprobe can understand.

Now, on to the problem. The user running motion is unable to write to the
log file /var/log/motion/motion.log. You probably need to just change
ownership of the file to the user that is running motion. My guess is that
you initially ran motion as root and now it has another user.

On Fri, Nov 9, 2018 at 7:32 AM John Rose <john.aaron.r...@gmail.com> wrote:

> I'm baffled by trying to use a Network Camera as only camera in motion.
>
> ffprobe -rtsp_transport udp
> rtsp://1404332:j123456r@192.168.101.51:554/onvif2 gives no problem
> but
> ffprobe -rtsp_transport tcp
> rtsp://1404332:j123456r@192.168.101.51:554/onvif2 gives:
> [rtsp @ 0x5624d86b0080] Nonmatching transport in server reply
> rtsp://1404332:j123456r@192.168.101.51:554/onvif2: Invalid data found
> when processing input
>
> However, nmap -p554 192.168.101.51 gives:
> PORT    STATE SERVICE
> 554/tcp open  rtsp
> MAC Address: 4C:B0:08:8F:8D:7B (Shenzhen Gwelltimes Technology)
> Nmap done: 1 IP address (1 host up) scanned in 0.70 seconds
>
> So ffprobe & nmap contradict each other re tcp & udp usage. Am I correct
> instating that?
>
> Using "rtsp_uses_tcp off" line shows (whereas "rtsp_uses_tcp on" gives
> the "non matching transport" line as in ffprobe):
> ? motion.service - LSB: Start Motion detection
>     Loaded: loaded (/etc/init.d/motion; generated)
>     Active: active (exited) since Fri 2018-11-09 12:26:37 GMT; 15min left
>       Docs: man:systemd-sysv-generator(8)
>    Process: 900 ExecStart=/etc/init.d/motion start (code=exited,
> status=0/SUCCESS)
>
> Nov 09 12:26:36 Laptop systemd[1]: Starting LSB: Start Motion detection...
> Nov 09 12:26:37 Laptop motion[900]:  * Starting motion detection daemon
> motion
> Nov 09 12:26:37 Laptop motion[900]:    ...done.
> Nov 09 12:26:37 Laptop systemd[1]: Started LSB: Start Motion detection.
> Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [NTC] [ALL]
> conf_load: Processing thread 0 - config file /etc/motion/motion.conf
> Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [NTC] [ALL]
> config_camera: Processing camera config file /etc/motion/camera1.conf
> Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [NTC] [ALL]
> motion_startup: Motion 4.0 Started
> Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [ERR] [ALL]
> myfopen: Error opening file /var/log/motion/motion.log with mode a: Permis
> Nov 09 12:26:37 Laptop motion[1023]: [-46028912:motion] [EMG] [ALL]
> motion_startup: Exit motion, cannot create log file /var/log/motion/motion
>
> Unfortunately, the penultimate line for the motion service doesn't show
> all of the line. Any ideas?
>
> PS
>
>
> --
> John
>
>
> _______________________________________________
> Motion-user mailing list
> Motion-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 3
Date: Fri, 9 Nov 2018 13:47:43 -0600
From: David Powell <da...@depowell.com>
To: Motion discussion list <Motion-user@lists.sourceforge.net>
Subject: [Motion-user] Not writing to database
Message-ID: <430b22f3-8910-c35f-9abb-157cdf001...@depowell.com>
Content-Type: text/plain; charset=utf-8; format=flowed

This database issue is driving me nuts.? I'm using version 
4.1.1+git20181002-062a328 of Motion and everything seems to work OK, 
except it won't write events to the MySQL database.? I'm sure it's 
something I'm not doing right but I can't see it. There are no errors in 
the log at any logging level. I have the config file set with:

database_type mysql
database_dbname cameras
database_host localhost
database_port 3306
database_user root
database_password <redacted>
database_busy_timeout 0
sql_log_picture on
sql_log_snapshot off
sql_log_movie on
sql_log_timelapse off
sql_query INSERT INTO cameras.events 
(server_number,camera_number,event_number,event_date,video_length,filename) 
VALUES (2,%t,%v,{ts '%C'},null,'%v-%Y%m%d%H%M%S');

Nothing gets written to the database, and no errors are reported in the 
log file.? What am I doing wrong?

David




------------------------------

Message: 4
Date: Fri, 9 Nov 2018 14:56:20 -0500
From: Mike Wilson <knobby2...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] Not writing to database
Message-ID:
        <CAAVeUCpoyBWvjA35FEVXOsdbb4D0=vuuauzz0mof3-ea6z9...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

The goal has always been to support that case, but there could be a bug
related to the changes to support tying the events together for video and
pictures. I use:

sql_query insert into security_file(camera, event_id, filename, frame,
file_type, time_stamp) values('%t', '%{dbeventid}', '%f', '%q', '%n',
'%Y-%m-%d %T')
sql_query_start insert into security_events (camera, event_time_stamp)
values('%t', '%Y-%m-%d %T')

This might help you. It is worth a try if nothing else. If this does work
and the query alone doesn't, I would be sure to file a bug so we can sort
that out.

What I'm doing here with sql_query_start is generating an event in my
security_events table and then using the ID that it generates to tag each
video and picture so I don't have to guess later on my front-end.

On Fri, Nov 9, 2018 at 2:49 PM David Powell <da...@depowell.com> wrote:

> This database issue is driving me nuts.  I'm using version
> 4.1.1+git20181002-062a328 of Motion and everything seems to work OK,
> except it won't write events to the MySQL database.  I'm sure it's
> something I'm not doing right but I can't see it. There are no errors in
> the log at any logging level. I have the config file set with:
>
> database_type mysql
> database_dbname cameras
> database_host localhost
> database_port 3306
> database_user root
> database_password <redacted>
> database_busy_timeout 0
> sql_log_picture on
> sql_log_snapshot off
> sql_log_movie on
> sql_log_timelapse off
> sql_query INSERT INTO cameras.events
> (server_number,camera_number,event_number,event_date,video_length,filename)
>
> VALUES (2,%t,%v,{ts '%C'},null,'%v-%Y%m%d%H%M%S');
>
> Nothing gets written to the database, and no errors are reported in the
> log file.  What am I doing wrong?
>
> David
>
>
>
> _______________________________________________
> Motion-user mailing list
> Motion-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------



------------------------------

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
Motion-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/motion-user


------------------------------

End of Motion-user Digest, Vol 149, Issue 9
*******************************************

Reply via email to