zms crashs when trying to stream mpeg, zms documentation

Forum for questions and support relating to the 1.26.x releases only.
Locked
ghieber
Posts: 2
Joined: Tue Feb 04, 2014 10:38 pm

zms crashs when trying to stream mpeg, zms documentation

Post by ghieber »

intro:
I am setting up a system that allows me to watch Zoneminder's monitors on my TV's, which can act as UpnP/DLNA clients. I grab the zms output stream with Mediatomb which sends it to the TV's.

I have a (crappy) setup that transcodes the mjpeg output of zms into mp4 and muxes it into an avi container. zms should be able to do the coding and packaging itself as it is using the ffmpeg libraries. I would for several reasons prefer to have zoneminer directly produce a format that's recognized by the TV's.

configuration Zoneminder 1.26.5 compiled with ffmpeg 2.0.2, running on CentOS 6.5

observations

opening the zms - stream with VLC using the URL

<myserver>/cgi-bin/nph-zms?mode=jpeg&monitor=1&maxfps=25&size=100&buffer=1000

works, that's streaming mjpeg. If I change the parameters passed to zms to mode=mpeg and format mpeg or junk (defaulting to mpeg), nothing happens, and the log shows the following backtrace:

Code: Select all

Feb  4 13:23:36 rita1 zms[19811]: WAR [Could not deduce output format from file extension: using mpeg]
Feb  4 13:23:36 rita1 zms[19811]: PNC [Could not open codec]
Feb  4 13:23:36 rita1 zms[19811]: ERR [Got signal 6 (Aborted), crashing]
Feb  4 13:23:36 rita1 zms[19811]: ERR [Signal address is 0x3000004d63, from 0x3e40e32925]
Feb  4 13:23:36 rita1 zms[19811]: ERR [Backtrace 0: /var/www/cgi-bin/nph-zms() [0x475f6a]]
Feb  4 13:23:37 rita1 zms[19811]: ERR [Backtrace 1: /lib64/libpthread.so.0() [0x3e4120f710]]
Feb  4 13:23:37 rita1 zms[19811]: ERR [Backtrace 2: /lib64/libc.so.6(gsignal+0x35) [0x3e40e32925]]
Feb  4 13:23:37 rita1 zms[19811]: ERR [Backtrace 3: /lib64/libc.so.6(abort+0x175) [0x3e40e34105]]
Feb  4 13:23:37 rita1 zms[19811]: ERR [Backtrace 4: /var/www/cgi-bin/nph-zms() [0x4156cc]]
Feb  4 13:23:37 rita1 zms[19811]: ERR [Backtrace 5: /var/www/cgi-bin/nph-zms() [0x456719]]
Feb  4 13:23:37 rita1 zms[19811]: ERR [Backtrace 6: /var/www/cgi-bin/nph-zms() [0x450e94]]
Feb  4 13:23:37 rita1 zms[19811]: ERR [Backtrace 7: /var/www/cgi-bin/nph-zms() [0x4521ad]]
Feb  4 13:23:37 rita1 zms[19811]: ERR [Backtrace 8: /var/www/cgi-bin/nph-zms() [0x40787d]]
Feb  4 13:23:37 rita1 zms[19811]: ERR [Backtrace 9: /lib64/libc.so.6(__libc_start_main+0xfd) [0x3e40e1ed1d]]
Feb  4 13:23:37 rita1 zms[19811]: ERR [Backtrace 10: /var/www/cgi-bin/nph-zms() [0x406839]]
Feb  4 13:23:37 rita1 zms[19811]: INF [Backtrace complete, please execute the following command for more information]
Feb  4 13:23:37 rita1 zms[19811]: INF [addr2line -e /var/www/cgi-bin/nph-zms 0x475f6a 0x3e4120f710 0x3e40e32925 0x3e40e34105 0x4156cc 0x456719 0x450e94 0x4521ad 0x40787d 0x3e40e1ed1d 0x406839]
in case the format is another one recognised by ffmgeg, for example mp4, mpegts or 3gp it looks more like

Code: Select all

Feb  5 23:23:25 rita1 zms[30867]: ERR [Got signal 11 (Segmentation fault), crashing]
Feb  5 23:23:25 rita1 zms[30867]: ERR [Signal address is 0xa0, from 0x30cae3de76]
Feb  5 23:23:25 rita1 zms[30867]: ERR [Backtrace 0: /var/www/cgi-bin/nph-zms() [0x475f6a]]
Feb  5 23:23:25 rita1 zms[30867]: ERR [Backtrace 1: /lib64/libpthread.so.0() [0x3e4120f710]]
Feb  5 23:23:25 rita1 zms[30867]: ERR [Backtrace 2: /usr/lib64/libavformat.so.55(avio_write+0x16) [0x30cae3de76]]
Feb  5 23:23:25 rita1 zms[30867]: ERR [Backtrace 3: /usr/lib64/libavformat.so.55() [0x30cae327a0]]
Feb  5 23:23:25 rita1 zms[30867]: ERR [Backtrace 4: /usr/lib64/libavformat.so.55() [0x30cae33735]]
Feb  5 23:23:25 rita1 zms[30867]: ERR [Backtrace 5: /usr/lib64/libavformat.so.55(avformat_write_header+0x551) [0x30caea1b31]]
Feb  5 23:23:25 rita1 zms[30867]: ERR [Backtrace 6: /var/www/cgi-bin/nph-zms() [0x4564d5]]
Feb  5 23:23:26 rita1 zms[30867]: ERR [Backtrace 7: /var/www/cgi-bin/nph-zms() [0x456b5b]]
Feb  5 23:23:26 rita1 zms[30867]: ERR [Backtrace 8: /var/www/cgi-bin/nph-zms() [0x450e24]]
Feb  5 23:23:26 rita1 zms[30867]: ERR [Backtrace 9: /var/www/cgi-bin/nph-zms() [0x4521ad]]
Feb  5 23:23:26 rita1 zms[30867]: ERR [Backtrace 10: /var/www/cgi-bin/nph-zms() [0x40787d]]
Feb  5 23:23:26 rita1 zms[30867]: ERR [Backtrace 11: /lib64/libc.so.6(__libc_start_main+0xfd) [0x3e40e1ed1d]]
Feb  5 23:23:26 rita1 zms[30867]: ERR [Backtrace 12: /var/www/cgi-bin/nph-zms() [0x406839]]
Feb  5 23:23:26 rita1 zms[30867]: INF [Backtrace complete, please execute the following command for more information]
Feb  5 23:23:26 rita1 zms[30867]: INF [addr2line -e /var/www/cgi-bin/nph-zms 0x475f6a 0x3e4120f710 0x30cae3de76 0x30cae327a0 0x30cae33735 0x30caea1b31 0x4564d5 0x456b5b 0x450e24 0x4521ad 0x40787d 0x3e40e1ed1d 0x406839]
varying a bit in detail, but basically the same. The addr2line command yields nothing, apparently I compiled ZM without debug information, not anticipating such an amount of brown, smelly stuff. I will do that as next step if I don't get feedback

One suspicion I have is some sort of incompatibility of ZM with the rather new version of the ffmpeg libraries I compiled it against.

Any hit about what is going wron is appreciated.

----------------------------------------------------

Unfortunately, there is no documentation about zms' parameters, what I found out so far comes from logs, source code, several google'd web sites etc. Should I have missed something - RTFM in that context would be more then welcome, as long as it's accompanied by a hint where to find the FM. What I found out so far, are the following options:

mode=[mpeg|jpeg|raw|zip|single]. defaults to jpeg if nothing is entered, and to mpeg if junk is entered
format=[asf|swf|flv|mp4|mov|3gp|avi|mpegts|...*] is passed to zm_mpeg. only relevant in mpeg. defaults to mpeg.
seems to accept every format that ffmpeg would accept.

monitor=n the monitor number as in zm's web interface
source=[event|*] if source =event an event will be replayed, otherwise the live stream
time= ??? replaying can either be startet specifying monitor ID and time
event= or eventID, used if source=event to specify which one is replayed
scale=x picture size scale factor in%, defaults to 100
rate=n the actual frame rate
maxfps=n maximal frame rate
frame= n replaying starts at the nth frame of an event
bitrate=x no detectable influence. only relevant in mpeg
ttl=n don't know
replay=[gapless, all]
connkey=x is used by streams through the web interface, don't know what it is
buffer=n no visible effect.
auth, user, pass used when authentication is used.

examples (/work with VLC and ffplay):
<myserver>/cgi-bin/nph-zms?mode=jpeg&monitor=1&maxfps=25&size=100&buffer=1000
streams mjpeg
<myserver>/cgi-bin/nph-zms?mode=mpeg&monitor=1&maxfps=25&format=mp4&scale=100
should stream mp4 in an mp4 container, but in my case crashs zms
a_aguas
Posts: 16
Joined: Tue Jan 07, 2014 12:15 pm

Re: zms crashs when trying to stream mpeg, zms documentation

Post by a_aguas »

Any news?

I'm with the same problem, it seems that zoneminder can't stream mpeg...

:?
Locked