This is very similar to what i am seeing on my server. Thanks for sharing

Sometime in the future i'll probably also optimize AlarmedPixels, which currently is the major CPU consumer.
Code: Select all
ii libjpeg-dev 1:1.5.1-12 all Development files for the JPEG library [dummy package]
ii libjpeg-turbo-progs 1:1.5.1-12 armhf Programs for manipulating JPEG files
ii libjpeg-turbo-progs-dbg 1:1.5.1-12 armhf Programs for manipulating JPEG files (debugging symbols)
ii libjpeg62-turbo:armhf 1:1.5.1-12 armhf libjpeg-turbo JPEG runtime library
ii libjpeg62-turbo-dbg:armhf 1:1.5.1-12 armhf Debugging symbols for the libjpeg-turbo JPEG library
ii libjpeg62-turbo-dev:armhf 1:1.5.1-12 armhf Development files for the libjpeg-turbo JPEG library
ii libopenjpeg5:armhf 1:1.5.2-3 armhf JPEG 2000 image compression/decompression library - runtime
ii libturbojpeg1:armhf 1:1.5.1-12 armhf TurboJPEG runtime library - SIMD optimized
ii libturbojpeg1-dbg:armhf 1:1.5.1-12 armhf TurboJPEG runtime library - SIMD optimized (debugging symbols)
ii libturbojpeg1-dev:armhf 1:1.5.1-12 armhf Development files for the TurboJPEG library
Code: Select all
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libjpeg-dev
/usr/share/doc/libjpeg-dev/README-turbo.txt.gz
/usr/share/doc/libjpeg-dev/changelog.Debian.gz
/usr/share/doc/libjpeg-dev/changelog.gz
/usr/share/doc/libjpeg-dev/README.gz
/usr/share/doc/libjpeg-dev/structure.txt.gz
/usr/share/doc/libjpeg-dev/copyright
Code: Select all
/usr/lib
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabihf/pkgconfig
/usr/lib/arm-linux-gnueabihf/pkgconfig/libjpeg.pc
/usr/lib/arm-linux-gnueabihf/pkgconfig/libturbojpeg.pc
/usr/lib/arm-linux-gnueabihf/libjpeg.a
/usr/lib/arm-linux-gnueabihf/libjpeg.so
Code: Select all
export DEB_BUILD_MAINT_OPTIONS = hardening=+all -march=armv8-a -mfloat-abi=hard -mfpu=neon-fp-armv8 -funsafe-math-optimizations -ftree-vectorize -fPIC -O3
Code: Select all
// Try and get the codec from the codec context
if ( (mCodec = avcodec_find_decoder_by_name("h264_mmal")) == NULL )
if ( (mCodec = avcodec_find_decoder( mCodecContext->codec_id )) == NULL )
Fatal( "Can't find codec for video stream from %s", mPath.c_str() );
Code: Select all
ALTER TABLE Monitors modify column Type enum('Local','Remote','File','Ffmpeg','Ffmpeghw','Libvlc','cURL') NOT NULL default 'Local';
ALTER TABLE MonitorPresets modify column Type enum('Local','Remote','File','Ffmpeg','Ffmpeghw','Libvlc','cURL') NOT NULL default 'Local';
ALTER TABLE Controls modify column Type enum('Local','Remote','Ffmpeg','Ffmpeghw','Libvlc','cURL') NOT NULL default 'Local';
Code: Select all
7243 www-data 20 0 326940 198952 190580 R 93.2 22.5 3:38.14 zma
7336 www-data 20 0 227344 101316 93640 S 52.2 11.5 1:01.26 zmc 704x576 S/W decoder
6845 www-data 20 0 222672 94736 89780 S 40.3 10.7 2:23.14 zma
7354 www-data 20 0 224256 95436 89692 R 39.3 10.8 0:44.99 zma
7200 www-data 20 0 379968 218948 194928 S 30.7 24.8 1:26.79 zmc 1280x720 H/W decoder
6836 www-data 20 0 264432 105628 93768 S 15.9 12.0 1:00.62 zmc 704x576 H/W decoder
Code: Select all
8671 www-data 20 0 330544 200748 190524 R 93.6 22.7 3:21.86 zma 1280x720
9001 www-data 20 0 190724 65712 59612 R 32.1 7.4 1:08.82 zmc 640x360 S/W decoder
8662 www-data 20 0 380224 218724 194456 S 30.8 24.8 1:27.48 zmc 1280x720 H/W decoder
8932 www-data 20 0 188152 60012 55480 R 23.9 6.8 0:52.09 zma 640x360
9008 www-data 20 0 187264 59432 55680 S 23.6 6.7 0:47.76 zma 640x360
8923 www-data 20 0 225528 67572 59632 S 10.8 7.7 0:22.26 zmc 640x360 H/W decoder
Code: Select all
diff -Naur ../src-versions/src-orig/zm_ffmpeg_camera.cpp src/zm_ffmpeg_camera.cpp
--- ../src-versions/src-orig/zm_ffmpeg_camera.cpp 2017-05-14 22:01:18.765897796 +0000
+++ src/zm_ffmpeg_camera.cpp 2017-05-14 22:02:26.205693726 +0000
@@ -33,11 +33,12 @@
#include <pthread.h>
#endif
-FfmpegCamera::FfmpegCamera( int p_id, const std::string &p_path, const std::string &p_method, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture ) :
+FfmpegCamera::FfmpegCamera( int p_id, const std::string &p_path, const std::string &p_method, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture, int codec_type ) :
Camera( p_id, FFMPEG_SRC, p_width, p_height, p_colours, ZM_SUBPIX_ORDER_DEFAULT_FOR_COLOUR(p_colours), p_brightness, p_contrast, p_hue, p_colour, p_capture ),
mPath( p_path ),
mMethod( p_method ),
- mOptions( p_options )
+ mOptions( p_options ),
+ h264_codec(codec_type)
{
if ( capture )
{
@@ -312,9 +313,15 @@
mCodecContext = mFormatContext->streams[mVideoStreamId]->codec;
// Try and get the codec from the codec context
- if ( (mCodec = avcodec_find_decoder_by_name("h264_mmal")) == NULL )
- if ( (mCodec = avcodec_find_decoder( mCodecContext->codec_id )) == NULL )
- Fatal( "Can't find codec for video stream from %s", mPath.c_str() );
+ if (h264_codec) {
+ if ( (mCodec = avcodec_find_decoder_by_name("h264_mmal")) == NULL )
+ Fatal( "Can't find h/w codec for video stream from %s", mPath.c_str() );
+ }
+
+ if (!h264_codec) {
+ if ( (mCodec = avcodec_find_decoder( mCodecContext->codec_id )) == NULL )
+ Fatal( "Can't find s/w codec for video stream from %s", mPath.c_str() );
+ }
Debug ( 1, "Found decoder" );
diff -Naur ../src-versions/src-orig/zm_ffmpeg_camera.h src/zm_ffmpeg_camera.h
--- ../src-versions/src-orig/zm_ffmpeg_camera.h 2017-05-14 22:01:18.765897796 +0000
+++ src/zm_ffmpeg_camera.h 2017-05-14 22:02:26.205693726 +0000
@@ -57,6 +57,7 @@
bool mCanCapture;
int mOpenStart;
pthread_t mReopenThread;
+ int h264_codec;
#endif // HAVE_LIBAVFORMAT
#if HAVE_LIBSWSCALE
@@ -64,7 +65,7 @@
#endif
public:
- FfmpegCamera( int p_id, const std::string &path, const std::string &p_method, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture );
+ FfmpegCamera( int p_id, const std::string &path, const std::string &p_method, const std::string &p_options, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture, int codec_type );
~FfmpegCamera();
const std::string &Path() const { return( mPath ); }
diff -Naur ../src-versions/src-orig/zm_monitor.cpp src/zm_monitor.cpp
--- ../src-versions/src-orig/zm_monitor.cpp 2017-05-14 22:01:18.765897796 +0000
+++ src/zm_monitor.cpp 2017-05-14 22:02:26.285693484 +0000
@@ -2634,7 +2634,152 @@
contrast,
hue,
colour,
- purpose==CAPTURE
+ purpose==CAPTURE,
+ 0
+ );
+
+ monitors[i] = new Monitor(
+ id,
+ name,
+ server_id,
+ function,
+ enabled,
+ linked_monitors,
+ camera,
+ orientation,
+ deinterlacing,
+ event_prefix,
+ label_format,
+ Coord( label_x, label_y ),
+ label_size,
+ image_buffer_count,
+ warmup_count,
+ pre_event_count,
+ post_event_count,
+ stream_replay_buffer,
+ alarm_frame_count,
+ section_length,
+ frame_skip,
+ motion_frame_skip,
+ analysis_fps,
+ analysis_update_delay,
+ capture_delay,
+ alarm_capture_delay,
+ fps_report_interval,
+ ref_blend_perc,
+ alarm_ref_blend_perc,
+ track_motion,
+ embed_exif,
+ RGB_WHITE,
+ purpose,
+ 0,
+ 0
+ );
+ Zone **zones = 0;
+ int n_zones = Zone::Load( monitors[i], zones );
+ monitors[i]->AddZones( n_zones, zones );
+ monitors[i]->AddPrivacyBitmask( zones );
+ Debug( 1, "Loaded monitor %d(%s), %d zones", id, name, n_zones );
+ }
+ if ( mysql_errno( &dbconn ) )
+ {
+ Error( "Can't fetch row: %s", mysql_error( &dbconn ) );
+ exit( mysql_errno( &dbconn ) );
+ }
+ // Yadda yadda
+ mysql_free_result( result );
+
+ return( n_monitors );
+}
+
+int Monitor::LoadFfmpeghwMonitors( const char *file, Monitor **&monitors, Purpose purpose )
+{
+ std::string sql = "select Id, Name, ServerId, Function+0, Enabled, LinkedMonitors, Path, Method, Options, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, LabelSize, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, AnalysisFPS, AnalysisUpdateDelay, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, Exif from Monitors where Function != 'None' and Type = 'Ffmpeghw'";
+ if ( file[0] ) {
+ sql += " AND Path = '";
+ sql += file;
+ sql += "'";
+ }
+ if ( staticConfig.SERVER_ID ) {
+ sql += stringtf( " AND ServerId=%d", staticConfig.SERVER_ID );
+ }
+ Debug( 1, "Loading FFMPEG H/W Monitors with %s", sql.c_str() );
+ MYSQL_RES *result = zmDbFetch( sql.c_str() );
+ if ( ! result ) {
+ Error( "Cannot load FfmpegMonitors" );
+ exit( mysql_errno( &dbconn ) );
+ }
+
+ int n_monitors = mysql_num_rows( result );
+ Debug( 1, "Got %d monitors", n_monitors );
+ delete[] monitors;
+ monitors = new Monitor *[n_monitors];
+ for( int i = 0; MYSQL_ROW dbrow = mysql_fetch_row( result ); i++ )
+ {
+ int col = 0;
+
+ int id = atoi(dbrow[col]); col++;
+ const char *name = dbrow[col]; col++;
+ unsigned int server_id = dbrow[col] ? atoi(dbrow[col]) : 0; col++;
+ int function = atoi(dbrow[col]); col++;
+ int enabled = atoi(dbrow[col]); col++;
+ const char *linked_monitors = dbrow[col]; col++;
+
+ const char *path = dbrow[col]; col++;
+ const char *method = dbrow[col]; col++;
+ const char *options = dbrow[col]; col++;
+
+ int width = atoi(dbrow[col]); col++;
+ int height = atoi(dbrow[col]); col++;
+ int colours = atoi(dbrow[col]); col++;
+ /* int palette = atoi(dbrow[col]); */ col++;
+ Orientation orientation = (Orientation)atoi(dbrow[col]); col++;
+ unsigned int deinterlacing = atoi(dbrow[col]); col++;
+ int brightness = atoi(dbrow[col]); col++;
+ int contrast = atoi(dbrow[col]); col++;
+ int hue = atoi(dbrow[col]); col++;
+ int colour = atoi(dbrow[col]); col++;
+
+ const char *event_prefix = dbrow[col]; col++;
+ const char *label_format = dbrow[col]; col++;
+
+ int label_x = atoi(dbrow[col]); col++;
+ int label_y = atoi(dbrow[col]); col++;
+ int label_size = atoi(dbrow[col]); col++;
+
+ int image_buffer_count = atoi(dbrow[col]); col++;
+ int warmup_count = atoi(dbrow[col]); col++;
+ int pre_event_count = atoi(dbrow[col]); col++;
+ int post_event_count = atoi(dbrow[col]); col++;
+ int stream_replay_buffer = atoi(dbrow[col]); col++;
+ int alarm_frame_count = atoi(dbrow[col]); col++;
+ int section_length = atoi(dbrow[col]); col++;
+ int frame_skip = atoi(dbrow[col]); col++;
+ int motion_frame_skip = atoi(dbrow[col]); col++;
+ double analysis_fps = dbrow[col] ? strtod(dbrow[col], NULL) : 0; col++;
+ unsigned int analysis_update_delay = strtoul(dbrow[col++], NULL, 0);
+ int capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++;
+ int alarm_capture_delay = (dbrow[col]&&atof(dbrow[col])>0.0)?int(DT_PREC_3/atof(dbrow[col])):0; col++;
+ int fps_report_interval = atoi(dbrow[col]); col++;
+ int ref_blend_perc = atoi(dbrow[col]); col++;
+ int alarm_ref_blend_perc = atoi(dbrow[col]); col++;
+ int track_motion = atoi(dbrow[col]); col++;
+ bool embed_exif = (*dbrow[col] != '0'); col++;
+
+ Camera *camera = new FfmpegCamera(
+ id,
+ path, // File
+ method,
+ options,
+ width,
+ height,
+ colours,
+ brightness,
+ contrast,
+ hue,
+ colour,
+ purpose==CAPTURE,
+ 1
);
monitors[i] = new Monitor(
@@ -2692,6 +2837,8 @@
}
#endif // HAVE_LIBAVFORMAT
+
+
Monitor *Monitor::Load( unsigned int p_id, bool load_zones, Purpose purpose )
{
std::string sql = stringtf( "select Id, Name, ServerId, Type, Function+0, Enabled, LinkedMonitors, Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, Protocol, Method, Host, Port, Path, Options, User, Pass, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, RTSPDescribe, Brightness, Contrast, Hue, Colour, EventPrefix, LabelFormat, LabelX, LabelY, LabelSize, ImageBufferCount, WarmupCount, PreEventCount, PostEventCount, StreamReplayBuffer, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, AnalysisFPS, AnalysisUpdateDelay, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour, Exif from Monitors where Id = %d", p_id );
@@ -2896,12 +3043,36 @@
contrast,
hue,
colour,
- purpose==CAPTURE
+ purpose==CAPTURE,
+ 0
+ );
+#else // HAVE_LIBAVFORMAT
+ Fatal( "You must have ffmpeg libraries installed to use ffmpeg cameras for monitor %d", id );
+#endif // HAVE_LIBAVFORMAT
+ }
+ else if ( type == "Ffmpeghw" )
+ {
+#if HAVE_LIBAVFORMAT
+ camera = new FfmpegCamera(
+ id,
+ path.c_str(),
+ method,
+ options,
+ width,
+ height,
+ colours,
+ brightness,
+ contrast,
+ hue,
+ colour,
+ purpose==CAPTURE,
+ 1
);
#else // HAVE_LIBAVFORMAT
Fatal( "You must have ffmpeg libraries installed to use ffmpeg cameras for monitor %d", id );
#endif // HAVE_LIBAVFORMAT
}
+
else if (type == "Libvlc")
{
#if HAVE_LIBVLC
diff -Naur ../src-versions/src-orig/zm_monitor.h src/zm_monitor.h
--- ../src-versions/src-orig/zm_monitor.h 2017-05-14 22:01:18.765897796 +0000
+++ src/zm_monitor.h 2017-05-14 22:02:26.305693423 +0000
@@ -429,6 +429,7 @@
static int LoadFileMonitors( const char *file, Monitor **&monitors, Purpose purpose );
#if HAVE_LIBAVFORMAT
static int LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose purpose );
+ static int LoadFfmpeghwMonitors( const char *file, Monitor **&monitors, Purpose purpose );
#endif // HAVE_LIBAVFORMAT
static Monitor *Load( unsigned int id, bool load_zones, Purpose purpose );
//void writeStreamImage( Image *image, struct timeval *timestamp, int scale, int mag, int x, int y );
Code: Select all
PIDSTAT zmc : Reporting average of 12 readings at 5 seconds intervals
ZMC Process ID : 14302 ==> ( 5.40 + 5.60 + 5.60 + 5.40 + 5.20 + 5.80 + 5.40 + 5.00 + 5.40 + 5.00 + 5.80 + 6.20 ) / 12
AVERAGE : 5.48
PIDSTAT zma : Reporting average of 12 readings at 5 seconds intervals
ZMA Process ID : 14305 ==> ( 6.59 + 6.20 + 6.40 + 6.40 + 6.20 + 6.60 + 6.20 + 6.00 + 6.40 + 6.20 + 6.00 + 6.40 ) / 12
AVERAGE : 6.30
Code: Select all
PIDSTAT zmc : Reporting average of 12 readings at 5 seconds intervals
ZMC Process ID : 13593 ==> ( 5.00 + 4.80 + 5.00 + 5.20 + 5.00 + 3.40 + 4.80 + 6.20 + 6.60 + 6.20 + 6.40 + 6.00 ) / 12
AVERAGE : 5.38
PIDSTAT zma : Reporting average of 12 readings at 5 seconds intervals
ZMA Process ID : 13596 ==> ( 7.20 + 7.00 + 7.80 + 7.20 + 7.20 + 4.80 + 7.20 + 7.80 + 8.40 + 8.00 + 8.60 + 7.40 ) / 12
AVERAGE : 7.38
Code: Select all
PIDSTAT zmc : Reporting average of 12 readings at 5 seconds intervals
ZMC Process ID : 14614 ==> ( 5.40 + 5.40 + 5.80 + 6.20 + 6.00 + 5.80 + 5.60 + 5.20 + 5.20 + 4.80 + 5.40 + 5.60 ) / 12
AVERAGE : 5.53
PIDSTAT zma : Reporting average of 12 readings at 5 seconds intervals
ZMA Process ID : 14617 ==> ( 3.80 + 4.20 + 4.20 + 4.20 + 4.00 + 4.40 + 4.20 + 4.00 + 3.80 + 4.00 + 4.00 + 4.00 ) / 12
AVERAGE : 4.07
Code: Select all
PIDSTAT zmc : Reporting average of 12 readings at 5 seconds intervals
ZMC Process ID : 14898 ==> ( 5.80 + 5.80 + 5.80 + 6.00 + 6.40 + 6.00 + 6.00 + 5.80 + 5.19 + 5.60 + 5.60 + 4.20 ) / 12
AVERAGE : 5.68
PIDSTAT zma : Reporting average of 12 readings at 5 seconds intervals
ZMA Process ID : 14901 ==> ( 2.20 + 2.60 + 2.80 + 2.40 + 2.40 + 2.80 + 2.80 + 2.20 + 2.40 + 2.40 + 2.60 + 1.80 ) / 12
AVERAGE : 2.45
Code: Select all
-I/usr/include/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/libavcodec.so -L /usr/lib/x86_64-linux-gnu/libavutil.so -lavcodec -lavutil -L /usr/lib/x86_64-linux-gnu/libavutil -lavformat `pkg-config --libs opencv` -L /usr/lib/x86_64-linux-gnu-libswscale.so -lswscale -lpthread -lboost_thread -lboost_system
Code: Select all
Unpacking zoneminder (1.28.108-nmu2015100101) ...
Setting up zoneminder (1.28.108-nmu2015100101) ...
Use of uninitialized value $Config{"ZM_DIR_EVENTS"} in pattern match (m//) at /usr/bin/zmupdate.pl line 81.
Use of uninitialized value in concatenation (.) or string at /usr/bin/zmupdate.pl line 81.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Logger.pm line 154.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Logger.pm line 199.
Database already at version 1.31.1, update aborted.
Use of uninitialized value $Config{"ZM_DIR_EVENTS"} in pattern match (m//) at /usr/bin/zmupdate.pl line 81.
Use of uninitialized value in concatenation (.) or string at /usr/bin/zmupdate.pl line 81.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Logger.pm line 154.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Logger.pm line 199.
Freshening configuration in database
Loading config from DB 207 entries
Saving config to DB 207 entries
Code: Select all
set GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';
set SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';
Code: Select all
INSERT INTO Monitors SET LinkedMonitors = NULL, Name = 'Monitor-1', ServerId = NULL, Type = 'Ffmpeg', Function = 'Monitor', Enabled = '1', RefBlendPerc = '6', AlarmRefBlendPerc = '6', AnalysisFPS = NULL, MaxFPS = NULL, AlarmMaxFPS = NULL, Device = '/dev/video0', Channel = '0', Format = '255', Palette = '0', V4LMultiBuffer = NULL, V4LCapturesPerFrame = '1', Protocol = 'rtsp', Host = NULL, Port = '80', SaveJPEGs = '3', VideoWriter = '0', EncoderParameters = '# Lines beginning with # are a comment \r\n# For changing quality, use the crf option\r\n# 1 is best, 51 is worst quality\r\n#crf=23', RecordAudio = '0', RTSPDescribe = '0', LabelFormat = '%N - %d/%m/%y %H:%M:%S', LabelX = '0', LabelY = '0', LabelSize = '1', ImageBufferCount = '50', WarmupCount = '25', PreEventCount = '25', PostEventCount = '25', StreamReplayBuffer = '1000', AlarmFrameCount = '1', EventPrefix = 'Event-', SectionLength = '600', FrameSkip = '0', MotionFrameSkip = '0', AnalysisUpdateDelay = '0', FPSReportInterval = '1000', DefaultView = 'Events', DefaultRate = '100', DefaultScale = '100', WebColour = 'red', Exif = '0', SignalCheckColour = '#0000c0', Path = 'rtsp://admin:admin@192.168.0.78/12', Method = 'rtpRtsp', Options = NULL, Colours = '3', Width = '704', Height = '480', Orientation = '0', Deinterlacing = '0', Sequence = '1';
Code: Select all
INSERT INTO Monitors SET LinkedMonitors = NULL, Name = 'Monitor-1', ServerId = NULL, Type = 'Ffmpeg', Function = 'Monitor', Enabled = '1', RefBlendPerc = '6', AlarmRefBlendPerc = '6', AnalysisFPS = NULL, MaxFPS = NULL, AlarmMaxFPS = NULL, Device = '/dev/video0', Channel = '0', Format = '255', Palette = '0', V4LMultiBuffer = NULL, V4LCapturesPerFrame = '1', Protocol = 'rtsp', Host = NULL, Port = '80', SaveJPEGs = '3', VideoWriter = '0', EncoderParameters = '# Lines beginning with # are a comment \r\n# For changing quality, use the crf option\r\n# 1 is best, 51 is worst quality\r\n#crf=23', RecordAudio = '0', RTSPDescribe = '0', LabelFormat = '%N - %d/%m/%y %H:%M:%S', LabelX = '0', LabelY = '0', LabelSize = '1', ImageBufferCount = '50', WarmupCount = '25', PreEventCount = '25', PostEventCount = '25', StreamReplayBuffer = '1000', AlarmFrameCount = '1', EventPrefix = 'Event-', SectionLength = '600', FrameSkip = '0', MotionFrameSkip = '0', AnalysisUpdateDelay = '0', FPSReportInterval = '1000', DefaultView = 'Events', DefaultRate = '100', DefaultScale = '100', WebColour = 'red', Exif = '0', SignalCheckColour = '#0000c0', Path = 'rtsp://admin:admin@192.168.0.78/12', Method = 'rtpRtsp', Options = '', Colours = '3', Width = '704', Height = '480', Orientation = '0', Deinterlacing = '0', Sequence = '1';
Code: Select all
#add this to /etc/zm at least in ubuntu
ZM_PATH_SOCKS=/tmp/zm
Code: Select all
sudo chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
Code: Select all
FAT [zmc_m1] [Can't open memory map file /zm.mmap.1, probably not enough space free: Permission denied]
Jun 24 09:59:41 myxps8100 zmdc[19416]: ERR ['zmc -m 1' exited abnormally, exit status 255]
Jun 24 09:59:51 myxps8100 zmwatch[19455]: ERR [Memory map file '/zm.mmap.1' does not exist. zmc might not be running.]
Code: Select all
/dev/shm/zm.mmap.1
Code: Select all
ZM_PATH_SOCKS=/tmp/zm
ZM_PATH_MAP=/dev/shm
ZM_DIR_EVENTS=/usr/share/zoneminder/events
ZM_DIR_IMAGES=/usr/share/zoneminder/images
ZM_PATH_ZMS=/zm/cgi-bin/nph-zms
ZM_PATH_SWAP=/tmp
Code: Select all
mkdir /usr/share/zoneminder/events
mkdir /usr/share/zoneminder/images
sudo chown -R www-data:www-data /usr/share/zoneminder/