Subscriber Discussion

Avigilon ACC Export Bug?

U
Undisclosed #1
Jul 06, 2015

Hello IPVM!

I'm seeing a bug when exporting AVIs from Avigilon's VMS. Basically, when I go to export a generic RTSP stream recording as an AVI, I see that in both VLC and AVInaptic that the frame rate is 120fps... Even though I have the camera running at 10fps.

My main worry here is that bandwidth is not being correctly calculated with these, as Avigilon's bandwidth results (in the VMS) show ~1.2 Mbps, but both VLC and AVInaptic report ~3.1 Mbps when analyzing the exported video. Does anyone have experience with this issue and know how to export a clean AVI file that doesn't explode FPS? (P.S. I don't fully trust Avigilon's bandwidth readings in their VMS).

FWIW, I'm exporting the generic RTSP recordings with the Windows Media Codec (The only codec selectable).

U
Undisclosed #2
Jul 06, 2015
IPVMU Certified

Is it possible that the export sets the frame rate of the rtsp stream to some multiple (12x), of the original so that the export can proceed 12x as fast?

Just a thought.

UI
Undisclosed Integrator #3
Jul 13, 2015

I get the same result when exporting to avi, and using ffprobe. It may be a hack of the original avi format, where a framerate of 120fps allows for variable framerate during playback at 24pfs and 30fps. http://www.virtualdub.org/blog/pivot/entry.php?id=103. They just put empty frames in the stream. I think it is totally unnecesary. Today there are so many cool open source codecs, containers, libraries and tools available. Avi is old and bad for you. They should use mp4 or mkv if they want to export h264 anyway. Then they don't need to reencode, just copy the stream. With no quality loss.

U
Undisclosed #2
Jul 13, 2015
IPVMU Certified

Agreed that they should add capability to export directly to mp4/mkv.

However, in regards to the OP bandwidth concern about AVI export in particular, even if

They just put empty frames in the stream...

I'm thinking it shouldn't make a big difference in the size of the export, since they are empty, (except for overhead).

Also, I would think that transcoding from a bit rate of 1.2 Mbps H.264 to 3.1 Mbps VC1 is not out of line, considering the relative performance of the Codecs involved.

Do you agree?

UI
Undisclosed Integrator #3
Jul 13, 2015

As I understand the avi hack, you don't actually add any more data to the stream, except for the overhead/meta data for the extra frames. I believe the number of transcoded frames are the same as if the vc1 video had the correct frame rate. So you shouldn't have any noticeable higher bit rate than the vc1 video in actual frame rate. And if you don't want to loose too much detail in the transcoding, a higher bit rate for the vc1 video is logical. So yes, I agree that the numbers seem sane. I don't think its a bug. Just a wasted opportunity to implement a more effective solution. Transcoding, when you don't have to, is just weird. It should stay as an option though, so that you may play back the video on vanilla windows installations.

UI
Undisclosed Integrator #3
Oct 26, 2018

One related problem, is that if you try to remux the avi file exported from ACC, with for instance ffmpeg, into a mkv file or even another avi, it fails. It seems to be a timing issue with all the empty frames.

The only way I have found to export lossless video (based on the original h264 from the camera) from ACC, is to export the video as a series of png images. Muxing this monstrosity into a mkv file actually works. You get something called a "motion png" stream in the matroska container. You have to know or guess the camera video stream framerate, though.

The matroska/png file plays fine in vlc and mpc-hc. It even plays in windows mediaplayer on windows 10. But one minute of video, from which acc created a 42MB avi, ended up as an 1,62GB mkv file. So not an optimal solution anyhow. Transcoding the png files to a h264 mkv (libx264,crf 18) ended up at 24MB. And that should be pretty much lossless.

When the acc player/native export combo is not an option, acc itself does not seem to have a solution. And, as mentioned by others, an export of the original h264 video stream into a mp4 or mkv would be the perfect, simple solution. I really hope that Avigilon will implement this soon.

(1)
New discussion

Ask questions and get answers to your physical security questions from IPVM team members and fellow subscribers.

Newest discussions