bump version and put back ZM_MIN_RTSP_PORT setting

This commit is contained in:
Isaac Connor 2021-01-26 12:35:17 -05:00
parent 7e11d28031
commit 671d58f0d0
5 changed files with 40 additions and 19 deletions

View File

@ -1,2 +1 @@
ALTER TABLE `Monitors` MODIFY `Encoder` enum('auto','h264','libx264', 'h264_omx', 'h264_vaapi', 'mjpeg','mpeg1','mpeg2');

View File

@ -28,7 +28,7 @@
%global _hardened_build 1
Name: zoneminder
Version: 1.35.16
Version: 1.35.17
Release: 1%{?dist}
Summary: A camera monitoring and analysis tool
Group: System Environment/Daemons

View File

@ -947,19 +947,19 @@ our @options = (
type => $types{integer},
category => 'network',
},
#{
#name => 'ZM_MIN_RTSP_PORT',
#default => '',
#description => 'Start of port range to contact for RTSP streaming video.',
#help => q`
#The beginng of a port range that will be used to offer
#RTSP streaming of live captured video.
#Each monitor will use this value plus the Monitor Id to stream
#content. So a value of 2000 here will cause a stream for Monitor 1 to
#hit port 2001.`,
#type => $types{integer},
#category => 'network',
#},
{
name => 'ZM_MIN_RTSP_PORT',
default => '',
description => 'Start of port range to contact for RTSP streaming video.',
help => q`
The beginng of a port range that will be used to offer
RTSP streaming of live captured video.
Each monitor will use this value plus the Monitor Id to stream
content. So a value of 2000 here will cause a stream for Monitor 1 to
hit port 2001.`,
type => $types{integer},
category => 'network',
},
{
name => 'ZM_MIN_RTP_PORT',
default => '40200',

View File

@ -1 +1 @@
1.35.16
1.35.17

View File

@ -178,9 +178,31 @@ if ( empty($_REQUEST['path']) ) {
# If we store Frames as jpgs, then we don't store a snapshot
$path = $Event->Path().'/'.sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d', $Frame->FrameId()).'-'.$show.'.jpg';
} else {
header('HTTP/1.0 404 Not Found');
ZM\Fatal('No alarm jpg found for event '.$_REQUEST['eid']);
return;
if ( $Event->DefaultVideo() ) {
$command = ZM_PATH_FFMPEG.' -ss '. $Frame->Delta() .' -i '.$Event->Path().'/'.$Event->DefaultVideo().' -frames:v 1 '.$path . ' 2>&1';
#$command ='ffmpeg -ss '. $Frame->Delta() .' -i '.$Event->Path().'/'.$Event->DefaultVideo().' -vf "select=gte(n\\,'.$Frame->FrameId().'),setpts=PTS-STARTPTS" '.$path;
#$command ='ffmpeg -v 0 -i '.$Storage->Path().'/'.$Event->Path().'/'.$Event->DefaultVideo().' -vf "select=gte(n\\,'.$Frame->FrameId().'),setpts=PTS-STARTPTS" '.$path;
ZM\Debug("Running $command");
$output = array();
$retval = 0;
exec($command, $output, $retval);
ZM\Debug("Command: $command, retval: $retval, output: " . implode("\n", $output));
if ( ! file_exists($path) ) {
header('HTTP/1.0 404 Not Found');
ZM\Fatal('Can\'t create frame images from video for this event '.$Event->DefaultVideo().'
Command was: '.$command.'
Output was: '.implode(PHP_EOL,$output) );
}
# Generating an image file will use up more disk space, so update the Event record.
$Event->DiskSpace(null);
$Event->save();
} else {
header('HTTP/1.0 404 Not Found');
ZM\Fatal('No snapshot jpg found for event '.$_REQUEST['eid']);
return;
}
} # end if stored jpgs
} else {
$Frame = new ZM\Frame();