Why is a camera sequence sometimes extracted in MJPEG (Motion JPEG) format instead of AVC / H264?

Hi,

We are currently facing a weird issue on Milestone Professional+ 2018 R1. We sometieme extract video sequences on cameras that come out as MJPEG instead of AVC / H264. The parameters on all 8 cameras are the same, and we specify to use the H264 codec for recording. However, once in a while, some cameras will extract to MJPEG instead, which cause issues. Re-extracting the sequence for the same timeframe always give the same result. However, for other timeframes, the cameras successfully extract to H264.

Is there any reason why the cameras sometimes extract to MJPEG instead of H264? Is there any way to make it so it always extract to H264?

Thanks,

Daniel

At first I was thinking the JPEG(s) you were getting were at the very start of a requested stream - if I recall, there’s an option when starting a stream to get a snapshot of the camera to start with which can be useful when the stream isn’t immediately available due to intermittent connectivity or a long GOP.

But you say every time you request the video between T1 and T2, the format is always MJPEG. In that case I suspect that your camera feed is switching codecs for some reason. Maybe that’s a Milestone issue, camera issue, or maybe you or another application is connecting directly to the camera and causing the stream properties to change in some way. But I suspect it doesn’t have anything to do with your use of the SDK.

If you enable the diagnostic overlay in Smart Client and playback those sections of video, what codec is reported?

Hi Josh,

I enabled the diagnostics overlay in the Smart Client and looked the sequence up. The video codec is H264 for the entire of the sequence. I’m wondering what’s going on there, since the same camera correctly extracts sequences to H264 most of the time. Do you have any other hint?

Thank you very much for your help.