Issues viewing and recording

Hi all,

I am doing a test run of BC 3.1.13 but some issues are popping up.

I am running a mix of Hikvision and TP-Link cameras.

For recording the Hikvision works fine but I am unable to get the TP-Links to record. I think this might be related to audio stream but I cannot find an option on BC to turn off audio and I do not want to turn it off for security reasons on the camera. Codec is G711A-law.

Then I am also having issues with the live view. It initially worked fine with just one Hikvision added but as soon as I added more cameras, I just get a blank screen with the spinning icon. When I logged in this morning, all three testers were working fine. When I added another camera, it fails to show live view for any camera again.

Liking the ease of use so far but recording and live view are too important. Any help would be appreciated

Thanks,

Server logs:

2025-08-15T07:57:08.280987+00:00 bluecherry bc-server[22418]: I(4/Office_Parking): Last message repeated 488 times!
2025-08-15T07:57:08.281229+00:00 bluecherry bc-server[22418]: I(4/Office_Parking): Motion detected
2025-08-15T07:57:08.341939+00:00 bluecherry bc-server[22418]: E(4/Office_Parking): Can not lock pthread mutex: Success
2025-08-15T07:57:09.912523+00:00 bluecherry bc-server[22418]: I(5/Lazer-Cabinet): Last message repeated 233 times!
2025-08-15T07:57:09.912639+00:00 bluecherry bc-server[22418]: I(5/Lazer-Cabinet): Audio stream configured: pcm_alaw, 8000 Hz, 1 channels
2025-08-15T07:57:09.912695+00:00 bluecherry bc-server[22418]: E(5/Lazer-Cabinet): Failed to init muxer for output file /var/lib/bluecherry/recordings/2025/08/15/000005/07-56-59-motion.mp4: Invalid argument (-22)
2025-08-15T07:57:09.912731+00:00 bluecherry bc-server[22418]: E(5/Lazer-Cabinet): Cannot start recording!
2025-08-15T07:57:09.942530+00:00 bluecherry bc-server[22418]: E(5/Lazer-Cabinet): Can not lock pthread mutex: Success
2025-08-15T07:57:14.942044+00:00 bluecherry bc-server[22418]: I(4/Office_Parking): Last message repeated 803 times!
2025-08-15T07:57:14.942157+00:00 bluecherry bc-server[22418]: I(4/Office_Parking): Audio stream configured: pcm_alaw, 8000 Hz, 1 channels
2025-08-15T07:57:14.942190+00:00 bluecherry bc-server[22418]: E(4/Office_Parking): Failed to init muxer for output file /var/lib/bluecherry/recordings/2025/08/15/000004/07-57-11-motion.mp4: Invalid argument (-22)
2025-08-15T07:57:14.942220+00:00 bluecherry bc-server[22418]: E(4/Office_Parking): Cannot start recording!
2025-08-15T07:57:14.954820+00:00 bluecherry bc-server[22418]: E(4/Office_Parking): Can not lock pthread mutex: Success
2025-08-15T07:57:16.607937+00:00 bluecherry bc-server[22418]: I(): Last message repeated 1 times!

WWW logs:

#8 /usr/share/bluecherry/www/index.php(16): Route->start()
#9 {main}
thrown in /usr/share/bluecherry/www/lib/lib.php on line 235" while reading response header from upstream, client: (redacted IP), server: , request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/login”
2025/08/15 07:06:15 [error] 367#367: *606 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “layouts” in /usr/share/bluecherry/www/template/main_viewer.php on line 16” while reading response header from upstream, client: (redacted IP), server: , request: “GET /liveview HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/”
2025/08/15 07:12:42 [error] 368#368: *956 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “G_VAAPI_DEVICE” in /usr/share/bluecherry/www/ajax/update.php on line 103” while reading response header from upstream, client: (redacted IP), server: , request: “POST /ajax/update.php HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/deviceschedule”
2025/08/15 07:14:44 [error] 368#368: *956 FastCGI sent in stderr: “PHP message: PHP Warning: Trying to access array offset on null in /usr/share/bluecherry/www/ajax/deviceschedule.php on line 33; PHP message: PHP Warning: Trying to access array offset on null in /usr/share/bluecherry/www/ajax/deviceschedule.php on line 33” while reading response header from upstream, client: (redacted IP), server: , request: “GET /ajax/deviceschedule.php?id=4&type=ajax_content HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/devices”
2025/08/15 07:14:57 [error] 368#368: *956 FastCGI sent in stderr: “PHP message: PHP Warning: Trying to access array offset on null in /usr/share/bluecherry/www/ajax/deviceschedule.php on line 33; PHP message: PHP Warning: Trying to access array offset on null in /usr/share/bluecherry/www/ajax/deviceschedule.php on line 33” while reading response header from upstream, client: (redacted IP), server: , request: “GET /ajax/deviceschedule.php?id=1&type=ajax_content HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/devices”
2025/08/15 07:15:07 [error] 368#368: *956 FastCGI sent in stderr: “PHP message: PHP Warning: Trying to access array offset on null in /usr/share/bluecherry/www/ajax/deviceschedule.php on line 33; PHP message: PHP Warning: Trying to access array offset on null in /usr/share/bluecherry/www/ajax/deviceschedule.php on line 33” while reading response header from upstream, client: (redacted IP), server: , request: “GET /ajax/deviceschedule.php?id=3&type=ajax_content HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/devices”
2025/08/15 07:36:17 [error] 368#368: *1365 FastCGI sent in stderr: “PHP message: PHP Warning: Trying to access array offset on false in /usr/share/bluecherry/www/lib/lib.php on line 861; PHP message: PHP Warning: Trying to access array offset on null in /usr/share/bluecherry/www/lib/lib.php on line 861” while reading response header from upstream, client: (redacted IP), server: , request: “POST /addip HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/addip”
2025/08/15 07:36:38 [error] 368#368: *1364 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “query” in /usr/share/bluecherry/www/ajax/addip.php on line 102” while reading response header from upstream, client: (redacted IP), server: , request: “POST /addip/check-onvif-port HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/ajax/editip.php?id=5”
2025/08/15 07:36:55 [error] 368#368: *1365 FastCGI sent in stderr: “PHP message: PHP Warning: Trying to access array offset on false in /usr/share/bluecherry/www/lib/lib.php on line 861; PHP message: PHP Warning: Trying to access array offset on null in /usr/share/bluecherry/www/lib/lib.php on line 861” while reading response header from upstream, client: (redacted IP), server: , request: “POST /ajax/editip.php HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/ajax/editip.php?id=5”
2025/08/15 07:37:13 [error] 367#367: *1442 connect() failed (111: Connection refused) while connecting to upstream, client: (redacted IP), server: , request: “GET /hls/5/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe HTTP/1.1”, upstream: “http ://127.0.0.1:7003/hls/5/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/liveview”
2025/08/15 07:37:14 [error] 367#367: *1442 connect() failed (111: Connection refused) while connecting to upstream, client: (redacted IP), server: , request: “GET /hls/5/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe HTTP/1.1”, upstream: “http ://127.0.0.1:7003/hls/5/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/liveview”
2025/08/15 07:37:29 [error] 368#368: *1364 connect() failed (111: Connection refused) while connecting to upstream, client: (redacted IP), server: , request: “GET /hls/1/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe HTTP/1.1”, upstream: “http ://127.0.0.1:7003/hls/1/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/liveview”
2025/08/15 07:37:30 [error] 368#368: *1364 connect() failed (111: Connection refused) while connecting to upstream, client: (redacted IP), server: , request: “GET /hls/1/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe HTTP/1.1”, upstream: “http ://127.0.0.1:7003/hls/1/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/liveview”
2025/08/15 07:43:44 [error] 367#367: *1499 FastCGI sent in stderr: “PHP message: PHP Warning: Trying to access array offset on null in /usr/share/bluecherry/www/ajax/deviceschedule.php on line 33; PHP message: PHP Warning: Trying to access array offset on null in /usr/share/bluecherry/www/ajax/deviceschedule.php on line 33” while reading response header from upstream, client: (redacted IP), server: , request: “GET /ajax/deviceschedule.php?id=1&type=ajax_content HTTP/1.1”, upstream: “fastcgi://unix:/etc/alternatives/php-fpm.sock:”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/devices”
2025/08/15 07:46:12 [error] 368#368: *1624 connect() failed (111: Connection refused) while connecting to upstream, client: (redacted IP), server: , request: “GET /hls/5/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe HTTP/1.1”, upstream: “http ://127.0.0.1:7003/hls/5/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/liveview”
2025/08/15 07:46:13 [error] 368#368: *1624 connect() failed (111: Connection refused) while connecting to upstream, client: (redacted IP), server: , request: “GET /hls/5/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe HTTP/1.1”, upstream: “http ://127.0.0.1:7003/hls/5/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/liveview”
2025/08/15 07:54:06 [error] 368#368: *1826 connect() failed (111: Connection refused) while connecting to upstream, client: (redacted IP), server: , request: “GET /hls/1/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe HTTP/1.1”, upstream: “http ://127.0.0.1:7003/hls/1/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/liveview”
2025/08/15 07:54:07 [error] 368#368: *1826 connect() failed (111: Connection refused) while connecting to upstream, client: (redacted IP), server: , request: “GET /hls/1/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe HTTP/1.1”, upstream: “http ://127.0.0.1:7003/hls/1/0/playlist.m3u8?authtoken=bocggjh2bfkvv6tq372cfjldbe”, host: “192.168.100.3:7001”, referrer: “https ://192.168.100.3:7001/liveview”

I had a comparable issue with some chinese IP cameras. The camera would not record when I had G711A Codec selected in the camera. That specific camera did not have AAC, it only had G711 and G711A. I could not get the camera to work unless I turned off audio at the camera or selected the G711 codec. I get regular logging errors with the G711 codec, however recording worked after selecting that codec.

If I try to switch back to the G711A, recording stops so for me it is a repeatable issue.

This would be potentially applicable to your Lazer Cabinet camera for the “Stopped Recording” and “Failed to init muxer for output file /var/lib/bluecherry/recordings…” errors.

I just tried turning it off on the camera but apparently that just mutes the audio, I can still see the audio channel in the stream.

Video: MPEG4 Video (H264) 1920x1080 10fps [V: h264 high L4.0, yuv420p, 1920x1080]
Audio: aLaw 8000Hz mono 64kbps [A: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s]

I do see this in the announcements though but it doesn’t seem to work.

  • Expanded Audio Codec Support. Bluecherry now supports a wider range of audio codecs, including:

    • G.711 (ÎĽ-law and A-law)
    • AAC
    • PCM
    • G.726
    • Opus

This ensures better compatibility with a variety of IP cameras and audio sources.

  • Smarter Handling of Audio Codec Issues:

Instead of showing “error writing to recording” when an audio codec problem is detected, Bluecherry will now automatically ignore problematic audio codecs and continue recording video. This results in fewer interruptions and cleaner logs.

Sorry to hear. For me, disabling audio on my camera stops the encoding and clears the issue in bluecherry. I saw the same notice but for me G.711A prevents bluecherry from working with that camera. Selecting G.711 works for me.

I’m out of suggestions from my end. Good luck.

Which distribution are you using (Ubuntu 22.04, 24.04, etc)? Are you willing to test a development version?

Hi Curtis,

I am running Ubuntu 24.04.3 LTS

Development is fine, we are still in test phase anyway. I just need recording and live view to work.

Just tell me how to update to a dev version.

Regards,

Can you try this?

http://lizard.bluecherry.net/~curt/releases/3.1.14/1c4c91209a99747536e9787c653795696de323b1/noble/bluecherry_3.1.14_amd64.deb

Hi,

Just did that and it seems to be discarding the audio correctly now.

2025-08-18T16:04:53.710918+00:00 bluecherry bc-server[98130]: I(5/Lazer-Cabinet): Got bad dts=NOPTS on stream 0, passing to libavformat to handle
2025-08-18T16:05:16.815574+00:00 bluecherry bc-server[98130]: I(5/Lazer-Cabinet): Motion detected
2025-08-18T16:05:16.865815+00:00 bluecherry bc-server[98130]: W(5/Lazer-Cabinet): Discarding problematic audio stream: pcm_alaw with 1 channel (causes muxer initialization failure)
2025-08-18T16:05:16.865911+00:00 bluecherry bc-server[98130]: I(5/Lazer-Cabinet): Audio stream discarded due to compatibility issues, recording video only

I will update tomorrow when there are more motion captures stored.

Many thanks.

1 Like