dhav2mkv(1)
β¨ dhav2mkv β DHAV video to MKV format converter β¨
okay bestie, welcome to the dhav2mkv manual page (section 1, we're fancy like that π
). Sit down, hydrate, and let me tell you about the little tool that takes your crusty old DHAV files and gives them a glow-up. π¦
πΈ NAME πΈ
dhav2mkv β the DHAV video to MKV format converter, your main character converter tool π
π SYNOPSIS π
dhav2mkv [OPTION]
π DESCRIPTION π
dhav2mkv is a standalone tool that converts DHAV (H.264) video into MKV (H.264) video. That's it. That's the job. And it ate. π₯
ngl, it's a container-level girlie only β it works purely at the media container level. So the H.264 data inside is exactly what the DVR handed over, bugs and all. No fixing, no filtering, no editorializing. The DVR said what it said. π
dhav2mkv also does not support specifying a channel number. It just assumes the stream holds a single channel, instead of the theoretically possible 'n' multiplexed channel stream. Why did that option get dropped, you ask? Well bestie, because some DVRs generate DHAV streams with an incorrect channel number in such a way that two or more channels collide with the same channel number β which makes it literally impossible to tell one from another. π Plus, DHAV multi-channel multiplexing just isn't used in practice. So yeah, the option got ghosted. π
This tool is part of the TaniDVR project. π
π OPTIONS π
-i,--in-fileβ<input DHAV file>(default: empty β usesstdin). So if you don't say anything, it'll just read from standard input, no cap. π-o,--out-fileβ<output MKV file>(default: empty β usesstdout). Same vibe, other direction: no filename means it spits everything out to standard output. β¨-x,--sixty-hertz-ntscβ (default: not enabled). If you define this, it assumes the NTSC field frequency is60Hz, instead of the typical59.94Hz. Some cameras genuinely do generate exact60Hzvideo. Heads up though: this switch does NOT affect PAL video, so don't come for it about that. π-r,--ts-procβ0means no correction will be performed on the buggy DHAV stream timestamps.1means perform timestamp correction β and that's the default. Pick your fighter. β-h,--helpβ prints the help message and exits. The classic "just tell me what to do" button. π«Ά
π¦ USE CASES π¦
- Converting already-existing DHAV files to MKV. Those files might be
tanidvr-generated, or generated by the software that shipped with the DVR itself β whether out of legacy or by choice.
Here's the tea: DHAV files are only (currently) playable with the software included with the DVR. Meanwhile MKV is a modern, open, and commonly supported container format. Switching to a standard container also lets you recompress the video for better storage usage. Lowkey a win-win. π
- Creating a video hub (a video repeater), propagating DHAV media that, at the end-point, gets converted to MKV.
The DVR itself supports a very limited number of simultaneous connections (usually slighty more than hardware channels). And near the maximum active connections, the DVR tends to get even more unstable. So direct connections to the DVR should be kept to an essential minimum, fr fr. π€
dhav2mkv lets you convert ongoing DHAV video (doing that with MKV is not viable for technical reasons, iykyk). Any stream starting point is acceptable β down to byte granularity. Also, a temporary source interruption with lost/corrupted data gets automatic resync (which is also what tanidvr does when outputting MKV data). Resilient queen. π
A simple media hub can be implemented with existing complementary software, such as ncat (from the nmap project) with its --broker option.
- For Digital Forensics. Some police forces already use
dhav2mkvfor last-step recovering of video evidence from apprehended DVRs. Not me finding out this little tool is out here doing actual hero work ππ
β EXAMPLES β
- Convert an existing DHAV file to MKV.
dhav2mkv -i MyVideo.dhav -o MyVideo.mkv
- Using
dhav2mkvinstead oftanidvr's internal routines.
NOTE: NOT NECESSARY in practice, since tanidvr can output MKV directly. It is shown only for didactic purposes. Don't do extra work for no reason bestie. π
tanidvr -n 0 -m 1 -t 192.168.0.12 -u admin -w secret1234 -c 2 | dhav2mkv > channel_2_video.mkv
- Simple media server and some clients.
NOTE: INSECURE. NOT to be implemented as-is. It is shown only for didactic purposes. Please, I'm begging, do not ship this. π
(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
π AUTHOR π
dhav2mkv 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). Generous icon behavior honestly. π
and that's the whole page, bestie! π«Ά this was dhav2mkv-1.4.1, dated 18 Aug 2022 β go forth, convert responsibly, and remember: DHAV in, MKV out, bugs preserved exactly as the DVR intended. slay. β¨π
πΈ
π¦ where this page comes from
- debian bookworm: dhav2mkv 1.4.1-1+b1 Β· GPL-3.0-or-later
- debian trixie: dhav2mkv 1.4.1-2 Β· GPL-3.0-or-later
- ubuntu noble: dhav2mkv 1.4.1-2 Β· GPL-3.0-or-later
- ubuntu resolute: dhav2mkv 1.4.1-2build1 Β· GPL-3.0-or-later
- ubuntu stonking: dhav2mkv 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