I've purchased a few Hikvision cameras now and there are things that I really like about them (build quality, picture quality, firmware features like NFS and CIFS sharing, and especially price) but now I'm running into a few things that I really hate about them. I can sort of ignore the incredibly stupid firmware language/region locking stuff but the custom video codec is killing me.
I have an Ubuntu Linux box as my home server that I run a lot things on (plex, apache, file sharing, backups, etc). I have 3 cameras that are using CIFS shares to save motion events which works great. I don't want to expose these cameras to the internet but I want some way to access the real time streams and the saved videos from outside my LAN. So I though I would write a web page/server that re-streams the rtps streams for viewing and makes the saved videos available. All of that isn't a huge problem except for the fact that Hikvision uses a proprietary codec inside their mp4 video files. They provide a Windows DirectShow filter (sort of like a codec) so that WMP and VLC can play the videos but they don't provide one on Linux which makes this impossible.
I've looked at the 32 bit Linux iVMS-4200 software, the Android iVMS-4200 software, and the Windows video filter, and the Hikvision SDK and they all contain the same set of libraries. The Hikvision SDK has some documentation on what they do and it seems pretty clear that SystemTranform or StreamTransClient library provides the video conversion functions for the clients. The 64 bit Hikvision SDK has a note saying that 64 bit can't decode video which is discouraging but probably not a deal killer. I also found a stackoverflow question where someone claims they reverse engineered the Hikvision YUV2RBG algorithm which might also be helpful (optimization - optimize python nested loops for YUV2RGB conversion - Stack Overflow).
What I'm hoping to do is figure out how to wrap these libraries in some code to make a real Linux video codec so that ffmpeg and vlc can read and play these videos on Linux (32 and 64 bit). I am a Linux C++ developer in my day job but I have no experience with video processing or codec writing. Does anyone else need these capability? Or have video processing expertise they can share? Or have experience w/ the Hikvision SDK?
If people are interested in the result or can help w/ the coding, let me know and we can set up a github repository to collaborate on.
TD
I have an Ubuntu Linux box as my home server that I run a lot things on (plex, apache, file sharing, backups, etc). I have 3 cameras that are using CIFS shares to save motion events which works great. I don't want to expose these cameras to the internet but I want some way to access the real time streams and the saved videos from outside my LAN. So I though I would write a web page/server that re-streams the rtps streams for viewing and makes the saved videos available. All of that isn't a huge problem except for the fact that Hikvision uses a proprietary codec inside their mp4 video files. They provide a Windows DirectShow filter (sort of like a codec) so that WMP and VLC can play the videos but they don't provide one on Linux which makes this impossible.
I've looked at the 32 bit Linux iVMS-4200 software, the Android iVMS-4200 software, and the Windows video filter, and the Hikvision SDK and they all contain the same set of libraries. The Hikvision SDK has some documentation on what they do and it seems pretty clear that SystemTranform or StreamTransClient library provides the video conversion functions for the clients. The 64 bit Hikvision SDK has a note saying that 64 bit can't decode video which is discouraging but probably not a deal killer. I also found a stackoverflow question where someone claims they reverse engineered the Hikvision YUV2RBG algorithm which might also be helpful (optimization - optimize python nested loops for YUV2RGB conversion - Stack Overflow).
What I'm hoping to do is figure out how to wrap these libraries in some code to make a real Linux video codec so that ffmpeg and vlc can read and play these videos on Linux (32 and 64 bit). I am a Linux C++ developer in my day job but I have no experience with video processing or codec writing. Does anyone else need these capability? Or have video processing expertise they can share? Or have experience w/ the Hikvision SDK?
If people are interested in the result or can help w/ the coding, let me know and we can set up a github repository to collaborate on.
TD