Page 1 of 1

H264 Stream Failure in ZoneMinder, Works in VLC

Posted: Mon May 13, 2024 11:44 am
by NewWatcher
Hello ZoneMinder Community,

I'm facing an issue with an H264 stream in ZoneMinder that functions correctly when accessed via VLC. The stream URL is as follows:

'rtsp://xx.xx.xxx.xx:xxx/axis-media/media.amp?videocodec=h264&resolution=1920x1080

While trying to use this stream, I encounter the following error messages in the ZoneMinder logs:

Error Message 1:
Component: zmc_m2
PID: 539042
Level: ERR
Message: "Failed to prime capture of initial monitor"
File: zmc.cpp
Line: 263

Warning Message:
Component: zmc_m2
PID: 539042
Level: WAR
Message: "No width and height in video stream. Trying again"
File: zm_ffmpeg_camera.cpp
Line: 397

Additional details:

Source Type: Ffmpeg
Changing videocodec=jpeg in the URL resolves the issue, but I need to use H264.

Has anyone experienced a similar issue or have any suggestions on how to troubleshoot this? I am completely new to zoneminder. Any help would be greatly appreciated!

Thank you in advance for your assistance!

Re: H264 Stream Failure in ZoneMinder, Works in VLC

Posted: Mon May 13, 2024 1:05 pm
by iconnor
you may need to specify probesize= and or analyzeduration= in Source->Options. These correspond to the ffmpeg command line options. Google them. Try different values.

Re: H264 Stream Failure in ZoneMinder, Works in VLC

Posted: Wed May 15, 2024 8:48 am
by NewWatcher
Thanks for your feedback! So far I have been unsuccessful with a number of different values. I will post when I find a solution that works. Is there an easy way to check that Ffmpeg is working correctly with Zoneminder?

Re: H264 Stream Failure in ZoneMinder, Works in VLC

Posted: Fri May 17, 2024 3:27 pm
by denver_compdoc
I just had two cameras that suddenly showed black screens in the ZM monitor and a message saying unable to stream, but opened fine in VLC.

The two cams always worked before, and are set to Nodect mode with no Analysis. They are high-rez streams that are linked to low-rez streams from the same cam.

Anyway, on the General page, I had to enable Decoding to get them working.

As I said, they always worked before, so maybe an Ubuntu library was updated, and thats causing different behavior?

Re: H264 Stream Failure in ZoneMinder, Works in VLC

Posted: Thu May 23, 2024 1:06 pm
by iconnor
If not decoding then you cannot view them. So someone set that to off. It didn't do it by itself.