H264 Stream Failure in ZoneMinder, Works in VLC

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
NewWatcher
Posts: 2
Joined: Mon May 13, 2024 10:53 am

H264 Stream Failure in ZoneMinder, Works in VLC

Post 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!
User avatar
iconnor
Posts: 2926
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: H264 Stream Failure in ZoneMinder, Works in VLC

Post 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.
NewWatcher
Posts: 2
Joined: Mon May 13, 2024 10:53 am

Re: H264 Stream Failure in ZoneMinder, Works in VLC

Post 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?
denver_compdoc
Posts: 8
Joined: Sun Jun 14, 2015 3:32 pm

Re: H264 Stream Failure in ZoneMinder, Works in VLC

Post 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?
elandclothe
Posts: 1
Joined: Tue Apr 16, 2024 8:46 am

Re: H264 Stream Failure in ZoneMinder, Works in VLC

Post by elandclothe »

Thank you for sharing diverse sources of information. Easy to access and refer to.
User avatar
iconnor
Posts: 2926
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: H264 Stream Failure in ZoneMinder, Works in VLC

Post by iconnor »

If not decoding then you cannot view them. So someone set that to off. It didn't do it by itself.
Post Reply