.\" Text automatically generated by txt2man .TH tanidvr 1 "18 Aug 2022" "tanidvr-1.4.1" "tool for DVRs and IP cameras based on DVR-IP protocol used by Dahua" .SH NAME \fBtanidvr \fP- tool for DVRs and IP cameras based on DVR-IP protocol used by Dahua \fB .SH SYNOPSIS .nf .fam C \fBtanidvr\fP \fB-m\fP \fB-t\fP
\fB-u\fP \fB-w\fP [\fIOPTION\fP] .fam T .fi .fam T .fi .SH DESCRIPTION TaniDVR is a CLI tool for accessing DVRs and IP cameras used for CCTV surveillance systems based on the proprietary DVR-IP protocol (port 37777/TCP). .PP The main use of TaniDVR is to dump video from a device. With this, it can record to a Matroska (MKV) file or dump the video in realtime to play in an external player. .SH OPTIONS .TP .B \fB-m\fP, \fB--operation-mode\fP 0 - display DVR information. 1 - dump video. .TP .B \fB-t\fP, \fB--dvr-target\fP IP/hostname. .TP .B \fB-p\fP, \fB--dvr-port\fP Network port (default 37777). .TP .B \fB-u\fP, \fB--dvr-user\fP DVR user (may not work if not admin!). .TP .B \fB-w\fP, \fB--dvr-password\fP DVR password. .TP .B \fB-c\fP, \fB--dvr-channel\fP 0-255 (default 0). .TP .B \fB-s\fP, \fB--dvr-sub-channel\fP 0 - main (default). 1 - secondary. .TP .B \fB-a\fP, \fB--net-protocol-dialect\fP 0 - common dialect (default). 1 - common dialect, while emulating OEM client behavior. .TP .B \fB-n\fP, \fB--media-container\fP 0 - DVR native: DHAV (.dav|.dhav) or RAW H.264 (depends on the DVR itself). 1 - Matroska (.mkv) (default). .TP .B \fB-f\fP, \fB--out-file\fP (default: empty -- console stdout). .TP .B \fB-k\fP, \fB--keep-alive\fP (default: 100ms). Send innocuous packets to the DVR in order to avoid the connection to be dropped gratuitously. To disable (not recommended), set to 0. .TP .B \fB-e\fP, \fB--timeout\fP (default 5000ms). Inactivity timeout for DVR connection to be considered dead. A new DVR connection is started after this. To disable (not recommended), set to 0. .TP .B \fB-x\fP, \fB--sixty-hertz-ntsc\fP (default: not enabled). If defined, assumes NTSC field frequency to be 60Hz, instead of the typical 59.94Hz. Some cameras do generate exact 60Hz video. This switch does NOT affect PAL video. .TP .B \fB-r\fP, \fB--ts-proc\fP 0 - No correction will be performed to the buggy DHAV stream timestamps. 1 - Perform timestamp correction (default). .TP .B \fB-h\fP, \fB--help\fP Prints help message and exit. .SH EXAMPLES .IP \(bu 3 Show some information about the DVR. .PP .nf .fam C tanidvr -m 0 -t 192.168.0.12 -u admin -w secret1234 .fam T .fi .IP \(bu 3 Record a video to a file. .PP .nf .fam C tanidvr -m 1 -t 192.168.0.12 -u admin -w secret1234 -c 2 -f camera2.mkv .fam T .fi .IP \(bu 3 Play the video in realtime with an external player. .PP .nf .fam C tanidvr -m 1 -t 192.168.0.12 -u admin -w secret1234 -c 2 | mplayer -cache 32 - 2>/dev/null .fam T .fi .IP \(bu 3 Simple media server and some clients. NOTE: INSECURE. NOT to be implemented as-is. It is shown only for didactic purposes. .PP .nf .fam C (server at 192.168.20.1) tanidvr -n 0 -m 1 -t 192.168.0.12 -u admin -w secret1234 -c 5 | ncat --broker -l 192.168.20.1 2000 (clients ; same/other host) ncat --recv-only 192.168.20.1 2000 | dhav2mkv | mplayer -cache 32 - ncat --recv-only 192.168.20.1 2000 | dhav2mkv > channel_5_realtime_backup.mkv ncat --recv-only 192.168.20.1 2000 > channel_5_realtime_backup.dhav .fam T .fi .SH AUTHOR \fBtanidvr\fP was written by Daniel Mealha Cabrita . .PP This manual page was written by Marcos Talau for the Debian project (but may be used by others).