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: Reconnect V4L2 device (MrDave) 2. Re: Wrong Video Duration since upgrade to motion 4.5 (Arvid Ihnen) ---------------------------------------------------------------------- Message: 1 Date: Tue, 13 Dec 2022 18:41:49 -0700 From: MrDave <motionmrd...@gmail.com> To: motion-user@lists.sourceforge.net Subject: Re: [Motion-user] Reconnect V4L2 device Message-ID: <b9888261-569f-a70c-b9e8-c03b1f4f1...@gmail.com> Content-Type: text/plain; charset="utf-8"; Format="flowed" Opened as issue #1605 and closed via a patch. https://github.com/Motion-Project/motion/issues/1605 MrDave On 12/13/2022 5:47 AM, Holger Dahm wrote: > Hello, > I compiled latest MotionEyeOs on a RaspberryPi 3 having a V4L2 usb > camera fix plugged in where MotionEye (MOTIONEYE_VERSION = > ebf45bdd74da753b95577b9efb36edb7fe48e9b8) as well as the below Motion > Server (MOTION_VERSION = release-4.5.0) is running all the time. > Note: I updated Motion to 4.5 because the version of the distribution > (MOTION_VERSION = release-4.3.1) had similar problems. > Because my system is battery powered I changed the normal behavior. > Triggered by a PIR sensor I deactivate or activate the power line of > the V4L2 usb camera to reduce overall power consumption. The dmesg > output in regard to this looks like: > [ 6084.065925] usb 1-1.5: USB disconnect, device number 9 > [ 6084.068538] uvcvideo: Failed to resubmit video URB (-19). > [ 6084.072507] uvcvideo: Failed to resubmit video URB (-19). > [ 6084.076487] uvcvideo: Failed to resubmit video URB (-19). > [ 6084.080463] uvcvideo: Failed to resubmit video URB (-19). > [ 6084.084458] uvcvideo: Failed to resubmit video URB (-19). > Maybe notable are the Failed messages? But they are not shown any time. > > The installed Motion 4.5 detects the lost device - here the log messages: > [1:ml1:Camera1] [ERR] [VID] v4l2_capture: VIDIOC_QBUF: No such device > [1:ml1:Camera1] [ERR] [ALL] mlp_capture: Video device fatal error - > Closing video device > [1:ml1:Camera1] [NTC] [VID] vid_close: Cleaning up V4L2 device > [1:ml1:Camera1] [NTC] [VID] v4l2_cleanup: Closing video device > /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0 > [1:ml1:Camera1] [WRN] [ALL] mlp_retry: Retrying until successful > connection with camera > [1:ml1:Camera1] [NTC] [VID] vid_start: Opening V4L2 device > [1:ml1:Camera1] [NTC] [VID] v4l2_device_open: Using videodevice > /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0 and input -1 > [1:ml1:Camera1] [ALR] [VID] v4l2_device_open: Failed to open video > device /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0: No > such file or directory > And tries to reconnect as long as device is back: > [1:ml1:Camera1] [WRN] [ALL] mlp_retry: Retrying until successful > connection with camera > [1:ml1:Camera1] [NTC] [VID] vid_start: Opening V4L2 device > [1:ml1:Camera1] [NTC] [VID] v4l2_device_open: Using videodevice > /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0 and input -1 > [1:ml1:Camera1] [ALR] [VID] v4l2_device_open: Failed to open video > device /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0: No > such file or directory > After some tries it tells: > [1:ml1:Camera1] [ERR] [VID] vid_start: V4L2 device failed to open > [1:ml1:Camera1] [NTC] [ALL] mlp_capture: Video signal lost - Adding > grey image > However if V4L2 usb camera is powered again dmesg output looks like this: > [ 6097.164651] usb 1-1.5: new high-speed USB device number 10 using > dwc_otg > [ 6097.367975] usb 1-1.5: New USB device found, idVendor=32e4, > idProduct=9230, bcdDevice= 1.00 > [ 6097.367999] usb 1-1.5: New USB device strings: Mfr=2, Product=1, > SerialNumber=0 > [ 6097.368013] usb 1-1.5: Product: HD USB Camera > [ 6097.368027] usb 1-1.5: Manufacturer: HD USB Camera > [ 6097.375666] uvcvideo: Found UVC 1.00 device HD USB Camera (32e4:9230) > [ 6097.432895] uvcvideo 1-1.5:1.0: Entity type for entity Extension 3 > was not initialized! > [ 6097.432922] uvcvideo 1-1.5:1.0: Entity type for entity Processing 2 > was not initialized! > [ 6097.432941] uvcvideo 1-1.5:1.0: Entity type for entity Camera 1 was > not initialized! > [ 6097.433438] input: HD USB Camera: HD USB Camera as > /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/input/input5 > Motion reconnect calls the open function, but fails first: > [1:ml1:Camera1] [WRN] [ALL] mlp_retry: Retrying until successful > connection with camera > [1:ml1:Camera1] [NTC] [VID] vid_start: Opening V4L2 device > [1:ml1:Camera1] [NTC] [VID] v4l2_device_open: Using videodevice > /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0 and input -1 > [1:ml1:Camera1] [ALR] [VID] v4l2_device_open: Failed to open video > device /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0: > Bad file descriptor > [1:ml1:Camera1] [ERR] [VID] vid_start: V4L2 device failed to open > [1:ml1:Camera1] [NTC] [ALL] mlp_capture: Video signal lost - Adding > grey image > And all next tries fail again telling: > [1:ml1:Camera1] [WRN] [ALL] mlp_retry: Retrying until successful > connection with camera > [1:ml1:Camera1] [NTC] [VID] vid_start: Opening V4L2 device > [1:ml1:Camera1] [NTC] [VID] v4l2_device_open: Using videodevice > /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0 and input -1 > [1:ml1:Camera1] [ALR] [VID] v4l2_device_open: Failed to open video > device /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0: > Device or resource busy > Note: Sometimes it crashs meanwhile (for example in a daemon.c of a > linked web lib)?! More to this if I can reproduce the issue. > If I now call the console tool lsof it tells me that the device isn't > busy. > If I restart Motion the V4L2 usb camera is found and opened again > fine. If I now call the console tool lsof it tells me that Motion > occupies the device. > Do you have any idea why the device can't be reopened? > Yes as a workaround I always can kill Motion and restart Motion after > V4L2 usb camera is plugged on again. But this more MS and not the > Linux way of life... ;) > Best regards > Holger Dahm -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Wed, 14 Dec 2022 08:11:20 +0100 From: Arvid Ihnen <arvid.ih...@arcor.de> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] Wrong Video Duration since upgrade to motion 4.5 Message-ID: <fb07e175-5471-4ecd-ad29-945f27e0e...@arcor.de> Content-Type: text/plain; charset="us-ascii" HI, thanks for your replies. @Tony: Not sure what the viewing of the video has to do with the generation? @MrDave: Here is the (hopefully) relevant part of the configuration: minimum_frame_time 0 movie_max_time 0 movie_output on movie_bps 400000 movie_quality 60 movie_codec mp4 timelapse_codec mpg movie_duplicate_frames off movie_extpipe_use off framerate 25 width 1920 height 1080 As far as understood, it is encoded. Best Regards Stefan > Am 14.12.2022 um 00:55 schrieb MrDave <motionmrd...@gmail.com>: > > Is this via the passthrough option or encoded? > > > > On 12/13/2022 4:46 PM, Tony wrote: >> My suggestion is to observe the output of "top" for excessive cpu usage >> while viewing the mp4 >> >> On Dec 13, 2022 14:58, Arvid Ihnen via Motion-user >> <motion-user@lists.sourceforge.net> >> <mailto:motion-user@lists.sourceforge.net> wrote: >> Hi, >> I just upgraded my docker based motion system from 4.3.1 to 4.5.0. Since >> then some of the videos shows a wrong duration. Attached is an example of >> the mediainfo output of a captured video, which is in reality about 50 >> seconds long: >> >> General >> Complete name : 20221213150454.mp4 >> Format : MPEG-4 >> Format profile : Base Media >> Codec ID : isom (isom/iso2/avc1/mp41) >> File size : 9.02 MiB >> Duration : 42 min 16 s >> Overall bit rate : 29.8 kb/s >> Writing application : Lavf57.83.100 >> >> Video >> ID : 1 >> Format : AVC >> Format/Info : Advanced Video Codec >> Format profile : Baseline@L4 >> Format settings : 1 Ref Frames >> Format settings, CABAC : No >> Format settings, Reference frames : 1 frame >> Format settings, GOP : M=1, N=12 >> Codec ID : avc1 >> Codec ID/Info : Advanced Video Coding >> Duration : 42 min 16 s >> Bit rate : 11.9 Mb/s >> Width : 1 920 pixels >> Height : 1 080 pixels >> Display aspect ratio : 16:9 >> Frame rate : 25.000 FPS >> Color space : YUV >> Chroma subsampling : 4:2:0 >> Bit depth : 8 bits >> Scan type : Progressive >> Bits/(Pixel*Frame) : 0.230 >> Stream size : 9.02 MiB (100%) >> Writing library : x264 core 152 r2854 e9a5903 >> Encoding settings : cabac=0 / ref=1 / deblock=0:0:0 / >> analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / >> me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / >> fast_pskip=1 / chroma_qp_offset=0 / threads=4 / lookahead_threads=4 / >> sliced_threads=1 / slices=4 / nr=0 / decimate=1 / interlaced=0 / >> bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=12 / >> keyint_min=1 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=20.0 / >> qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0 >> Codec configuration box : avcC >> >> I did not change any configuration parameter from 4.3.1 to 4.5.0. When >> playing the video (almost) the last frame is displayed for the remaining >> time. Any idea? >> >> Many thanks for your help! >> >> >> >> >> _______________________________________________ >> Motion-user mailing list >> Motion-user@lists.sourceforge.net <mailto:Motion-user@lists.sourceforge.net> >> https://lists.sourceforge.net/lists/listinfo/motion-user >> <https://lists.sourceforge.net/lists/listinfo/motion-user> >> https://motion-project.github.io/ <https://motion-project.github.io/> >> >> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user >> <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... ------------------------------ ------------------------------ 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 196, Issue 12 ********************************************