Exported content is corrupt depending on camera resolution - Hikvision

Jan 23, 2021
1
0
Australia
Hi All,

I recently deployed Milestone 2020 R3 (Essential+) to manage a mix of Hikvision cameras, being DS-2CD2035i and DS-2CD2055FWD.
The 2035 cameras are configured in a mix of 1080p and 2048x1536 resolutions, depending on their placement.

My issue is when attempting to export content using the Xprotect Smart Client, if the camera resolution is set to 1080p then the files are huge (over 2GB for 10 minutes of content as MKV and AVIs are even bigger) and are corrupt. VLC won't play them.
If the resolution is changed to 2048x1536 then the export produces files approx 400MB for 10 minutes as MKV and they play perfectly in VLC.

It doesn't matter if I use H264, H264+ or H265, the behaviour is the same. Also doesn't matter if I change the frame rate, bit rate or other parameters - the only trigger is the camera resolution.

The 2055 camera runs at 3072x1728 resolution in H265 and has no issues.

I considered changing from the Hikvision driver to ONVIF but then Milestone won't detect the main stream off the camera, only the substream with its very low resolution.

The 2035 cameras are the Chinese ones (serial number contains AACH) running some kind of modified English firmware, version is V5.4.20 build 160726.

I was using Synology Surveillance Station 8.x prior to Milestone and had no issues exporting content regardless of resolution (and I was able to use ONVIF if I wanted to).

Has anyone else come across this issue and have an idea of how to solve it?

Ta,
Dave
 
I can't solve all your problems. But I recommend against transcoding video when you are exporting from the VMS (Milestone). Transcoding only makes the video worse: worse quality, worse bitrate efficiency.
 
I have a very similar problem. I have been running Milestone 2019 R2 for years and MKV exports of around an hour long were under 2Gb. Now with Milestone 2020 R3 (Essential+) I get over 2Gb MKV for around 10 minutes.
In 2020 R3 it takes a long time (much longer than 2019 R2) to export 10 minutes of mkv and when I tried exporting as AVI I gave up because it was taking so long.
Exported MKV from 2020 R3 is unplayable by my usual playback software and the files freak out Windows 10 Explorer which I keep having to restart.
VLC will play the big 2020 R3 MKVs if I select video track two though.

I have figured some stuff out but don't have a solution yet.

The MKV contents are different between 2019 R2 and 2020 R3.
My IP cameras have two video streams.
I can not switch off the second video stream on the camera, so have always had that set to low quality to save bandwidth.
Milestone has been recording and exporting both video streams in 2019 R2 and 2020 R3.
In 2019 R2 the MKV contained my hi-res video stream 1 as H264 default stream and the stream 2 as V_MJPEG.
In 2020 R3 the MKV seems to be mixed up. My hi-res video stream 1 is now in the MKV as V_MJPEG second video track and the low res video stream 2 is in the MKV as H264 default video.
2048 resolution records and exports ok.
2048 res is limited on my cameras to 15fps but that is not the issue - setting the 1080 res to 15fps does not solve the 1080 problem.

So, the MKV mix up would explain why VLC can play back the video ok if video track two is selected. It also probably explains Windows explorer getting stressed when checking out the video files and not finding the tracks to be what they are reported as.
With MKVTOOLNIX I have taken MKV exports from 2020 R3 and remuxed an MKV, stripping out the track listed as H264 while keeping the track listed as V_MJPEG. The resulting MKV is playable in my usual video players, playing the hi-res recorded track but is still enormous in size for a 10 minute track - it is the V_MJPEG getting recorded as hi-res and huge size while the H264 track is lo-res and small.

Milestone Management Client allows you to edit the streams on your cameras under Devices -> Cameras.
In that section I have a dropdown menu for each camera where I can select video stream 1 or 2. I think I am supposed to be able to set check boxes to decide whether each stream is to be shown on the Live stream or recorded. I can not get these settings to work. I click on the check boxes but nothing happens. Live and Record remain ticked for both streams whatever I do. I was hoping to set the lo-res secondary stream to not record and therefore force Milestone to seeing only one track to export.

I installed the 16bit version of Xprotect Smart Client alongside the 64bit version but running the 16bit version does not solve the problem.
I tried installing the 64bit Xprotect Smart Client from 2020 R2 (20.2a) but it refused to install due to a later version being installed.

So, I am thinking this is a bug in 2020 R3, wondering if the same bug is there in 2020 R2 (20.2a) and 2020 R1 (20.1b). Windows will not currently open my Apps Settings so I can not look to see if the 2020 R3 Smart Client is something I could try uninstalling independently - if that is possible I would be tempted to try that and install Smart Client from 2020 R2 (20.2a), then perhaps uninstall that and try 2020 R1 (20.1b), which ultimately should hopefully allow me to go back to 2020 R3 if the older versions didn't work. I don't like the idea of completely uninstalling Xprotect to try to roll back the whole software to 2020 R2 (20.2a) or 2020 R1 (20.1b), since either old version is not guaranteed to not have the same bug and I could end up trashing my installation and not being able to get back to 2020 R3.
 
Update. Solved !
Sure enough, my cheeky attempt to try 2020 R2 Smart Client with 2020 R3 server failed because as seems usual with Milestone software, uninstalling a package does not fully uninstall it. 2020 R2 Smart Client thought 2020 R3 Smart Client was still installed.

Anyway, I found that there is a hotfix available for 2020 R3 Smart Client. I have installed that and it instantly solved the problem.