Skip to content

Commit

Permalink
v1.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
seydx committed Apr 16, 2022
1 parent f204e15 commit 7c3fbb2
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 23 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Changelog
All notable changes to this project will be documented in this file.

# v1.1.8 - 2022-04-16

## Other Changes
- Minor recording improvements

## Bugfixes
- Fixed an issue where the notification in the interface referred to a saved recording even though recordings were disabled
- Fixed an issue where the recorded video could not be sent via Telegram
- Fix ffmpeg command `-stimeout`
- Minor bugfixes

# v1.1.7 - 2022-04-15

## Other Changes
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "camera.ui",
"version": "1.1.7",
"version": "1.1.8",
"description": "NVR like user interface for RTSP capable cameras.",
"author": "SeydX (https://github.com/SeydX/camera.ui)",
"scripts": {
Expand Down
7 changes: 3 additions & 4 deletions src/api/components/notifications/notifications.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export const createNotification = async (data) => {
'_CUI';

const extension = data.type === 'Video' ? 'mp4' : 'jpeg';
const storing = data.type === 'Video' || data.type === 'Snapshot';
const label = (data.label || 'no label').toString();

const notification = {
Expand All @@ -129,7 +128,7 @@ export const createNotification = async (data) => {
fileName: `${fileName}.${extension}`,
name: fileName,
extension: extension,
recordStoring: storing,
recordStoring: data.storing,
recordType: data.type,
trigger: data.trigger,
room: room,
Expand All @@ -143,8 +142,8 @@ export const createNotification = async (data) => {
title: cameraName,
message: `${data.trigger} - ${time}`,
subtxt: room,
mediaSource: storing ? `/files/${fileName}.${extension}` : false,
tumbnail: storing
mediaSource: data.storing ? `/files/${fileName}.${extension}` : false,
thumbnail: data.storing
? data.type === 'Video'
? `/files/${fileName}@2.jpeg`
: `/files/${fileName}.${extension}`
Expand Down
4 changes: 2 additions & 2 deletions src/common/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class Telegram {
if (content.img) {
try {
log.debug('Telegram: Sending Image');
const stream = fs.createReadStream(content.img);
const stream = Buffer.isBuffer(content.img) ? content.img : fs.createReadStream(content.img);
await Telegram.bot.sendPhoto(chatID, stream, {}, { filename: content.fileName });
} catch (error) {
log.info('An error occured during sending image!', 'Telegram', 'notifications');
Expand All @@ -71,7 +71,7 @@ export default class Telegram {
if (content.video) {
try {
log.debug('Telegram: Sending Video');
const stream = fs.createReadStream(content.video);
const stream = Buffer.isBuffer(content.video) ? content.video : fs.createReadStream(content.video);
await Telegram.bot.sendVideo(chatID, stream, {}, { filename: content.fileName });
} catch (error) {
log.info('An error occured during sending video!', 'Telegram', 'notifications');
Expand Down
4 changes: 2 additions & 2 deletions src/controller/camera/services/prebuffer.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default class PrebufferService {

const timer = this.#millisUntilTime('02:00');

log.info(`Prebuffering scheduled for restart at 2AM: ${Math.round(timer / 1000 / 60)} minutes`, this.cameraName);
log.debug(`Prebuffering scheduled for restart at 2AM: ${Math.round(timer / 1000 / 60)} minutes`, this.cameraName);

this.restartTimer = setTimeout(() => {
log.info('Sheduled restart of prebuffering is executed...', this.cameraName);
Expand Down Expand Up @@ -571,7 +571,7 @@ export default class PrebufferService {
});

cp.on('close', () => {
log.info('Prebufferring process closed', this.cameraName);
log.debug('Prebuffering process closed', this.cameraName);

kill();

Expand Down
2 changes: 1 addition & 1 deletion src/controller/camera/services/stream.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default class StreamService {
'-q',
'1',
'-max_muxing_queue_size',
'1024',
'9999',
];

return {
Expand Down
2 changes: 1 addition & 1 deletion src/controller/camera/services/videoanalysis.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default class VideoAnalysisService {
if (!withPrebuffer) {
const timer = this.#millisUntilTime('04:00');

log.info(
log.debug(
`Videoanalysis scheduled for restart at 4AM: ${Math.round(timer / 1000 / 60)} minutes`,
this.cameraName
);
Expand Down
6 changes: 3 additions & 3 deletions src/controller/camera/utils/camera.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export const startFFMPegFragmetedMP4Session = async (
'-movflags',
'frag_keyframe+empty_moov+default_base_moof',
'-max_muxing_queue_size',
'1024',
'9999',
'-vsync',
'cfr',
'tcp://127.0.0.1:' + serverPort,
Expand Down Expand Up @@ -311,8 +311,8 @@ export const generateInputSource = (videoConfig, source) => {
inputSource = `-re ${inputSource}`;
}

if (videoConfig.stimeout > 0 && !inputSource.includes('-stimeout')) {
inputSource = `-stimeout ${videoConfig.stimeout * 10000000} ${inputSource}`;
if (videoConfig.stimeout > 0 && !inputSource.includes('-timeout')) {
inputSource = `-timeout ${videoConfig.stimeout * 10000000} ${inputSource}`;
}

if (videoConfig.maxDelay >= 0 && !inputSource.includes('-max_delay')) {
Expand Down
2 changes: 1 addition & 1 deletion src/controller/event/event.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default class EventController {
}*/

if (fileBuffer) {
motionInfo.label = 'Custom';
motionInfo.label = 'no label';
motionInfo.type = type || 'Video';
}

Expand Down
2 changes: 1 addition & 1 deletion ui/src/i18n/locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
"thursday": "Donnerstag",
"time": "Zeit",
"timeout": "Zeitüberschreitung",
"timeout_info": "Socket TCP I/O timeout in seconds. If you have problems with hanging FFmpeg processes in the background, you can enter any value here to stop the process automatically after the entered time, if no response comes (-stimeout).",
"timeout_info": "Socket TCP I/O timeout in seconds. If you have problems with hanging FFmpeg processes in the background, you can enter any value here to stop the process automatically after the entered time, if no response comes (-timeout).",
"timestamp": "Zeitstempel",
"token": "Token",
"tuesday": "Dienstag",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/i18n/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
"thursday": "Thursday",
"time": "Time",
"timeout": "Timeout",
"timeout_info": "Socket TCP I/O timeout in seconds. If you have problems with hanging FFmpeg processes in the background, you can enter any value here to stop the process automatically after the entered time, if no response comes (-stimeout).",
"timeout_info": "Socket TCP I/O timeout in seconds. If you have problems with hanging FFmpeg processes in the background, you can enter any value here to stop the process automatically after the entered time, if no response comes (-timeout).",
"timestamp": "Timestamp",
"tuesday": "Tuesday",
"typ": "Typ",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/i18n/locale/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
"thursday": "Jueves",
"time": "Tiempo",
"timeout": "Timeout",
"timeout_info": "Socket TCP I/O timeout in seconds. If you have problems with hanging FFmpeg processes in the background, you can enter any value here to stop the process automatically after the entered time, if no response comes (-stimeout).",
"timeout_info": "Socket TCP I/O timeout in seconds. If you have problems with hanging FFmpeg processes in the background, you can enter any value here to stop the process automatically after the entered time, if no response comes (-timeout).",
"timestamp": "Timestamp",
"tuesday": "Martes",
"typ": "Typ",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/i18n/locale/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
"thursday": "Jeudi",
"time": "Temps",
"timeout": "Délai d'expiration",
"timeout_info": "Délai d'expiration des E/S du socket TCP en secondes. Si vous avez des problèmes de processus FFmpeg bloqués en arrière-plan, vous pouvez entrer une valeur ici pour stopper le processus automatiquement après le temps désiré si aucune réponse n'arrive (-stimeout).",
"timeout_info": "Délai d'expiration des E/S du socket TCP en secondes. Si vous avez des problèmes de processus FFmpeg bloqués en arrière-plan, vous pouvez entrer une valeur ici pour stopper le processus automatiquement après le temps désiré si aucune réponse n'arrive (-timeout).",
"timestamp": "Horodatage",
"tuesday": "Mardi",
"typ": "Type",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/i18n/locale/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
"thursday": "Donderdag",
"time": "Tijd",
"timeout": "Timeout",
"timeout_info": "Socket TCP I/O timeout in seconds. If you have problems with hanging FFmpeg processes in the background, you can enter any value here to stop the process automatically after the entered time, if no response comes (-stimeout).",
"timeout_info": "Socket TCP I/O timeout in seconds. If you have problems with hanging FFmpeg processes in the background, you can enter any value here to stop the process automatically after the entered time, if no response comes (-timeout).",
"timestamp": "Tijdstempel",
"tuesday": "Dinsdag",
"type": "Type",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/i18n/locale/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
"thursday": "วันพฤหัสบดี",
"time": "เวลา",
"timeout": "หมดเวลา",
"timeout_info": "ซ็อกเก็ต TCP I/O หมดเวลาในไม่กี่วินาที หากคุณมีปัญหากับการหยุดทำงาน FFmpeg ในพื้นหลัง คุณสามารถป้อนค่าใดๆ ที่นี่เพื่อหยุดกระบวนการโดยอัตโนมัติหลังจากเวลาที่ป้อน หากไม่มีการตอบสนอง (-stimeout)",
"timeout_info": "ซ็อกเก็ต TCP I/O หมดเวลาในไม่กี่วินาที หากคุณมีปัญหากับการหยุดทำงาน FFmpeg ในพื้นหลัง คุณสามารถป้อนค่าใดๆ ที่นี่เพื่อหยุดกระบวนการโดยอัตโนมัติหลังจากเวลาที่ป้อน หากไม่มีการตอบสนอง (-timeout)",
"timestamp": "การประทับเวลา",
"tuesday": "วันอังคาร",
"typ": "Typ",
Expand Down

0 comments on commit 7c3fbb2

Please sign in to comment.