Repeated error message:

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
jogo
Posts: 46
Joined: Thu Aug 03, 2017 3:00 pm

Repeated error message:

Post by jogo »

I am getting repeatedly error messages related to a certain camera like

Code: Select all

Jul 06 13:15:05 <redacted> zmc_m4[2230]: ERR [zmc_m4] [Error writing packet: Invalid argument]
Jul 06 13:15:05 <redacted> zmc_m4[2230]: WAR [zmc_m4] [non increasing dts, fixing. our dts -4241066805 stream 0 last_dts 50175740]
Jul 06 13:15:05 <redacted> zmc_m4[2230]: WAR [zmc_m4] [pkt.dts(50175740) must be <= pkt.pts(-4241066805).Decompression must happen before presentation.]
I am not sure whether this is related to Zoneminder or the camera, which happens to be one of the more expensive Hanwha cameras. Other Hanwha cameras do not produce these messages (afaik).
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Repeated error message:

Post by Magic919 »

There was a similar sounding thread recently. Think it was the ffmpeg version behind it in the end.
-
Vit-Lucius
Posts: 1
Joined: Fri Sep 15, 2023 3:53 am

Re: Repeated error message:

Post by Vit-Lucius »

Good time of day.
I had exactly the same error with 4 cameras. The program version is 1.36.33.

Code: Select all

9/15/23, 11:48:21 AM GMT+8	zmc_m24		42622	ERR	Error writing packet: Invalid argument	zm_videostore.cpp	1425
9/15/23, 11:48:21 AM GMT+8	zmc_m40		42653	ERR	Error writing packet: Invalid argument	zm_videostore.cpp	1425
9/15/23, 11:48:20 AM GMT+8	zmc_m23		42775	ERR	Error writing packet: Invalid argument	zm_videostore.cpp	1425
9/15/23, 11:48:20 AM GMT+8	zmc_m23		42775	WAR	pkt.dts(35364600) must be <= pkt.pts(35363700).Decompression must happen before presentation.	zm_videostore.cpp	1409
9/15/23, 11:48:20 AM GMT+8	zmc_m23		42775	WAR	non increasing dts, fixing. our dts 35363700 stream 0 last_dts 35364600. reorder_queue_size=0	zm_videostore.cpp	1398
9/15/23, 11:48:17 AM GMT+8	zmc_m22		42628	ERR	Error writing packet: Invalid argument	zm_videostore.cpp	1425
OS Debian 12
ffmpeg version 5.1.3-1

IP Camera: IPC-HF3500
Encode Mode H.264
Resolution 3M (2048*1536)
Frame rate(FPS) 15
Bit Rate Type VBR
Quality 6(Best)

Bit Rate 8192
I Frame Interval 30
User avatar
iconnor
Posts: 2882
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Repeated error message:

Post by iconnor »

In ffmpeg 4.8+ we started seeing out of order packets coming from decoding. Problem is when writing out to mp4, they need to be in order. So we now need to buffer them and sort them.

You can set a parameter in Encoder options, reorder_queue_size= to turn on this buffering. Testing seems to indicated that for most people setting it to keyframe interval or 2*keyframe interval should do.

In 1.37 we automatically detect the need and size, but in 1.36 you have to set it manually.
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: Repeated error message:

Post by pat2 »

Hi Isaac,

thanks for your strong job.
Please, note that in the "proposed" repo 1.36.34 version is not available for jammy, focal, bionic, xenial.
Something went wrong in the build process.
thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
User avatar
iconnor
Posts: 2882
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Repeated error message:

Post by iconnor »

Ok, I have a few more fixes in there now, will push another release
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: Repeated error message:

Post by pat2 »

iconnor wrote: Mon Sep 18, 2023 1:54 pm Ok, I have a few more fixes in there now, will push another release
upgraded !
thanks
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
phuongpham
Posts: 3
Joined: Sun Apr 17, 2022 8:57 pm

Re: Repeated error message:

Post by phuongpham »

pat2 wrote: Fri Sep 15, 2023 4:01 pm Hi Isaac,

thanks for your strong job.
Please, note that in the "proposed" repo 1.36.34 version is not available for jammy, focal, bionic, xenial.
Something went wrong in the build process.
thanks

When will this fix be released?
dougmccrary
Posts: 1177
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Repeated error message:

Post by dougmccrary »

When will this fix be released?
ZoneMinder Proposed - Ubuntu Jammy 1.36.34~20231031.12-jammy1 2023-10-31 None

( from https://launchpad.net/~iconnor/+ppa-packages?batch=75 )
Post Reply