Send Motion-user mailing list submissions to
[email protected]
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
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."
Today's Topics:
1. Re: latest git fails to open netcam (Jiapau)
2. Re: latest git fails to open netcam (S Andreason)
3. Re: latest git fails to open netcam (S Andreason)
----------------------------------------------------------------------
Message: 1
Date: Fri, 30 Jul 2021 08:23:19 +0800
From: Jiapau <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] latest git fails to open netcam
Message-ID:
<caez4xx0cjpyhq5sfqt3vs3ywmbss24vckt-nzr1v49wov4q...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
v4l2_device_open: Failed to open video device /dev/video0: No such file
or directory
Did you try listing the webcams and see if the video0 is the correct one?
On Fri, Jul 30, 2021, 4:43 AM S Andreason <[email protected]> wrote:
> I updated from git and recompiled fresh
> motion Version 4.3.1+git20210728-ea2b2a9
> Now it fails to open the netcam as given in motion.conf.
> The motion.log is empty, even at log_level 9
> The only list of errors I can see is from
> $ sudo service motion status
> ? motion.service - LSB: Start Motion detection
> Loaded: loaded (/etc/init.d/motion; generated)
> Active: active (running) since Thu 2021-07-29 13:13:33 PDT; 14s ago
> Docs: man:systemd-sysv-generator(8)
> Process: 15297 ExecStart=/etc/init.d/motion start (code=exited,
> status=0/SUCCESS)
> Tasks: 2 (limit: 4915)
> CGroup: /system.slice/motion.service
> ??15303 /usr/bin/motion
>
> Jul 29 13:13:41 raspberrypi3 motion[15303]: [0:motion] [NTC] [ALL] main:
> Motion thread 1 restart
> Jul 29 13:13:41 raspberrypi3 motion[15303]: [0:motion] [NTC] [ALL]
> motion_start_thread: Camera ID: 0 Camera Name: (null) Device: /dev/video0
> Jul 29 13:13:41 raspberrypi3 motion[15303]: [1:ml1] [NTC] [ALL]
> motion_init: Camera 0 started: motion detection Enabled
> Jul 29 13:13:41 raspberrypi3 motion[15303]: [1:ml1] [NTC] [VID]
> vid_start: Opening V4L2 device
> Jul 29 13:13:41 raspberrypi3 motion[15303]: [1:ml1] [NTC] [VID]
> v4l2_device_open: Using videodevice /dev/video0 and input -1
> Jul 29 13:13:41 raspberrypi3 motion[15303]: [1:ml1] [ALR] [VID]
> v4l2_device_open: Failed to open video device /dev/video0: No such file
> or directory
> Jul 29 13:13:41 raspberrypi3 motion[15303]: [1:ml1] [ERR] [VID]
> vid_start: V4L2 device failed to open
> Jul 29 13:13:41 raspberrypi3 motion[15303]: [1:ml1] [WRN] [ALL]
> motion_init: Could not fetch initial image from camera
> Jul 29 13:13:41 raspberrypi3 motion[15303]: [1:ml1] [WRN] [ALL]
> motion_init: Motion continues using width and height from config file(s)
> Jul 29 13:13:41 raspberrypi3 motion[15303]: [1:ml1] [NTC] [ALL]
> image_ring_resize: Resizing pre_capture buffer to 1 items
>
> /etc/motion/motion.conf does have the lines:
> videodevice netcam
> netcam_url rtsp://admin:[email protected]/Streaming/Channels/102
>
> I get the same result on different cameras, so not just one model.
>
> I noticed the rtsp source files were recently edited. Is this a newly
> introduced bug?
>
>
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> 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: Thu, 29 Jul 2021 19:37:15 -0700
From: S Andreason <[email protected]>
To: Motion-user <[email protected]>
Subject: Re: [Motion-user] latest git fails to open netcam
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed
The webcam address is listed, but with the old format
videodevice netcam
instead of the new format
video_device netcam
it fails to complete that configuration at startup.
The part in the user guide that says old parameters are still read and
processed, just is not true for this one. Therefore it defaulted to
/dev/video0 which is, just not there.
Jiapau via Motion-user wrote:
> v4l2_device_open: Failed to open video device /dev/video0: No such file
> or directory
>
> Did you try listing the webcams and see if the video0 is the correct one?
>
> On Fri, Jul 30, 2021, 4:43 AM S Andreason <[email protected]
> <mailto:[email protected]>> wrote:
>
> I updated from git and recompiled fresh
> ??motion Version 4.3.1+git20210728-ea2b2a9
>
> /etc/motion/motion.conf does have the lines:
> videodevice netcam
> netcam_url
> rtsp://admin:[email protected]/Streaming/Channels/102
> <http://admin:[email protected]/Streaming/Channels/102>
>
>
------------------------------
Message: 3
Date: Thu, 29 Jul 2021 20:32:41 -0700
From: S Andreason <[email protected]>
To: Motion-user <[email protected]>
Subject: Re: [Motion-user] latest git fails to open netcam
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed
Hi Dave,
Documentation, yeah. I could list reasons why I did not look in the
right places to see the error message earlier this morning...
$ ./configure --prefix=/usr
to integrate into existing structure,
missed the need to also specify --sysconfdir=/etc
so that the log file would have somewhere to write.
Then when I finally turned off daemon, there were lack of write
privileges to /var/log/motion.
and $ sudo service motion status keeps too short a list of messages, so
the important part scrolled off the buffer.
Anyways, specifying port 554 works, and should be a default for rtsp://
when not specified. That should be an easy fix.
So problem fixed.
Moving on to the other camera model that has been the thorn of trouble,
the reason I sought to see if any motion updates would provide fixes.
Prelude: I set up a new pi yesterday, with the raspbian copied from the
first pi above, and assigned it to one of the Alptop anjvision ip
cameras. I forgot the camera only worked with older version of motion,
so didn't check what motion version was running.
This morning I figured out the stream was 29 seconds behind real time.
So event_start was triggered long after the actual action happened.
Present: Running today's git version,
I see some errors in motion.log
ffmpeg_avcodec_log: error while decoding MB 34 16, bytestream -7
[2:nc2:204_Alptop_] [INF] [NET] [Jul 29 20:04:31]
netcam_rtsp_decode_video: Ignoring packet with invalid data
and the delay is still there, although not up to 29 seconds at this time.
$ ss -t
State?????? Recv-Q?????? Send-Q???????????? Local
Address:Port??????????????? Peer Address:Port
ESTAB?????? 0??????????? 0 192.168.5.124:ftp???????????????
192.168.5.119:39748
ESTAB?????? 29060??????? 0 192.168.5.124:55522?????????????
192.168.5.204:rtsp
ESTAB?????? 0??????????? 0 192.168.5.124:ssh???????????????
192.168.5.119:38667
At this time of writing, 20 minutes later, it is up to 4 seconds
$ ss -t
State?????? Recv-Q?????? Send-Q???????????? Local
Address:Port??????????????? Peer Address:Port
ESTAB?????? 251140?????? 0 192.168.5.124:55522?????????????
192.168.5.204:rtsp
ESTAB?????? 0??????????? 0 192.168.5.124:ftp???????????????
192.168.5.119:37316
ESTAB?????? 0??????????? 0 192.168.5.124:ssh???????????????
192.168.5.119:38667
I have a log_level=9 file to offer.
I'll revert the motion version to 2020-10-26 for now.
Any hope of getting the stream to stay with real-time?
MrDave wrote:
> I think the revision I pushed last night may be tripping it up but I'm
> not quite ready to revoke it.? (I may however add additional
> documentation)
>
> Motion historically restricted the protocols that it would support and
> many issues have been raised regarding expanding the list. The
> revision removed the restriction on what is supported and leaves it
> open to the user to specify the right URI.? So it will now support
> http, https, rtsp, rtsps, etc, etc.? Whatever ffmpeg supports, Motion
> just passes the URI along to ffmpeg. BUT.....in order to do this, the
> default ports become a problem. There is no longer a fixed list of
> protocols.
>
> So from looking at your log, it seems that you may need to put in 554,
> 80 or something else into your netcam_url string so it addresses the
> message
>
> [1:ml1:205_HikVisi] [INF] [ENC] [Jul 29 14:12:30] ffmpeg_avcodec_log:
> Port missing in uri
>
>
> Dave
>
> On 7/29/2021 3:59 PM, S Andreason wrote:
>> Disregard my last email. After 5 hours of working on this, of course
>> it is after sending an email that I discover the problem.... turned
>> off daemon mode, got lots of write permission errors, but finally
>> could see something helpful:
>>
>> "videodevice" replaced with "video_device" after version 4.3.2
>>
>> Another hour plus later, I'm still unable to get motion to work, from
>> motion.log
>>
>> [1:ml1:205_HikVisi] [NTC] [VID] [Jul 29 14:12:30] vid_start: Opening
>> Netcam RTSP
>> [1:ml1:205_HikVisi] [INF] [NET] [Jul 29 14:12:30]
>> netcam_rtsp_set_parms: Setting up norm stream.
>> [1:ml1:205_HikVisi] [INF] [ALL] [Jul 29 14:12:30] util_parms_add:
>> Parsed: >decoder< >NULL<
>> [1:ml1:205_HikVisi] [INF] [NET] [Jul 29 14:12:30]
>> netcam_rtsp_set_path: Setting up rtsp via netcam
>> [1:ml1:205_HikVisi] [INF] [NET] [Jul 29 14:12:30]
>> netcam_rtsp_set_options: norm: Setting rtsp/rtmp
>> [1:ml1:205_HikVisi] [INF] [ALL] [Jul 29 14:12:30] util_parms_add:
>> Parsed: >rtsp_transport< >tcp<
>> [1:ml1:205_HikVisi] [INF] [ALL] [Jul 29 14:12:30] util_parms_add:
>> Parsed: >allowed_media_types< >video<
>> [1:ml1:205_HikVisi] [INF] [NET] [Jul 29 14:12:30]
>> netcam_rtsp_set_options: norm: option: rtsp_transport = tcp
>> [1:ml1:205_HikVisi] [INF] [NET] [Jul 29 14:12:30]
>> netcam_rtsp_set_options: norm: option: allowed_media_types = video
>> [1:ml1:205_HikVisi] [INF] [ENC] [Jul 29 14:12:30] ffmpeg_avcodec_log:
>> Port missing in uri
>> [1:ml1:205_HikVisi] [ERR] [NET] [Jul 29 14:12:30]
>> netcam_rtsp_open_context: norm: Unable to open
>> camera(205_HikVision_N): Invalid argument
>> [1:ml1:205_HikVisi] [INF] [NET] [Jul 29 14:12:30]
>> netcam_rtsp_cleanup: norm: Shutting down network camera.
>> [1:ml1:205_HikVisi] [NTC] [NET] [Jul 29 14:12:30]
>> netcam_rtsp_cleanup: Normal resolution: Shut down complete.
>> [1:ml1:205_HikVisi] [ERR] [VID] [Jul 29 14:12:30] vid_start: Netcam
>> RTSP failed to open
>>
>>
>> S Andreason wrote:
>>> /etc/motion/motion.conf does have the lines:
>>> videodevice netcam
>>>
>>
>>
>>
>> _______________________________________________
>> Motion-user mailing list
>> [email protected]
>> 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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user
------------------------------
End of Motion-user Digest, Vol 181, Issue 18
********************************************