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 β€” uses stdin). So if you don't say anything, it'll just read from standard input, no cap. πŸ“
  • -o, --out-file β€” <output MKV file> (default: empty β€” uses stdout). 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 is 60Hz, instead of the typical 59.94Hz. Some cameras genuinely do generate exact 60Hz video. Heads up though: this switch does NOT affect PAL video, so don't come for it about that. πŸŽ€
  • -r, --ts-proc β€” 0 means no correction will be performed on the buggy DHAV stream timestamps. 1 means 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 dhav2mkv for 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 dhav2mkv instead of tanidvr'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