Page 1 of 1

Can't get live stream working

Posted: Fri Dec 18, 2020 11:45 pm
by fasmike
I should have posted this in an new thread rather than burying it in the middle of someone else's. I've been fighting this for days. I have no live streaming, but I get still images.

There are a lot of "no live streaming" threads and I think I've read them all.

I "think" I've tried every fix and am still coming up empty. I guess it's possible I've tried the winning config changes along the way, but not in the right combination. I'm including what I believe are the relevant logs, configs and files below. Any hints would be GREAT!

I'm running ZoneMinder v1.34.22.
Ubuntu Server: VERSION="20.04.1 LTS (Focal Fossa)"
Annke C800 turret camera (now with Hikvision firmware)
source type: ffmpeg
function: Mcord
source is: rtsp://username:password@192.168.1.101:554/H264/ch1/main/av_stream

The above source works fine directly in vlc on a stand alone laptop. In other words, I can stream in vlc.

Here are my existing errors:
Screen Shot 2020-12-18 at 4.37.31 PM.png
Screen Shot 2020-12-18 at 4.37.31 PM.png (550.27 KiB) Viewed 7568 times
Here are the paths I've changed:
/etc/apache2/conf-enabled/zoneminder.conf

Code: Select all

# Remember to enable cgi mod (i.e. "a2enmod cgi").
#fas - original line commented out below.  Edited it and put it right below the original.
#ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
ScriptAlias /cgi-bin/ "/usr/lib/zoneminder/cgi-bin/"
<Directory "/usr/lib/zoneminder/cgi-bin">
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AllowOverride All
    Require all granted
</Directory>
/etc/zm/conf.d/01-system-paths.conf

Code: Select all

# ZoneMinder url path to the zms streaming server
#ZM_PATH_ZMS=/zm/cgi-bin/nph-zms #fas - original line changed to below
ZM_PATH_ZMS=/usr/lib/zoneminder/cgi-bin/nph-zms
Here's my directory listing for zms or nph-zms:

Code: Select all

fasmike@ksmbserver:/$ ls -altr /usr/lib/zoneminder/cgi-bin/
total 1868
-rwxr-xr-x 1 root root 1902184 Oct 19 12:22 zms
lrwxrwxrwx 1 root root       3 Oct 19 12:22 nph-zms -> zms
drwxr-xr-x 3 root root    4096 Dec 10 17:25 ..
drwxr-xr-x 2 root root    4096 Dec 10 17:25 .
fasmike@ksmbserver:/$ 

Re: Can't get live stream working

Posted: Sat Dec 19, 2020 12:10 am
by bbunge
Did you try the "source" with VLC? The program not the Zoneminder option. If it works with VLC, check VLC (Tools, Media Information, Codec) to check camera Display Resolution. Then use that resolution in Zoneminder.
Do not edit any config files unless you use NGINX!!!
Also, what install instructions did you use for Zoneminder? Web server and database?

Re: Can't get live stream working

Posted: Sun Dec 20, 2020 4:28 pm
by fasmike
Thank you so much for the response. I won't be able to get back to this until sometime on Monday. I'll check the items you suggested and post an update. Thanks again!

Re: Can't get live stream working

Posted: Wed Jun 02, 2021 3:31 am
by SBCDave
Did you have and luck with this

Re: Can't get live stream working

Posted: Tue Aug 03, 2021 11:19 pm
by SBCDave
Hi there. I have a similar issue and any help is appreciated.

All my cameras work except this one "6MP" Annke camera. And oddly, it worked when I first set it up, but it started just being a black screen that says "Unable to stream", and even odder all the recording are there I just can't access the stream live through zoneminder web portal, or through my ZM Ninja app, but I can watch the recordings in both.

In my VLC version 2.2.4, Tools > Media Information > Codec tab, I have

Type: Video
Codec: H264 - MPEG-4 AVC (part 10) (h264)
Resolution: 3840x2178
Display resolution: 3840x2160
Frame rate: 15
Decoded format: Planar 4:2:0 YUV full scale

I tried both these resolutions but still just "Unable to stream"

Anything stand out at an issue, or does anyone have any other troubleshooting tips?

Re: Can't get live stream working

Posted: Mon Aug 09, 2021 11:04 pm
by kitkat
SBCDave wrote: Tue Aug 03, 2021 11:19 pm Hi there. I have a similar issue and any help is appreciated.

All my cameras work except this one "6MP" Annke camera. And oddly, it worked when I first set it up, but it started just being a black screen that says "Unable to stream", and even odder all the recording are there I just can't access the stream live through zoneminder web portal, or through my ZM Ninja app, but I can watch the recordings in both.
I don't know if this is relevant or whether it will help to track things down, but it might.

On my system, ZM 1.36.5 on CentOS 7, the live and recorded views display the video in different ways - The recorded views use an HTML <video> tag but the real-time stream seems to be a continuously-updated JPEG image in an <img> tag.

Live stream:

Code: Select all

<img id="liveStream1" src="/cgi-bin-zm/nph-zms?scale=25&amp;mode=jpeg&amp;maxfps=30&amp;monitor=1&amp;auth=6e1b7837a981152a114f73d24419a154&amp;connkey=14671&amp;rand=67098" alt="" style="width: 487px; height: 274px;">
Recorded video:

Code: Select all

<video id="videoobj_html5_api" class="vjs-tech" style="transform: matrix(1, 0, 0, 1, 0, 0);" data-setup="{ &quot;controls&quot;: true, &quot;autoplay&quot;: true, &quot;preload&quot;: &quot;auto&quot;, &quot;playbackRates&quot;: [ 0,0.25,0.5,1,2,5,10,16], &quot;plugins&quot;: { &quot;zoomrotate&quot;: { &quot;zoom&quot;: &quot;1&quot;}}}" preload="auto" autoplay="" src="/zm/index.php?mode=mpeg&amp;format=h264&amp;eid=139994&amp;view=view_video&amp;auth=6e1b7837a981152a114f73d24419a154">
          <source src="/zm/index.php?mode=mpeg&amp;format=h264&amp;eid=139994&amp;view=view_video&amp;auth=6e1b7837a981152a114f73d24419a154" type="video/mp4">
I don't know why the image won't show for you, but this could be why you're seeing a difference between the live view and the recordings.

Re: Can't get live stream working

Posted: Thu Aug 12, 2021 12:32 am
by SBCDave
Thanks. I've been doing some digging and I found the same result. My zms logs (zms is the object used for live stream in the cgi directory of the path you showed and nph-zms is a symlink to the compiled zms binary) showed a floating point exception. Someone showed me how to set that objects debug level up to 3, and iconnor had asked for log level 3 data to troubleshoot. I got those logs and loaded them in the other thread and am hoping iconnor can help me figure out what's happening.