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: v4l2loopback giving error :Error selecting input 0
      VIDIOC_S_INPUT: Device or resource busy. (Abhisek Techie)


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

Message: 1
Date: Wed, 26 Sep 2018 22:06:12 +0530
From: Abhisek Techie <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] v4l2loopback giving error :Error selecting
        input 0 VIDIOC_S_INPUT: Device or resource busy.
Message-ID:
        <calvpzyvzznswsarxts6taqy0ppgkrnaczu+qwpvldebtt9w...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hey Dave,
Thanks it is working fine with 4.1.1 release even the loopback is working.
Thank you.
Planning to set it up in Rpi.





On Wed, 26 Sep 2018, 18:47 MrDave, <[email protected]> wrote:

> I would recommend checking the version (motion -h) to see that you are
> running the latest release Motion (4.1.1).
> Dave
> On 9/26/2018 3:49 AM, Abhisek Techie wrote:
>
> Hey Dave ,
>
> Thanks for pointing out the issue . I am getting a new error now  "*main:
> Thread 1 - Watchdog timeout, did NOT restart graceful,killing it!*".As ,
> I am getting this issue I could not test your recommended changes .Any
> suggestion on getting rid of timeout issue.
>
> Below  are the error  logs -
>
> [0:motion] [NTC] [ALL] [Sep 25 02:20:55] motion_startup: Using log type
> (ALL) log level (NTC)
> [0:motion] [NTC] [ALL] [Sep 25 02:20:55] become_daemon: Motion going to
> daemon mode
> [0:motion] [NTC] [ALL] [Sep 25 02:20:55] become_daemon: Created process id
> file /var/run/motion/motion.pid. Process ID is 9211
> [0:motion] [NTC] [ALL] [Sep 25 02:20:55] motion_startup: Motion running as
> daemon process
> [0:motion] [NTC] [ENC] [Sep 25 02:20:55] ffmpeg_init: ffmpeg libavcodec
> version 57.48.101 libavformat version 57.41.100
> [0:motion] [NTC] [ALL] [Sep 25 02:20:55] main: Camera 0 is from
> /etc/motion/motion.conf
> [0:motion] [NTC] [ALL] [Sep 25 02:20:55] main: Camera 0 is device:
> /dev/video0 input -1
> [0:motion] [NTC] [ALL] [Sep 25 02:20:55] main: Stream port 8081
> [0:motion] [NTC] [ALL] [Sep 25 02:20:55] main: Waiting for threads to
> finish, pid: 9211
> [0:web_control] [NTC] [STR] [Sep 25 02:20:55] http_bindsock: listening on
> any IPv4 address port 8080
> [0:web_control] [NTC] [STR] [Sep 25 02:20:55] httpd_run: Started
> motion-httpd server on port 8080 (auth Disabled)
> [1:ml1] [NTC] [ALL] [Sep 25 02:20:55] motion_init: Camera 0 started:
> motion detection Enabled
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] vid_v4lx_start: Using videodevice
> /dev/video0 and input -1
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_get_capability:
> ------------------------
> cap.driver: "uvcvideo"
> cap.card: "EasyCamera"  *[Even with UVC Camera, I am getting the same
> issue]*
> cap.bus_info: "usb-0000:02:03.0-1"
> cap.capabilities=0x84200001
> ------------------------
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_get_capability: - VIDEO_CAPTURE
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_get_capability: - STREAMING
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_select_input: name = "Camera
> 1", type 0x00000002, status 00000000
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_select_input: - CAMERA
> [1:ml1] [WRN] [VID] [Sep 25 02:20:55] v4l2_select_input: Device doesn't
> support VIDIOC_G_STD
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_set_pix_format: Config palette
> index 17 (YU12) doesn't work.
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_set_pix_format: Supported
> palettes:
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_set_pix_format: (0) MJPG
> (Motion-JPEG)
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_set_pix_format: 0 - Motion-JPEG
> (compressed : 1) (0x47504a4d)
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_set_pix_format: (1) YUYV (YUYV
> 4:2:2)
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_set_pix_format: 1 - YUYV 4:2:2
> (compressed : 0) (0x56595559)
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_set_pix_format Selected palette
> YUYV
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_do_set_pix_format: Testing
> palette YUYV (320x240)
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_do_set_pix_format: Using
> palette YUYV (320x240) bytesperlines 640 sizeimage 153600 colorspace
> 00000008
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: found control
> 0x00980900, "Brightness", range 0,100
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: "Brightness",
> default 50, current 50
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: found control
> 0x00980901, "Contrast", range 0,100
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: "Contrast",
> default 50, current 50
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: found control
> 0x00980902, "Saturation", range 0,100
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: "Saturation",
> default 50, current 50
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: found control
> 0x00980903, "Hue", range 0,100
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: "Hue", default
> 50, current 50
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: found control
> 0x00980918, "Power Line Frequency", range 0,2
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: "Power Line
> Frequency", default 1, current 1
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: found control
> 0x00980910, "Gamma", range 0,100
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] v4l2_scan_controls: "Gamma",
> default 50, current 50
> [1:ml1] [NTC] [VID] [Sep 25 02:20:55] vid_v4lx_start: Using V4L2
> [1:ml1] [NTC] [ALL] [Sep 25 02:20:55] image_ring_resize: Resizing
> pre_capture buffer to 1 items
> [1:ml1] [NTC] [STR] [Sep 25 02:20:56] http_bindsock: listening on any IPv4
> address port 8081
> [1:ml1] [NTC] [ALL] [Sep 25 02:20:56] motion_init: Started motion-stream
> server on port 8081 (auth Disabled)
> *[0:motion] [ERR] [ALL] [Sep 25 02:21:26] main: Thread 1 - Watchdog
> timeout, trying to do a graceful restart*
> [0:motion] [ERR] [ALL] [Sep 25 02:22:26] main: Thread 1 - Watchdog
> timeout, did NOT restart graceful,killing it!
> [1:ml1] [ERR] [VID] [Sep 25 02:22:27] v4l2_next: VIDIOC_DQBUF: Interrupted
> system call
> [0:motion] [ERR] [ALL] [Sep 25 02:22:28] main: cleaning Thread 1
> [0:motion] [NTC] [STR] [Sep 25 02:22:28] stream_stop: Closing
> motion-stream listen socket & active motion-stream sockets
> [0:motion] [NTC] [STR] [Sep 25 02:22:28] stream_stop: Closed motion-stream
> listen socket & active motion-stream sockets
> [0:motion] [NTC] [VID] [Sep 25 02:22:28] vid_close: Closing video device
> /dev/video0
> [0:motion] [NTC] [ALL] [Sep 25 02:22:29] main: Motion thread 1 restart
> [1:ml1] [NTC] [ALL] [Sep 25 02:22:29] motion_init: Camera 0 started:
> motion detection Enabled
> [1:ml1] [NTC] [VID] [Sep 25 02:22:29] vid_v4lx_start: Using videodevice
> /dev/video0 and input -1
> [1:ml1] [NTC] [VID] [Sep 25 02:22:29] v4l2_get_capability:
>
>
>
> Regards,
>
>
>
>
>
>
>
>
> Regards
>
> On Tue, Sep 25, 2018 at 8:09 PM MrDave <[email protected]> wrote:
>
>> The other program needs to use video2 rather than video1.   So steps 5/6
>> need to be interchanged.
>> 5.started motion server-   service motion  start
>> 6.Executed my program which uses /dev/video2 device
>>
>> If the other program needs audio, then you would need to use ffmpeg or
>> something else to feed the camera into video2 and then have both the other
>> program as well as motion use that device for input.
>>
>> Dave
>> On 9/25/2018 4:49 AM, Abhisek Techie wrote:
>>
>> Hi ,
>>
>> I am trying to configure a v4l2loopback device in Motion server through
>> which I can live stream .But I am getting "selecting input 0
>> VIDIOC_S_INPUT: Device or resource busy". My /dev/video1 device is used by
>> another program , hence, I would like to live stream  through /dev/video2
>> v4l2loopback device
>> Below are the details
>> Environment
>> OS - Debian
>> Below are the steps I have configured
>> 1.Installed v4l2loopback-dkms package
>> 2.sudo modprobe -r v4l2loopback
>> 3. After step 2 I could see video2 listed under /dev
>> 4.Configured motion.conf file  Main changes
>>     videodevice /dev/video1  [this is my main camera]
>>     video_pipe /dev/video2   [this is the v4l2loopback device]
>> 5.Executed my program which uses /dev/video1 device
>> 6.started motion server-   service motion  start
>> 7. Tried to access live stream from a browser by typing
>> http://localhost:8081
>> 8. Not receiving the live feed .When checked the logs I see [VID] [Sep 25
>> 00:40:40] v4l2_select_input: Error selecting input 0 VIDIOC_S_INPUT: Device
>> or resource busy.
>> Error details-
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:22] motion_startup: Using log type
>> (ALL) log level (ALL)
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:22] become_daemon: Motion going to
>> daemon mode
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:22] become_daemon: Created process
>> id file /var/run/motion/motion.pid. Process ID is 7031
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:22] motion_startup: Motion running
>> as daemon process
>> [0:motion] [NTC] [ENC] [Sep 25 00:40:22] ffmpeg_init: ffmpeg libavcodec
>> version 57.48.101 libavformat version 57.41.100
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:22] main: Camera 0 is from
>> /etc/motion/motion.conf
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:22] main: **Camera 0 is device:
>> /dev/video1 input -1**
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:22] main: Stream port **8081**
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:22] main: Waiting for threads to
>> finish, pid: 7031
>> [0:web_control] [NTC] [STR] [Sep 25 00:40:22] http_bindsock: listening on
>> any IPv4 address port 8080
>> [0:web_control] [NTC] [STR] [Sep 25 00:40:22] httpd_run: Started
>> motion-httpd server on port 8080 (auth Disabled)
>> [1:ml1] [NTC] [ALL] [Sep 25 00:40:22] motion_init: Camera 0 started:
>> motion detection Enabled
>> [1:ml1] [NTC] [VID] [Sep 25 00:40:22] vid_v4lx_start: Using videodevice
>> /dev/video1 and input -1
>> [1:ml1] [NTC] [VID] [Sep 25 00:40:22] v4l2_get_capability:
>> ------------------------
>> cap.driver: "uvcvideo"
>> cap.card: "UVC Camera (046d:081b)"
>> cap.bus_info: "usb-0000:02:03.0-2"
>> **cap.capabilities=**0x84200001****
>> ------------------------
>> [1:ml1] [NTC] [VID] [Sep 25 00:40:22] v4l2_get_capability: - VIDEO_CAPTURE
>> [1:ml1] [NTC] [VID] [Sep 25 00:40:22] v4l2_get_capability: - STREAMING
>> [1:ml1] [NTC] [VID] [Sep 25 00:40:22] v4l2_select_input: name = "Camera
>> 1", type 0x00000002, status 00000000
>> [1:ml1] [NTC] [VID] [Sep 25 00:40:22] v4l2_select_input: - CAMERA
>> [1:ml1] [ERR] [VID] [Sep 25 00:40:22] **v4l2_select_input: Error
>> selecting input 0 VIDIOC_S_INPUT: Device or resource busy**
>> [1:ml1] [NTC] [VID] [Sep 25 00:40:22] vid_v4lx_start: Using V4L1
>> [1:ml1] [NTC] [ALL] [Sep 25 00:40:22] image_ring_resize: Resizing
>> pre_capture buffer to 1 items
>> [1:ml1] [ERR] [ALL] [Sep 25 00:40:32] motion_init: Error capturing first
>> image
>> [1:ml1] [NTC] [STR] [Sep 25 00:40:32] http_bindsock: listening on any
>> IPv4 address port 8081
>> [1:ml1] [NTC] [ALL] [Sep 25 00:40:32] motion_init: Started motion-stream
>> server on port 8081 (auth Disabled)
>> [1:ml1] [ERR] [ALL] [Sep 25 00:40:32] motion_loop: Video device fatal
>> error - Closing video device
>> [1:ml1] [NTC] [VID] [Sep 25 00:40:32] vid_close: Closing video device
>> /dev/video1
>> [1:ml1] [DBG] [ALL] [Sep 25 00:40:33] motion_loop: vid_return_code 1
>> [1:ml1] [DBG] [ALL] [Sep 25 00:40:33] motion_loop: vid_return_code 1
>> [1:ml1] [WRN] [ALL] [Sep 25 00:40:40] motion_loop: Retrying until
>> successful connection with camera
>> [1:ml1] [NTC] [ALL] [Sep 25 00:40:48] motion_loop: End of event 1
>> [1:ml1] [NTC] [ALL] [Sep 25 00:40:48] motion_loop: Thread exiting
>> [1:ml1] [NTC] [STR] [Sep 25 00:40:48] stream_stop: Closing motion-stream
>> listen socket & active motion-stream sockets
>> [0:web_control] [NTC] [STR] [Sep 25 00:40:48] httpd_run: motion-httpd -
>> Finishing
>> [0:web_control] [NTC] [STR] [Sep 25 00:40:48] httpd_run: motion-httpd
>> Closing
>> [0:web_control] [NTC] [STR] [Sep 25 00:40:48] motion_web_control:
>> motion-httpd thread exit
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:49] main: Threads finished
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:50] main: Motion terminating
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:50] motion_remove_pid: Removed
>> process id file (pid file).
>> [0:motion] [NTC] [ALL] [Sep 25 00:40:50] motion_remove_pid: Closing
>> logfile (/var/log/motion/motion.log).
>>
>> Please suggest how to get  rid of this error .
>> Regards
>>
>>
>>
>>
>>
>> _______________________________________________
>> Motion-user mailing 
>> [email protected]https://lists.sourceforge.net/lists/listinfo/motion-userhttps://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
>
>
>
>
>
> _______________________________________________
> Motion-user mailing 
> [email protected]https://lists.sourceforge.net/lists/listinfo/motion-userhttps://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
-------------- next part --------------
An HTML attachment was scrubbed...

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



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

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user


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

End of Motion-user Digest, Vol 147, Issue 23
********************************************

Reply via email to