update: 2024-04: having problem connecting to camera with vlc? (rstp not well documented or not working at all?
try this: easy camera stream identification with ONVIF: it is a DAMN hussle, because EVERY camera vendor does it’s own rstp://user:password:ip.ad.dr.ess:/some/url/stream
- and often it’s NOT well documented or the camera is very old.
- hint: enable ONVIF in the camera’s web interface (netdiscover can help find the IP of the cam):
apt install onvif-tools
libonvif-dev/stable,stable 1.4.4-1 amd64
ONVIF IP camera client library
libonvif1/stable,stable 1.4.4-1 amd64
ONVIF IP camera client library
onvif-tools/stable,stable 1.4.4-1 amd64
ONVIF IP camera command line and GUI tools
then start it as non-root user like: onvif-gui
tested with H.VIEW + ANNKE cams:
this age of mass surveillance…
… who is observing “the observers”?
if the user wants to know who or what is lurking behind the house… the user needs to view live streams of surveillance cams on GNU Linux.
vlc player does the job nicely 🙂 and is available for most distros (thanks all involved!)
of course 99% of all surveillance cams sold are “Made in China” (often the same model is sold under different brands… the H.VIEW_HV-500G2 4K IP Kamera 8MP POE Surveillance cam (3840x2160P)cam is technically almost identical to the ANNKE and the more expensive HIKVISION)
the software of this cam is very bad but the quality of the CMOS sensor is good… e.g. to change it’s ip address the user can not use the web interface, it only works with the dedicated windows software. (direct download link of IPCManager_V4.02.28_win_x86.zip)
forget about the onboard features… it can not do ftp upload, it is said it can do nfs uploads to a fixed ip address…
so unless some server is processing that pretty good picture quality (also at night)… it will probably be a pure “viewing via vlc player” device.
- resolution: 3840x2160P 8MP-4K
- Objektiv: 2,8mm
- 24x IR LED night vision lights: Yes /Microphone: Yes
- power-input: DC12V
- supports: Onvif, FTP, NAS, NFS, RTSP
- example MAC: F0:23:B9:57:1B:XX (Ieee Registration Authority)
- (which probably means: they did not bother to register for a MAC at all)
What those cams also have in common: most “build-in”/onboard features like “motion detection” might not work, so those cams can only be purely seen as “cams that can stream udp rtsp video and audio via network”, all the “motion detection” is probably best done by a central server software ( still have to find the perfect Open Source GNU Linux solution for that)
- have tested the h.view extensively
- + picture quality: is pretty good day and night
- except when: there is fog at night, the particles are illuminated by IR LEDs and the visibility goes to zero
- uses a Sony Complementary metal–oxide–semiconductor (CMOS) (has nothing to do with the BIOS CMOS) picture sensor
- + outdoor durable: the cam even survived some rain and snow storms and below 0 degrees
- + works with TPLink PoE adapter reliably
- + NTP time server sync works 🙂
- – https does not work only unencrypted login via browser possible
- – support for firefox seems pretty bad (the basic config can be done, but it seems the producer heavily relies on iexplore + flash)
- – FTP does not work, only NFS is said to work NFS (NFS is fast which is good, security wise both protocols are pretty bad)
- – does not come with SD Card installed per default
- – DNS server can not be changed (!? per default 8.8.8.8 (Google’s) and 223.6.6.6 (AliBaba Cloud, hostname: public2.alidns.com) is set)
- whois 223.6.6.6
- netname: ALISOFT
descr: Aliyun Computing Co., LTD- Alibaba Cloud (Chinese: 阿里云; pinyin: Ālǐyún; lit. ‘Ali Cloud’), also known as Aliyun, is a Chinese multinational cloud computing company, a subsidiary of Alibaba Group. (src: Wiki)
viewing rtsp streams (even multiple on one PC) is no problem with a rtsp player like mplayer or vlc or
problem with mplayer: it does not seem to use hardware encoding in Debian 10, so it is skipping a lot of frames… so right now vlc is the only proper options to view those high definition streams (with reasonable (x<100%) cpu usage)
- connect with browser to cam
- check what ip is still free on the user’s network and asign a fixed ip to the cam (write it down)
- set password (leave default username for h.view and annke “admin”)
hostnamectl; # tested on Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-13-amd64 Architecture: x86-64 su - root; # become root apt update; apt install vlc; # install vlc player apt install mplayer; # install mplayer # the user will have to consult either # 1) the manual of the surveillance or webcam # 2) the web dashboard backend what the specific url of the rtsp stream is # lower quality stream (less abdnwidth) mplayer rtsp://admin:password@192.168.0.XX:554/live/sub > /dev/null 2>&1 # highest quality stream mplayer rtsp://admin:password@192.168.0.XX:554/live/main > /dev/null 2>&1 # will output the stream in a smaller window (so multiple can fit into one screen) # will move output window to x:100 y:100 mplayer -noborder -x 640 -y 460 -geometry 100:100 mplayer rtsp://username:password@192.168.0.XXX:554/live/main > /dev/null 2>&1 # > /dev/null 2>&1 is required or mplayer will spam /var/log/syslog with messages like # A: 36.7 V: 36.7 A-V: -0.018 ct: 0.004 0/ 0 1% 1% 0.2% 0 0 #033[J
what software to use?
vlc does a great job at viewing rtsp streams.
in vlc when a stream like this works, the user can then go: Media -> Save Playlist to file.m3u and place that Playlist.m3u on the Desktop.
With a simple double-click that streaming can be started.
mplayer works nice too, but realized it was doing a lot of “lazy” painting, which basically means if the user looks carefully at the clock… it is sometimes not updating… meaning… the codec thinks no major change to the picture happened and thus does not update that part of the screen.
once a cat was walking across the scene and it seemed like the cat froze in place… but no… it was just frame video compression and skipping in action.
maybe this can be corrected with some setting tweaking.
ffplay consumes way too much (100%) cpu usage.
manpages:
ps: IN-5907HD
can actually recommend THIS ONE model “IN-5907HD”
of this company, if the user is interested in sending surveillance videos via mail (the other models are of pretty bad quality… and mail might NOT work)
here are more screenshots from the web backend:
(GNU Linux Debian 10 + latest Firefox 84.0.2 (64-bit) was used)
Links:
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!