I bought a cheap EZVIZ S6 "action cam" and wanted to use it as a recorded and/or livestreaming PoV cam.
Ideally, it would be available as a video capture device without an sd card and also a native Linux video device.
So I did it. Here's how you can do it:
Make sure you have a working wifi card and an ethernet connection (because your wifi card will have to connect to the camera, so you need to use ethernet for internet).
Download motion
pacman -S v4l2loopback-dkms
sudo modprobe v4l2loopback
(check ls -lahtr /dev/
for the device name in case your video device is named something different than /dev/video0
for the config)
netcam_url rtsp://10.15.12.1:554/live
video_pipe /dev/video0
netcam_keepalive on
width 1280
height 720
framerate 30
Connect your Linux (I use Arch) laptop to the camera's wifi network.
ip addr
should show a 10.15.12.x IP for your wifi device.
run motion
in a terminal
watch the output to see what it's doing. It should say something like this soon after starting up:
[1:ml1] [NTC] [VID] vid_start: Opening Netcam RTSP
[1:ml1] [NTC] [NET] netcam_rtsp_connect: Normal resolution: Camera ((null)) connected
Now you should be able to ffplay /dev/video0
and your wifi "webcam" should behave like a native Linux video device.
Tested and working in Google Meet but requires you to manually keep the camera alive sometimes by pressing the power button (not sure why).
- if you don't have this same model, I recommend installing a packet capture application for your phone and initiating a connection via the app for your wifi camera. It will probably give you the rtsp URL that you need to connect to it with
motion
.