Merge branch 'master' of github.com:ZoneMinder/zoneminder
commit
36838b70dc
|
@ -90,7 +90,7 @@ bool PacketQueue::queuePacket(ZMPacket* add_packet) {
|
|||
|
||||
if (add_packet->packet.stream_index == video_stream_id) {
|
||||
if ((max_video_packet_count > 0) and (packet_counts[video_stream_id] > max_video_packet_count)) {
|
||||
Warning("You have set the video packets in the queue to %u."
|
||||
Warning("You have set the max video packets in the queue to %u."
|
||||
" The queue is full. Either Analysis is not keeping up or"
|
||||
" your camera's keyframe interval is larger than this setting."
|
||||
" We are dropping packets.", max_video_packet_count);
|
||||
|
|
|
@ -71,7 +71,7 @@ class Monitor extends ZM_Object {
|
|||
'OutputCodec' => null,
|
||||
'Encoder' => 'auto',
|
||||
'OutputContainer' => null,
|
||||
'EncoderParameters' => "# Lines beginning with # are a comment \n# For changing quality, use the crf option\n# 1 is best, 51 is worst quality\n#crf=23\n",
|
||||
'EncoderParameters' => "# Lines beginning with # are a comment \n# For changing quality, use the crf option\n# 1 is best, 51 is worst quality\ncrf=23\n",
|
||||
'RecordAudio' => array('type'=>'boolean', 'default'=>0),
|
||||
'RTSPDescribe' => array('type'=>'boolean','default'=>0),
|
||||
'Brightness' => -1,
|
||||
|
|
|
@ -162,6 +162,7 @@ $SLANG = array(
|
|||
'BadAnalysisUpdateDelay'=> 'Analysis update delay must be set to an integer of zero or more',
|
||||
'BadChannel' => 'Channel must be set to an integer of zero or more',
|
||||
'BadDevice' => 'Device must be set to a valid value',
|
||||
'BadEncoderParameters' => 'Encoder does not work well without at least a value for crf. Please see the help.',
|
||||
'BadFormat' => 'Format must be set to a valid value',
|
||||
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 0 or more',
|
||||
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
|
||||
|
|
|
@ -84,6 +84,15 @@ function validateForm( form ) {
|
|||
errors[errors.length] = "<?php echo translate('BadWebSitePath') ?>";
|
||||
}
|
||||
|
||||
if (form.elements['newMonitor[VideoWriter]'].value == '1' /* Encode */) {
|
||||
var parameters = form.elements['newMonitor[EncoderParameters]'].value.replace(/[^#a-zA-Z]/g, "");
|
||||
|
||||
console.log("encoding value" + parameters);
|
||||
if (parameters == '' || parameters == '#Linesbeginningwith#areacomment#Forchangingqualityusethecrfoption#isbestisworstquality#crf' ) {
|
||||
errors[errors.length] = '<?php echo translate('BadEncoderParameters') ?>';
|
||||
}
|
||||
}
|
||||
|
||||
if ( form.elements['newMonitor[Type]'].value != 'WebSite' ) {
|
||||
|
||||
if ( form.elements['newMonitor[AnalysisFPSLimit]'].value && !(parseFloat(form.elements['newMonitor[AnalysisFPSLimit]'].value) > 0 ) )
|
||||
|
|
|
@ -962,12 +962,12 @@ include('_monitor_source_nvsocket.php');
|
|||
0 => 'Disabled',
|
||||
);
|
||||
|
||||
$videowriteropts[1] = 'X264 Encode';
|
||||
$videowriteropts[1] = 'Encode';
|
||||
|
||||
if ( $monitor->Type() == 'Ffmpeg' )
|
||||
$videowriteropts[2] = 'H264 Camera Passthrough';
|
||||
$videowriteropts[2] = 'Camera Passthrough';
|
||||
else
|
||||
$videowriteropts[2] = array('text'=>'H264 Camera Passthrough - only for FFMPEG','disabled'=>1);
|
||||
$videowriteropts[2] = array('text'=>'Camera Passthrough - only for FFMPEG','disabled'=>1);
|
||||
echo htmlSelect('newMonitor[VideoWriter]', $videowriteropts, $monitor->VideoWriter());
|
||||
?>
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue