Errors in bluecherry.log since upgrade to 3.1.4

My servers are no longr recording video since the upgrade from 3.1.3.to 3.1.4 this morning. The /var/log/bluecherry.log file is filling with the following errors:

2024-10-09T13:30:27.932628+10:00 debian12-bluecherry bc-server[1455]: E(2/aid9813): Cannot start recording!
2024-10-09T13:30:37.932723+10:00 debian12-bluecherry bc-server[1455]: E(2/aid9813): Failed to init muxer for output file /var/lib/bluecherry/recordings/2024/10/09/000002/13-30-33.mp4: Invalid argument (-22)

The problem is related to the audio encoding used in the camera.

G.711A causes the above errors.

Changing to something else in the camera like PCM or AAC stops the above errors and allows the video recording to start, but the log starts showing new errors such as the following instead:

2024-10-09T13:37:42.221615+10:00 debian12-bluecherry bc-server[1455]: E(2/aid9813): failed to write snapshot frame
2024-10-09T13:37:42.221727+10:00 debian12-bluecherry bc-server[1455]: E(2/aid9813): Feeding snapshot decoder failed
2024-10-09T13:37:42.221844+10:00 debian12-bluecherry bc-server[1455]: E(2/aid9813): Failed to make snapshot
2024-10-09T13:37:52.192441+10:00 debian12-bluecherry bc-server[1455]: I(2/aid9813): Making a snapshot
2024-10-09T13:37:52.225460+10:00 debian12-bluecherry bc-server[1455]: E(2/aid9813): avcodec_send_frame: snapshot encoding failed: Invalid argument

The failed to make snapshot errors continue even when audio is disabled on the device in the bluecherry configuration.

Is there a recommended audio encoding and sampling rate that bluecherry will support?

Hi @brett.gamlin !
Sorry for the issues, but thank you for writing about this.

The failures to make snapshots is a problem we already have a fix which will be released soon: Fix video snapshots saving by andrey-utkin · Pull Request #702 · bluecherrydvr/bluecherry-apps · GitHub

Changing camera settings to produce AAC is a good solution which is supported.

At the moment indeed G.711A cameras with enabled audio cause Bluecherry to fail to save the recordings. This is a problem we are aware of and intend to address in near future. Specifically, G.711 can’t be saved into MP4 file, and we don’t currently reencode audio.

Hi @autkin,

Thanks for the explanation. Looking forward to the snapshot fix being released soon. I will also change my cameras which are recording audio to use AAC for the moment.

I’m just curious now as to why V3 changed the video format to mp4 from the mkv format used in V2 which seems to have no problems recording the G.711A codec.

Regards, Brett.