No live video...

Forum for questions and support relating to the 1.24.x releases only.
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

No live video...

Post by timf »

for IP or local cameras but can see still jpegs in the events / frames. So seems the video is getting to ZM but is not being streamed.

Can't seem to find the generate video option for the event either.

FFMPEG is installed - but tried it without, still no go.

I see this error message for apache, but other logs are empty.

[Sun Dec 28 13:18:10 2008] [error] [client 192.168.1.10] array (\n 0 => \n array (\n 'file' => '/var/www/html/zm/ajax/stream.php',\n 'line' => 47,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto() failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/var/www/html/zm/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/var/www/html/zm/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.245/html/zm/index.php? ... 1=1&page=1

Also when I click on the name of the source instead of live video I get a list of events. Clicking on an event just brings up a blank frame but with the video controls above it.

The only .sock file I can find is zmdc.sock and is located in /tmp. It appears to be empty.

Any suggestions ?

This is on Ubuntu 8.10 with latest ZM.

Thanks Tim
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

ffmpeg problem....

Post by timf »

during configure I notice I get these results - none the less everything builds and installs ok - just no streaming video.

Could I be installing ffmpeg incorrectly ?

root@dualp4:~# svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
root@dualp4:~# mv ffmpeg /usr/local
root@dualp4:~# cd /usr/local/ffmpeg
root@dualp4:~# ./configure --enable-gpl --enable-swscale --enable-shared --enable-pthreads
root@dualp4:~# make
root@dualp4:~# make install
root@dualp4:~# make install-libs


libavutil/avutil.h usability... yes
checking libavutil/avutil.h presence... yes
checking for libavutil/avutil.h... yes
checking ffmpeg/avutil.h usability... no
checking ffmpeg/avutil.h presence... no
checking for ffmpeg/avutil.h... no
checking libavcodec/avcodec.h usability... yes
checking libavcodec/avcodec.h presence... yes
checking for libavcodec/avcodec.h... yes
checking ffmpeg/avcodec.h usability... no
checking ffmpeg/avcodec.h presence... no
checking for ffmpeg/avcodec.h... no
checking libavformat/avformat.h usability... yes
checking libavformat/avformat.h presence... yes
checking for libavformat/avformat.h... yes
checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... no
checking for ffmpeg/avformat.h... no
checking libswscale/swscale.h usability... yes
checking libswscale/swscale.h presence... yes
checking for libswscale/swscale.h... yes
checking ffmpeg/swscale.h usability... no
checking ffmpeg/swscale.h presence... no
checking for ffmpeg/swscale.h... no
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

According to what Cordel wrote in post about a month back -

A working config for ffmpeg is --enable-shared --enable-swscaler --enable-pthreads --enable-gpl

If you have cambazola installed, try removing it and see what happens.

Hope it helps.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Re: No live video...

Post by cordel »

timf wrote: [Sun Dec 28 13:18:10 2008] [error] [client 192.168.1.10] array (\n 0 => \n array (\n 'file' => '/var/www/html/zm/ajax/stream.php',\n 'line' => 47,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto() failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/var/www/html/zm/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/var/www/html/zm/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.245/html/zm/index.php? ... =1&page=1e]
:!: I'm taking a guess here but I think for one reason or another Apache don't seem to have permission to either enter the directory to create the sock file or just don't have privileges to create the file in that directory.

Might try to create a file in the configured directory as your apache user and see if you can. Check where your config is set to put sockets in options under the paths tab for ZM_PATH_SOCKS.

I know that in RH EL5 that apache is allowed to write to /tmp. Debian based distros these maybe configured different.

This error has nothing to do with ffmpeg and is a php function.
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

Me thinks you're onto something....

Post by timf »

Cordel,

I had noticed a zx_xxxx.sock file which had been created but was empty - so I'll check into that further as you suggest.

Nuck,

I don't presently have Cambolza installed, but when I did - it didn't work either, like for the same reason.

Again I'll check and report back later.

Thanks guys.

Tim
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

/tmp/zmdc.sock - permissions ?

Post by timf »

So I suspect I have a socket permissions problems with apache.
zmdc.sock is being created in /tmp but has 0bytes is owned by www-data who has rw permissions.
group www-data has read only as do others.

could this be the problem ?

Tim
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

Tim - I just checked my /tmp/zmdc.sock and here's what I'm seeing -

srwxr-xr-x 1 apache apache 0 2008-12-31 21:19 zmdc.sock
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Actually sock files are usually 0 bytes. information is only briefly placed here.
ZM and Apache run as the same user and group?
I
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

update...

Post by timf »

just did a fresh install and got the same problem - at least I'm consistent.

Still seeing this error in the apache log file:

[Fri Jan 02 12:13:43 2009] [error] [client 192.168.1.10] socket_sendto() failed: No such file or directory, referer: http://192.168.1.245/html/zm/index.php?view=watch&mid=1

[Fri Jan 02 12:13:43 2009] [error] [client 192.168.1.10] array (\n 0 => \n array (\n 'file' => '/var/www/html/zm/ajax/stream.php',\n 'line' => 47,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto() failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/var/www/html/zm/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/var/www/html/zm/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.245/html/zm/index.php?view=watch&mid=1


and the permissions for /tmp/zmdc.sock are:

srwxr-xr-x 1 www-data www-data 0 2009-01-02 12:14 /tmp/zmdc.sock

ie the same as nuck's

As for ZM and Apache being run as same user and group, ZM is owned by www-data and Apache is owned by root.

The only users on the system are root (obviously) and tim (me) everything was installed under sudo -s while logged in as tim.

Not sure what I should do here ?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Might try to either switch apache to www-data or :shock: setting ZM to run as root. For lots of reasons the latter is not preferred. Since ZM relies on Apache web server to send you video and well everything else they have to share access to the binaries and files etc.
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

I'm seeing a very similar error in my apache log that Tim is. And yet it appears at least on the surface that (in my case) is working fine.

[Sat Jan 03 02:58:25 2009] [notice] Apache/2.2.8 (Unix) DAV/2 PHP/5.2.5 configured -- resuming normal operations
[Sat Jan 03 02:59:25 2009] [error] [client 127.0.0.1] socket_sendto() failed: No such file or directory, referer: http://localhost/zm/index.php?view=montage&group=0
[Sat Jan 03 02:59:25 2009] [error] [client 127.0.0.1] array (\n 0 => \n array (\n 'file' => '/var/www/htdocs/zm/ajax/stream.php',\n 'line' => 47,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto() failed: No such file or directory',\n ),\n ),\n 1 => \n array (\n 'file' => '/var/www/htdocs/zm/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/var/www/htdocs/zm/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://localhost/zm/index.php?view=montage&group=0
[Sat Jan 03 03:02:55 2009] [notice] caught SIGTERM, shutting down

The log files are being generated although I have no clue as to how complete they may be.

What I am seeing in /tmp/zmdc.log that is somewhat confusing is -

no connection to syslog available
- /dev/log is not a socket
- stream /dev/conslog is not writable
- console is not writable at /usr/lib/perl5/site_perl/5.8.8/ZoneMinder/Debug.pm line 322
01/03/09 03:02:59.993283 zmdc[2747].INF ['zmfilter.pl ' crashed, signal 14]

:?

Cordel - As a side note, my issue with cambzola was resolved with an apache restart. No need to include the com directory afterall.
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

Found the root cause - excuse the pun :-)

Post by timf »

the error was being caused by nph-zms and zms not being in the location Apache expected to find them.
Hence the error and no streaming video.

Now I have streaming video, I find that after about 1/2 to 1 hour Apache will crash with no error messages - ZM continues to run though.

I suspect sendmail is causing issues and will investigate.

Thanks for all your help and encouragement to date.

I'm keeping a record of what I've had to do so far - maybe in time it'll help others.....
foxtroop11
Posts: 41
Joined: Thu Jan 01, 2009 8:11 am

Post by foxtroop11 »

I have the same error in my apache error logs you speak of. Everything appears to be running just fine now for almost 2 days straight, minus one strange moment where I couldn't get access to the zm directory on my server. You mention two files not being where apache expected them to be, what did you mean by that? Just trying to dial in and test this 1.24.
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

File locations

Post by timf »

Foxtroop11

To stream video Apache for looking for zms and nph-zms in /usr/lib/cgi-bin.
Whereas ZM had them in /var/www/cgi-bin.

I now have the problem that after about 10 minutes of streaming video Apache crashes.

I've increased MaxClients to 256 as recommended elsewhere - but still no success.

Apache only seems to crash when streaming.
foxtroop11
Posts: 41
Joined: Thu Jan 01, 2009 8:11 am

Post by foxtroop11 »

I wondered why I saw an error in my apache logs saying something about max clients reached, but I've yet to see apache actually crash. The only thing I've had so far is the inability to get to my zm directory for a brief moment or so, but other aspects of my web server would pull up. I've left a live feed in for about 25 minutes watching it with my browser on the same machine zoneminder is on and didn't see anything crash.

When I compiled Zoneminder I did tell it to usr /usr/lib/cgi-bin, anything wrong with that or any reason to tell it /var/www/cgi-bin? I know you can tell apache otherwise in the sites-enabled/default, but I have a bunch of other things running on my web server and didn't want to disrupt anything else.
Locked