Skip to content

Commit

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

# v1.1.9 - 2022-04-16

## Bugfixes
- Fixed minor issues with FFmpeg v5

# v1.1.8 - 2022-04-16

## 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.8",
"version": "1.1.9",
"description": "NVR like user interface for RTSP capable cameras.",
"author": "SeydX (https://github.com/SeydX/camera.ui)",
"scripts": {
Expand Down
11 changes: 8 additions & 3 deletions src/controller/camera/services/media.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ export default class MediaService {
async probe() {
// eslint-disable-next-line no-unused-vars
return new Promise((resolve, reject) => {
let lines = 0;

const arguments_ = [
'-hide_banner',
'-loglevel',
'info',
'-analyzeduration',
'0',
'-probesize',
Expand All @@ -64,6 +63,10 @@ export default class MediaService {
});

stderr.on('line', (line) => {
if (lines === 0) {
ConfigService.ffmpegVersion = line.split(' ')[2];
}

const audioLine = line.includes('Audio: ') ? line.split('Audio: ')[1] : false;

if (audioLine) {
Expand All @@ -75,6 +78,8 @@ export default class MediaService {
if (videoLine) {
this.codecs.video = videoLine.split(', ');
}

lines++;
});

cp.on('exit', () => {
Expand Down

0 comments on commit bc96ae6

Please sign in to comment.