Hikvision and HiWatch recorders export footage as .mp4 files, but most of them are not MP4 at
all: they are MPEG program streams (the format of DVDs) behind a 40-byte header starting with
IMKH. Phones, editors and upload portals expect a real MP4, find none, and refuse the file or
play it without sound.
How to turn a Hikvision export into a real MP4
- Upload the exported
.mp4files, or a ZIP of the export folder (the player program in it is left out). - Choose Join the clips into one video if the recorder split the export.
- Download the converted MP4, named after the recording start.
What the conversion fixes
- The container. The H.264 picture is copied into a standard MP4 without re-encoding.
- The sound. Hikvision recorders usually record G.711 µ-law or A-law, which MP4 players can't play and many converters drop. It becomes AAC. The stream map inside the file names the codec, so the sound is never guessed wrong.
- The sound clock. Network recorders sometimes stamp the sound on a clock minutes away from the picture's, which leaves a converted file with minutes of sound over a frozen or black picture. The sound is moved to start with the picture, and the report says by how much.
- The recording time. Hikvision files store the date and time in each stream map. It becomes the MP4's creation time, its name, and an optional subtitle track with the time of every second.
When it can't be converted
Files from Hikvision recorders made before about 2011 start with 4HKH instead and use
Hikvision's own video codec, which only Hikvision's software decodes: open them in Hikvision's
player and export them to AVI or MP4. Sound in G.722.1 (used by some recorders) can't be
converted; the video is converted without it and the report says so. Encrypted exports need to be
exported again without a password.
More about what this tool reads and writes: CCTV Footage to MP4.