Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New functionality #3

Merged
merged 8 commits into from
Sep 12, 2018
Merged

New functionality #3

merged 8 commits into from
Sep 12, 2018

Conversation

oleh-poberezhets
Copy link
Member

@oleh-poberezhets oleh-poberezhets commented Sep 10, 2018

video-quality-tools v1.1.0

  • processFrames:

    Added new fields gopDuration, displayAspectRatio, width, height, hasAudioStream to the result of processFrames execution .

    Add new methods to processFrames: calculateGopDuration, calculateDisplayAspectRatio, hasAudioFrames.

  • FramesMonitor

    FramesMonitor fetches video and audio frames from the stream now.

    Added width and height info to video frames.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11

  • 62 of 62 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 98.778%

Totals Coverage Status
Change from base Build 2: -0.05%
Covered Lines: 349
Relevant Lines: 352

💛 - Coveralls

@coveralls
Copy link

coveralls commented Sep 10, 2018

Pull Request Test Coverage Report for Build 17

  • 76 of 76 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 98.994%

Totals Coverage Status
Change from base Build 2: 0.2%
Covered Lines: 353
Relevant Lines: 356

💛 - Coveralls

@WoZ
Copy link
Member

WoZ commented Sep 10, 2018

You use AR_CALCULATION_PRECISION to normalize result of division but you don't have tests for that.

README.md Outdated
`areAllGopsIdentical` field.
For the full GOPs `processFrames` calculates min/max/mean values of bitrates (in kbit/s), framerates and GOP duration
(in seconds) and returns them in `payload` field. The result of the check for the similarity of GOP structures for
the collected GOPs is returned in `areAllGopsIdentical` field. Fields `width`, `height` and `aspectRatio` adjust on
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to write Fields `width`, `height` and `aspectRatio` are taken from".

and

reflects a presence -> reflects presence.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+

src/FramesMonitor.js Show resolved Hide resolved
README.md Outdated
mean: 2,
min: 1.9,
max: 2.1 },
aspectRatio: '16:9',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to describe how aspectRatio calculates.

function processFrames(frames) {
if (!Array.isArray(frames)) {
throw new TypeError('process method is supposed to accept an array of frames.');
}

const audioFrames = processFrames.filterAudioFrames(frames);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't use audioFrames array, so you may replace filterAudioFrames function with smth like hasAudioFrames and use Array.some method. It's much more efficient.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good remark

return WIDESCREEN_AR;
}

return `${width}:${height}`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we need to calculate GCD. It's common technique in ffmpeg.

Copy link
Member Author

@oleh-poberezhets oleh-poberezhets Sep 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+

const baseGopSize = gops[0].frames.length;
const bitrates = [];
const fpsList = [];
const gopsDurations = [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, you can't use gopsDurations. Choose one of the following options: gopDurations or gopsDuration.

In my opinion, gopDurations is better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+ gopDurations

@WoZ WoZ merged commit d53d8ec into master Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants