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. Re: camera restart (Bau Dev)
   2. Re: mysqldb/mariadb libs (Henry B. Tindall, Jr.)


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

Message: 1
Date: Wed, 24 Jun 2020 15:52:35 +0200
From: Bau Dev <baudev.cont...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] camera restart
Message-ID:
        <cao-pi1vpqc05rcpnpc8ge1yntorq_mhat772sfc6xcwovxk...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Is setting log_level to 9 and log_type to ALL enough to have quality traces?

I'm trying to determine the reason for the stream interruption but it's
complicated. I thought it was /action/restart motion that was the problem
but I find that the stream sometimes gets stuck without even doing it.
Also, the flux sometimes gets blocked on my device A, and simply opening
the flux on a device B unblocks flux A.

I'll let you know if I make any discoveries...

Le mar. 16 juin 2020 ? 14:29, csspcmotion <mot...@curtissystemssoftware.com>
a ?crit :

> these are the relevant patches:
>
> *motion.h*:
>
> in struct context : insert
>
>    int overlay_pass;
>
> *in motion.c:*
>
> motion_init() after pthread_setspecific insert:
>
>       cnt->overlay_pass = 0;
>
> motion_overlay() at top of func: insert
>
>       ++cnt->overlay_pass;
>
>        MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO, "overlay_pass:%d",
> cnt->overlay_pass);
>
> process_image_ring() after struct image data line insert:
>
>       MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO, "ringout:%d ringin:%d",
> cnt->imgs.image_ring_out, cnt->imgs.image_ring_in);
>
> -----
>
> I don't see anything wrong per say in the code with the added debug ...
> except that debug confirms the
>
> code is still being called after an individual camera is restarted while
> the web streaming img data to my firefox
>
> browser sees nearly all the time after the restart a static frame even
> after multiple page refreshes with an occasional new static picture,
>
> its not until I do an all cameras restart that it works correctly. Further
> snapshot are still occurring for the said camera ... appears
>
> somehow the web streaming data is hosed ... further looking at the
> snapshots after the restart that occur every 2 seconds I do see they are
> happening
>
> with text over lay stuff with time that is getting incremented ... so the
> issue looks to be the web streaming portion is some how hosed with a
> individual camera restart ... also note I do set stream_port 8081 in main
> conf (motion.conf) file which not sure if that may be different than others
> are using and hint where to search for the problem.
>
> On 6/16/20 3:20 AM, tosiara wrote:
>
> Can you share what exactly patch you used for debugging and what
> exactly wrong do you see there?
>
> On Mon, Jun 15, 2020 at 8:26 PM csspcmotion<mot...@curtissystemssoftware.com> 
> <mot...@curtissystemssoftware.com> wrote:
>
> I put some debug in I see ring_out and ring_in changing on stream that is 
> broken after doing a restart,
>
> looking at the code some more it appears web stuff is only restarted when all 
> cameras are restarted.
>
> Also see the text overlay pass is happening and snapshots are still working 
> for the individual restarted camera
>
> but the web stream for that individual even after page refresh is static with 
> an occasional update on a refresh
>
> On 6/8/20 12:29 PM, Tim Skopnik wrote:
>
> As i remember i always had to restart a camera thread twice to get a new live 
> stream - but not quite sure if i still have the issue with the current 
> version...
>
> Am 08.06.2020 um 17:15 schrieb csspcmotion:
>
> I have been making some mods to motion code ... and I think there could be an 
> initialization issue that
> is being push around with my additions which might be breaking restart ....
> too early to tell ... in my last attempt with doing an individual camera 
> restart I could not
> get the stream in browser to resume ... had a black and then a still jpg ... 
> I refreshed the browser
> multiple times and at best could see occasionally a new static jpg. I further 
> tried it with the other 5
> streams with same result ... ... I then restart from "all cameras" web page 
> and they all restarted.
> also with my mods I had put debug that sees that motion loop on the restarted 
> camera is iterating.
> I have been using movie_passthrough on for all 6 cameras in this setup ...
> Is there a call I can add to resync stream ... maybe the ring buffer is hosed 
> ???
>
>
> On 6/8/20 7:25 AM, tosiara wrote:
>
> I tried to restart a camera through the web ui and all works as expected. 
> Yes, you need to refresh the page after restart, because the web browser does 
> not do that automatically. But after a single refresh all works fine, I can 
> see the stream again
>
> If you can reproduce the issue would be great to see the motion.log and/or 
> the screen recording
>
> On Sun, Jun 7, 2020 at 10:00 AM Bau Dev <baudev.cont...@gmail.com> 
> <baudev.cont...@gmail.com> wrote:
>
> I thought I was the only one having this problem...
> It's really weird because the image is stuck but the number of FPS is still 5 
> (I set FPS to 5).
> Also I'm not always able to reproduce this bug. Sometimes restarting the 
> camera works well.
>
> Le dim. 7 juin 2020 ? 02:52, csspcmotion <mot...@curtissystemssoftware.com> 
> <mot...@curtissystemssoftware.com> a ?crit :
>
> is it possible to restart an individual camera ... I thought I
>
> had this working ...but when I use web browser and select a
>
> given camera then follow by selecting under action restart,
>
> the browser image first goes black then after a couple of
>
> manual refreshes it is a static picture never getting update
>
>
>
> _______________________________________________
> Motion-user mailing 
> listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
> _______________________________________________
> Motion-user mailing 
> listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
> _______________________________________________
> Motion-user mailing 
> listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
>
>
> _______________________________________________
> Motion-user mailing 
> listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
>
> --tim.skop...@aptico.de, http://www.aptico.de/
> aptico GmbH, Alter Hellweg 60, D-44379 Dortmund
> fon: +49 231 185 85-20, fax: +49 231 185 85-25
> Amtsgericht Dortmund: HRB 15084, Gesch?ftsf?hrer:
> Dipl. Ing. Hartmut M?ller, Rudolf Slabe (MA),
> Tim Skopnik
>
> _______________________________________________
> Motion-user mailing 
> listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
> _______________________________________________
> Motion-user mailing 
> listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
> _______________________________________________
> 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: 2
Date: Wed, 24 Jun 2020 15:37:28 -0500
From: "Henry B. Tindall, Jr." <he...@linux-meister.com>
To: motion-user@lists.sourceforge.net
Subject: Re: [Motion-user] mysqldb/mariadb libs
Message-ID:
        <65dfc68c23bcaeb8407f29c1efda43dd.squir...@just76.justhost.com>
Content-Type: text/plain;charset=utf-8

Update, in case anyone ever runs across this issue:

I finally succeeded in compiling 4.3.1 with MariaDB support.  I had to
"hand-jam" a /usr/lib/pkgconfig/mariadb.pc file with the following
contents:

prefix=/usr
includedir=${prefix}/include/mysql/
libdir=${prefix}/lib64/

Name: MariaDB shared libraries
Version: 5.5.68-1
Description: MariaDB shared libraries
Cflags: -I${includedir}
Libs: -L${libdir} -lmysqlclient
Libs.private: -ldl -lm -lpthread -lssl -lcrypto


--------
I have NO idea why such a file is not included in the MariaDB-client or
MariaDB-shared packages...
The "Libs.private" may or may not be correct; they (apparently) are not
used in this scenario. After creating the file, a "./configure" went off
without a hitch and then compiled nicely.

For posterity, the packages I have installed are:

MariaDB-client-5.5.68-1.el7.centos.x86_64
MariaDB-server-5.5.68-1.el7.centos.x86_64
MariaDB-shared-5.5.68-1.el7.centos.x86_64
MariaDB-devel-5.5.68-1.el7.centos.x86_64
MariaDB-common-5.5.68-1.el7.centos.x86_64

-- 
Henry B. Tindall, Jr.
CISSP, SSCP, Security+, Linux+, RHCSA

On Wed, June 17, 2020 4:33 pm, Henry B. Tindall, Jr. wrote:
> Installed the latest MariaDB after creating repos on my Foreman server,
> updating Content Views, and all that mess:
>
> MariaDB-cassandra-engine-10.4.13-1.el7.centos.x86_64
> MariaDB-common-10.4.13-1.el7.centos.x86_64
> MariaDB-connect-engine-10.4.13-1.el7.centos.x86_64
> MariaDB-client-10.4.13-1.el7.centos.x86_64
> MariaDB-backup-10.4.13-1.el7.centos.x86_64
> MariaDB-compat-10.4.13-1.el7.centos.x86_64
> MariaDB-devel-10.4.13-1.el7.centos.x86_64
> MariaDB-server-10.4.13-1.el7.centos.x86_64
> MariaDB-shared-10.4.13-1.el7.centos.x86_64
> MariaDB-test-10.4.13-1.el7.centos.x86_64
> MariaDB-cracklib-password-check-10.4.13-1.el7.centos.x86_64
>
>
>
> Then, after a reboot, asterisk blows up on the odbc connector...  :(
> [abrt] : asterisk killed by SIGABRT
>
>
> fixed that by installing binaries from
> mariadb-connector-odbc-3.0.6-ga-rhel7-x86_64.tar.gz, editing the
> /etc/odbcinst.ini....
> , back to motion:
>
>
>
> configure finds mariadb !! compile, install, then:
>
>
> Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] database_type
> mysql Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] database_dbname
> motion Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] database_host
> localhost Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] database_port
> 3306
> Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] database_user
> <redacted>
> Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] database_password
> <redacted>
> Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] database_busy_timeout
> 0
> Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] sql_log_picture
> off Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] sql_log_snapshot
> on Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] sql_log_movie
> on Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] sql_log_timelapse
> off Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] sql_query_start
> Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] sql_query_stop
> Jun 17 15:31:30 pbx motion: [0:motion] [INF] [ALL] sql_query
> insert into security(camera, filename, frame, file_type, time_stamp,
> event_time_stamp) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
>
> But no insertions. :(
>
>
> MariaDB [motion]> select * from security order by time_stamp desc limit
> 10;
> +--------+--------+-------------------------------------------------------
> ---------+-------+-----------+--------------------------------+----------
> -----------+
> | serial | camera | filename
> | frame | file_type | event_time_stamp               | time_stamp
> |
> +--------+--------+-------------------------------------------------------
> ---------+-------+-----------+--------------------------------+----------
> -----------+
> | 218548 |      3 |
> /home/tindallh/public_html/motion/cam3/3935-20200616222027.mp4 |    17 | 8
>  | Linux-Meister.com - 2020061622 | 2020-06-16 22:20:27 |
> | 218398 |      3 |
> /home/tindallh/public_html/motion/cam3/3912-20200616195215.mp4 |     2 | 8
>  | Linux-Meister.com - 2020061619 | 2020-06-16 19:52:15 |
> | 218397 |      3 |
> /home/tindallh/public_html/motion/cam3/3911-20200616195140.mp4 |    25 | 8
>  | Linux-Meister.com - 2020061619 | 2020-06-16 19:51:40 |
> | 218396 |      1 |
> /home/tindallh/public_html/motion/cam1/1319-20200616195137.mp4 |    11 | 8
>  | Linux-Meister.com - 2020061619 | 2020-06-16 19:51:37 |
> | 218395 |      3 |
> /home/tindallh/public_html/motion/cam3/3910-20200616195050.mp4 |     9 | 8
>  | Linux-Meister.com - 2020061619 | 2020-06-16 19:50:50 |
> | 218394 |      1 |
> /home/tindallh/public_html/motion/cam1/1318-20200616195041.mp4 |     6 | 8
>  | Linux-Meister.com - 2020061619 | 2020-06-16 19:50:41 |
> | 218393 |      3 |
> /home/tindallh/public_html/motion/cam3/3909-20200616194938.mp4 |    16 | 8
>  | Linux-Meister.com - 2020061619 | 2020-06-16 19:49:38 |
> | 218392 |      1 |
> /home/tindallh/public_html/motion/cam1/1317-20200616194936.mp4 |    20 | 8
>  | Linux-Meister.com - 2020061619 | 2020-06-16 19:49:36 |
> | 218391 |      1 |
> /home/tindallh/public_html/motion/cam1/1316-20200616194625.mp4 |    16 | 8
>  | Linux-Meister.com - 2020061619 | 2020-06-16 19:46:25 |
> | 218390 |      1 |
> /home/tindallh/public_html/motion/cam1/1315-20200616194525.mp4 |     8 | 8
>  | Linux-Meister.com - 2020061619 | 2020-06-16 19:45:25 |
> +--------+--------+-------------------------------------------------------
> ---------+-------+-----------+--------------------------------+----------
> -----------+
> 10 rows in set (0.016 sec)
>
>
> Even after falling back to 4.2.2, which previously worked:
>
>
> Jun 17 15:48:02 pbx motion: [3:ml3:SouthPorchC] [WRN] [DBL] do_sql_query:
>  Ignoring empty sql query
> Jun 17 15:48:02 pbx motion: [3:ml3:SouthPorchC] [ERR] [DBL] do_sql_query:
> Mysql query failed Data too long for column 'event_time_stamp' at row 1
> error code 1406: No such file or directory Jun 17 15:48:09 pbx motion:
> [1:ml1:DrivewayCam] [WRN] [DBL] do_sql_query:
> Ignoring empty sql query
> Jun 17 15:48:09 pbx motion: [1:ml1:DrivewayCam] [ERR] [DBL] do_sql_query:
> Mysql query failed Data too long for column 'event_time_stamp' at row 1
> error code 1406: No such file or directory
>
> REMOVED the mariadb-connector-odbc files, all the 10.4 version MariaDB,
> re-installed the 5.5.65 version and the 5.2.5-8 version of
> mysql-connector-odbc, and both motion 4.2.2 and asterisk work... :O  Of
> course, now the 4.3.1 fails to find either mysql or MariaDB support
> again... So I guess I'll stick with 4.2.2 for the time being.  I'll have
> to create/sync the MariaDB 5.5 repos on my Foreman server; right now I'm
> using the CentOS7 Base repo for MariaDB and it doesn't have the
> MariaDB-client packages, for some reason.  I spent the better part of my
> free time yesterday adding a MariaDB product and all the repos and content
>  views for 10.x so now I'm behind on other projects...
>
> --
> Henry B. Tindall, Jr.
> CISSP, SSCP, Security+, Linux+, RHCSA
>
>
> On Wed, June 17, 2020 1:47 am, Hans Fernhout wrote:
>
>> Maybe installing a new version of MariaDB is a good idea. Often when
>> you start upgrading one bit you may need to upgrade other bits as well.
>> I have
>> MariaDB-10.4.12 installed.
>>
>>
>>
>> In Gentoo, Motion's autoconfigure checks for file
>> /usr/lib64/pkgconfig/mariadb.pc. Do you have that file? In CentOS the
>> path may be different.
>>
>> For the client software you should have
>> /usr/lib64/pkgconfig/libmariadb.pc. Not sure if a binary install will
>> install that. CentOs should have a package for the client software too,
>> I
>> would say.
>>
>> On 6/17/20 5:47 AM, Henry B. Tindall, Jr. wrote:
>>
>>
>>> Binaries installed from
>>> https://downloads.mariadb.com/Connectors/c/connector-c-3.1.8/; still
>>> no joy.  Thinking about updating to the 10.4 version of mariadb to see
>>> if that makes a difference...
>>>
>>
>>
>>
>
>





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



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

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 168, Issue 55
********************************************

Reply via email to