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. Adding text to photos/videos (bobby)
   2. Re: Adding text to photos/videos (tosiara)
   3. Re: Adding text to photos/videos (bobby)
   4. Re: Adding text to photos/videos (Babau)


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

Message: 1
Date: Mon, 2 Nov 2020 08:35:13 -0500
From: bobby <architectofthefut...@gmail.com>
To: motion-user@lists.sourceforge.net
Subject: [Motion-user] Adding text to photos/videos
Message-ID:
        <CAEbhF_AWpoYEtDFqaWtoqH-VHawX-O0=ofwumsrq6i2u0nz...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I am trying to add text to photos/videos.  I have the following in a script
that I execute:
#!/bin/bash
LOAD=`top -b -n2 | grep "Cpu(s)" | awk '{print $2+$4}' | tail -n1`
TEXTLEFT=""
TEXTLEFT=$TEXTLEFT"System at %{host}"
TEXTLEFT=$TEXTLEFT"\nCPU $LOAD "
TEXTLEFT=$TEXTLEFT"\nfps: %{fps}"
TEXTLEFT=$TEXTLEFT"\nDate: %Y-%m-%d"
TEXTLEFT=$TEXTLEFT"\n%T-%q"
# Replace special chars with needed urlcodes
TEXTLEFT="${TEXTLEFT//%/%25}" #Replace % with %25
TEXTLEFT="${TEXTLEFT// /%20}" #Replace spaces with %20
TEXTLEFT="${TEXTLEFT//\{/%7B}" #Replace { with %7B
TEXTLEFT="${TEXTLEFT//\}/%7D}" #Replace } with %7D
curl http://localhost:8080/1/config/set?text_left=$TEXTLEFT

When I run it, this is the response that I get:
<!DOCTYPE html>
<html>
<body>
<h1>Not Valid</h1>
<p>The requested URL is not valid.</p>
</body>
</html>
<a href=/>&lt;&ndash; back</a>
</body>
</html>
-------------- next part --------------
An HTML attachment was scrubbed...

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

Message: 2
Date: Mon, 2 Nov 2020 18:58:11 +0200
From: tosiara <tosi...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] Adding text to photos/videos
Message-ID:
        <cachtdwq1qzykogymf3avyjc+j9+xt6bb4dt-+xri+bwkcly...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Which exact version of motion?

On Mon, Nov 2, 2020, 15:37 bobby <architectofthefut...@gmail.com> wrote:

> I am trying to add text to photos/videos.  I have the following in a
> script that I execute:
> #!/bin/bash
> LOAD=`top -b -n2 | grep "Cpu(s)" | awk '{print $2+$4}' | tail -n1`
> TEXTLEFT=""
> TEXTLEFT=$TEXTLEFT"System at %{host}"
> TEXTLEFT=$TEXTLEFT"\nCPU $LOAD "
> TEXTLEFT=$TEXTLEFT"\nfps: %{fps}"
> TEXTLEFT=$TEXTLEFT"\nDate: %Y-%m-%d"
> TEXTLEFT=$TEXTLEFT"\n%T-%q"
> # Replace special chars with needed urlcodes
> TEXTLEFT="${TEXTLEFT//%/%25}" #Replace % with %25
> TEXTLEFT="${TEXTLEFT// /%20}" #Replace spaces with %20
> TEXTLEFT="${TEXTLEFT//\{/%7B}" #Replace { with %7B
> TEXTLEFT="${TEXTLEFT//\}/%7D}" #Replace } with %7D
> curl http://localhost:8080/1/config/set?text_left=$TEXTLEFT
>
> When I run it, this is the response that I get:
> <!DOCTYPE html>
> <html>
> <body>
> <h1>Not Valid</h1>
> <p>The requested URL is not valid.</p>
> </body>
> </html>
> <a href=/>&lt;&ndash; back</a>
> </body>
> </html>
>
>
> _______________________________________________
> 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: Mon, 2 Nov 2020 12:12:44 -0500
From: bobby <architectofthefut...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] Adding text to photos/videos
Message-ID:
        <caebhf_dnhh2fsz8tqptursw4qgeodzhbid7s9nnm7ygmmng...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

4.1.1-1.1+b2

On Mon, Nov 2, 2020 at 11:59 AM tosiara <tosi...@gmail.com> wrote:

> Which exact version of motion?
>
> On Mon, Nov 2, 2020, 15:37 bobby <architectofthefut...@gmail.com> wrote:
>
>> I am trying to add text to photos/videos.  I have the following in a
>> script that I execute:
>> #!/bin/bash
>> LOAD=`top -b -n2 | grep "Cpu(s)" | awk '{print $2+$4}' | tail -n1`
>> TEXTLEFT=""
>> TEXTLEFT=$TEXTLEFT"System at %{host}"
>> TEXTLEFT=$TEXTLEFT"\nCPU $LOAD "
>> TEXTLEFT=$TEXTLEFT"\nfps: %{fps}"
>> TEXTLEFT=$TEXTLEFT"\nDate: %Y-%m-%d"
>> TEXTLEFT=$TEXTLEFT"\n%T-%q"
>> # Replace special chars with needed urlcodes
>> TEXTLEFT="${TEXTLEFT//%/%25}" #Replace % with %25
>> TEXTLEFT="${TEXTLEFT// /%20}" #Replace spaces with %20
>> TEXTLEFT="${TEXTLEFT//\{/%7B}" #Replace { with %7B
>> TEXTLEFT="${TEXTLEFT//\}/%7D}" #Replace } with %7D
>> curl http://localhost:8080/1/config/set?text_left=$TEXTLEFT
>>
>> When I run it, this is the response that I get:
>> <!DOCTYPE html>
>> <html>
>> <body>
>> <h1>Not Valid</h1>
>> <p>The requested URL is not valid.</p>
>> </body>
>> </html>
>> <a href=/>&lt;&ndash; back</a>
>> </body>
>> </html>
>>
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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: 4
Date: Mon, 2 Nov 2020 18:24:55 +0100
From: Babau <ba...@mail.com>
To: motion-user@lists.sourceforge.net
Subject: Re: [Motion-user] Adding text to photos/videos
Message-ID: <b88f48ae-efc6-32b5-8b59-5c58ba97b...@mail.com>
Content-Type: text/plain; charset=utf-8; format=flowed

In motion.conf add or edit:

/# Webcontrol configuration parameters//
//############################################################//
//
//# Port number used for the webcontrol.//
//webcontrol_port 8080//
//
//# Restrict webcontrol connections to the localhost.//
//webcontrol_localhost off//
//
//# Type of configuration options to allow via the webcontrol.//
//webcontrol_parms 1/


in camera1.conf or motion.conf add or edit:

/# Numeric identifier for the camera.//
//camera_id 1/

/# The port number for the live stream.//
//stream_port 8081//
/

in the script

>> curl http://localhost:8080/1/config/set?text_left=$TEXTLEFT

_for me this works_

Il 02/11/2020 14:35, bobby ha scritto:
> I am trying to add text to photos/videos.? I have the following in a
> script that I execute:
> #!/bin/bash
> LOAD=`top -b -n2 | grep "Cpu(s)" | awk '{print $2+$4}' | tail -n1`
> TEXTLEFT=""
> TEXTLEFT=$TEXTLEFT"System at %{host}"
> TEXTLEFT=$TEXTLEFT"\nCPU $LOAD "
> TEXTLEFT=$TEXTLEFT"\nfps: %{fps}"
> TEXTLEFT=$TEXTLEFT"\nDate: %Y-%m-%d"
> TEXTLEFT=$TEXTLEFT"\n%T-%q"
> # Replace special chars with needed urlcodes
> TEXTLEFT="${TEXTLEFT//%/%25}" #Replace % with %25
> TEXTLEFT="${TEXTLEFT// /%20}" #Replace spaces with %20
> TEXTLEFT="${TEXTLEFT//\{/%7B}" #Replace { with %7B
> TEXTLEFT="${TEXTLEFT//\}/%7D}" #Replace } with %7D
> curl http://localhost:8080/1/config/set?text_left=$TEXTLEFT
>
> When I run it, this is the response that I get:
> <!DOCTYPE html>
> <html>
> <body>
> <h1>Not Valid</h1>
> <p>The requested URL is not valid.</p>
> </body>
> </html>
> <a href=/>&lt;&ndash; back</a>
> </body>
> </html>
>
>
>
>
> _______________________________________________
> 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



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



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

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 173, Issue 2
*******************************************

Reply via email to