TANIDVR(1)
π tanidvr(1) β bestie's guide to pulling video off DVRs π
okay so hi, this is the manual page for tanidvr(1), a lil command-line bestie for talking to DVRs and IP cameras that speak the DVR-IP protocol that Dahua uses. it's from the tanidvr tool family and yeah, we're doing this together, no cap π«Ά
β¨ NAME β¨
tanidvr β the tool for DVRs and IP cameras based on the DVR-IP protocol used by Dahua. that's literally it, that's the whole vibe.
πΈ SYNOPSIS πΈ
tanidvr -m <mode> -t <address> -u <user> -w <password> [OPTION]
like... you give it a mode, an address, a user, a password, and then whatever extra options your heart desires π
π¦ DESCRIPTION π¦
TaniDVR is a CLI tool for accessing DVRs and IP cameras used for CCTV surveillance systems, and it works over the proprietary DVR-IP protocol on port 37777/TCP. yes bestie, one specific port, it knows what it likes.
The main character energy of TaniDVR is dumping video from a device. With that, it can record to a Matroska (MKV) file, or it can dump the video in realtime so you can play it in an external player. both are iconic, pick your fighter β¨
π OPTIONS π
-m,--operation-modeβ0shows you some DVR info.1dumps video. that's the whole menu, simple queen behavior.-t,--dvr-targetβ the IP/hostname, like where your camera lives. gotta know the address to slide into its DMs.-p,--dvr-portβ network port (default37777).-u,--dvr-userβ DVR user (heads up, this may not work if you're not admin!).-w,--dvr-passwordβ DVR password. keep it secret, keep it safe π-c,--dvr-channelβ0-255(default0).-s,--dvr-sub-channelβ0is main (default).1is secondary.-a,--net-protocol-dialectβ0is the common dialect (default).1is the common dialect but while emulating OEM client behavior. dress-up mode fr.-n,--media-containerβ0is DVR native: DHAV (.dav|.dhav) or RAW H.264 (depends on the DVR itself).1is Matroska (.mkv) (default).-f,--out-fileβ<filename>(default: empty β console stdout). so if you don't say anything, it just yells the video at your terminal.-k,--keep-aliveβ<mili_seconds>(default:100ms). sends innocuous packets to the DVR so the connection doesn't get dropped gratuitously. to disable it (not recommended), set to0. it's giving "texting back so they don't ghost you" π-e,--timeoutβ<mili_seconds>(default5000ms). this is the inactivity timeout β how long the DVR connection can sit there doing nothing before it's considered dead. a new DVR connection is started after this. to disable it (not recommended), set to0.-x,--sixty-hertz-ntscβ (default: not enabled). if defined, it assumes the NTSC field frequency is60Hzinstead of the typical59.94Hz. some cameras do generate exact60Hzvideo. important: this switch does NOT affect PAL video. periodt.-r,--ts-procβ0means no correction will be performed to the buggy DHAV stream timestamps.1means perform timestamp correction (default).-h,--helpβ prints the help message and exits. the classic.
π EXAMPLES π
- show some information about the DVR:
tanidvr -m 0 -t 192.168.0.12 -u admin -w secret1234
- record a video to a file:
tanidvr -m 1 -t 192.168.0.12 -u admin -w secret1234 -c 2 -f camera2.mkv
- play the video in realtime with an external player:
tanidvr -m 1 -t 192.168.0.12 -u admin -w secret1234 -c 2 | mplayer -cache 32 - 2>/dev/null
- a simple media server and some clients. NOTE: INSECURE. NOT to be implemented as-is. it's shown only for didactic purposes. do not deploy this, bestie, i'm begging π
(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
π¨ real talk: that media-server example is INSECURE and should NOT be implemented as-is. it's purely for didactic purposes. look at it, learn from it, do not ship it.
π AUTHOR π
tanidvr was written by Daniel Mealha Cabrita <dancab@gmx.net>. π
This manual page was written by Marcos Talau <marcos@talau.info> for the Debian project (but may be used by others).
and that's a wrap, bestie π«Ά this was tanidvr version 1.4.1, dated 18 Aug 2022, straight from the tanidvr manual pages. go dump some video, stay secure, and remember β never expose that ncat server, iykyk π
β¨
π¦ where this page comes from
- debian bookworm: tanidvr 1.4.1-1+b1 Β· GPL-3.0-or-later
- debian trixie: tanidvr 1.4.1-2 Β· GPL-3.0-or-later
- ubuntu noble: tanidvr 1.4.1-2 Β· GPL-3.0-or-later
- ubuntu questing: tanidvr 1.4.1-2
- ubuntu resolute: tanidvr 1.4.1-2build1 Β· GPL-3.0-or-later
- ubuntu stonking: tanidvr 1.4.1-2build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms