Error writing packet: Invalid argument

Current Development version likely to have breaking changes
Post Reply
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Error writing packet: Invalid argument

Post by Simpler »

Running 1.37.47 (latest commit) and I keep seeing the following error message repeated in my logs:

Code: Select all

2023/11/29 - 18:14:22	zmc_m6	458760	ERR	Error writing packet: Invalid argument	zm_videostore.cpp	1427

I saw the previous posts about this issue. One was on an earlier version.
viewtopic.php?p=131788&hilit=Error+writ ... nt#p131788

And the other said the system couldn't keep up.
viewtopic.php?p=132484&hilit=Error+writ ... nt#p132484
Neither the CPU nor the RAM is maxed out when this occurs. I currently only have two cameras capturing.

Any suggestions on things to try to alleviate this?
dougmccrary
Posts: 1322
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Error writing packet: Invalid argument

Post by dougmccrary »

Maybe your storage is slow? I have 21 cameras, but at low frame rates and mostly 640 x 360 res.
I don't see that problem. I have Ubuntu OS on SSD and recordings going to HDD. I've added a second HDD for added history, but maybe in your case a second one would decrease load, if storage is the problem.
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Re: Error writing packet: Invalid argument

Post by Simpler »

Hi Doug,

Thanks for the reply. My OS is on an HDD, but my images and recordings are on an SSD.

Here are the write speeds of these disks:

Code: Select all

/tmp$ sync; dd if=/dev/zero of=tempfile bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.444337 s, 2.4 GB/s

Code: Select all

/data# sync; dd if=/dev/zero of=tempfile bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.483123 s, 2.2 GB/s
2GB/s seems pretty fast for both.
My 2 cameras are both 640x480 with Analysis FPS set to 9.00
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Error writing packet: Invalid argument

Post by iconnor »

Are you recording audio? Most often I've seen this with strange audio streams.

The gist of the error is that ffmpeg is saying it didn't like the packet it was given. Maybe timestamps were invalid, or something. Would need debug level 3 to see what the packet looked like.
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Re: Error writing packet: Invalid argument

Post by Simpler »

No audio. I'll kick up the debug and see what I get.

Thanks
dougmccrary
Posts: 1322
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Error writing packet: Invalid argument

Post by dougmccrary »

You might also think about getting the OS and database on SSD. I had some problems with my setups until I did that.
(That's mostly a simple way to get the database on SSD.)
Cheap 240GB sata ssds do nicely for me.
Simpler
Posts: 76
Joined: Mon Nov 02, 2015 12:40 am

Re: Error writing packet: Invalid argument

Post by Simpler »

Database is on the same ssd as the images.

Thanks for the suggestions
dougmccrary
Posts: 1322
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Error writing packet: Invalid argument

Post by dougmccrary »

Ah. OK then...
Post Reply