Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@eyevinn/autovmaf
Advanced tools
By optimizing ABR-ladders for specific content, you will make sure to not have wasteful rungs and this has been shown to cut bandwidth usage in half.
Transcoding and VMAF analysis can either be run in AWS or locally. When running in aws, you will need a running ECS cluster with a task definition configured to run easyvmaf-s3.
npm install --save @eyevinn/autovmaf
A few environment variables can be set. These are:
LOAD_CREDENTIALS_FROM_ENV=true //Load AWS credentials from environment variables
AWS_REGION=eu-north-1
AWS_ACCESS_KEY_ID=ABCD...
AWS_SECRET_ACCESS_KEY=EFGH...
To generate VMAF measurements, you will need to define a job which can be created with the createJob()
-function.
const { createJob } = require('@eyevinn/autovmaf');
const vmafScores = await createJob({
name: "MyVMAFmeasurements",
pipeline: "pipeline.yml",
encodingProfile: "profile.json",
reference: "reference.mp4",
models: ["HD", "PhoneHD"], // optional
resolutions: [{ // optional
width: 1280,
height: 720,
range: // optional
{ min: 500000,
max: 600000 }
}],
bitrates: [500000, 600000], // optional
method: "bruteForce" // optional
});
When creating a job, you can specify:
examples/pipeline.yml
for an example AWS-pipeline. Currently only AWS is supported.examples/encoding-profile.json
.bruteForce
or walkTheHull
. By default bruteForce
. NOTE: walkTheHull
is not implemented at the moment.const { createJob } = require('@eyevinn/autovmaf');
const YAML = require('yaml');
const fs = require('fs');
const parseResolutions = resolutions => {
resolutions.map(resolutionStr => ({
width: parseInt(resolutionStr.split('x')[0]),
height: parseInt(resolutionStr.split('x')[1]),
}));
};
const jobFile = fs.readFileSync('job.yml', 'utf-8');
const jobData = YAML.parse(jobFile);
const job = {
...jobData,
resolutions: jobData['resolutions'] !== undefined ? parseResolutions(jobData['resolutions']) : undefined,
};
createJob(job);
An example of creating a job from a YAML-file can be seen in the examples-folder
.
Using getVmaf()
, you can read VMAF-scores from a JSON-file or a directory of JSON-files. This works on both local paths as well as S3-URIs with a "s3://"-prefix.
Example:
const vmafFiles = await getVmaf('s3://path/to/vmaf/');
vmafFiles.forEach(file => {
console.log(file.filename + ': ' + file.vmaf);
});
When running with the cli, all transcoding and vmaf analysis will be run locally.
Installing with npm -g
will make the autovmaf
command available in your path
npm install -g @eyevinn/autovmaf
EASYVMAF_PATH
- needs to point to the file easyVmaf.py
from your
easyVmaf installation.FFMPEG_PATH
- only needs to be set if ffmpeg is not in your path.PYTHON_PATH
- only needs to be set if python is not in yur path.Available command line options for the cli can be listed with the --help
argument
autovmaf <source>
run autovmaf for videofile source
Positionals:
source SOURCEFILE [string]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--resolutions List of resolutions, ie 1920x1080,1280x720... [string]
--bitrates List of bitrates, ie 800k,1000k,... [string]
--name Name for this autovmaf run
[string] [default: "MyVMAFMeasurements"]
--models List of VMAF Models to use [string] [default: "HD"]
Output files will be stored in a folder corresponding to the argument given to the --name
option.
If resolutions and/or bitrates are not specified default values will be used, See above.
autovmaf --resolutions 1920x1080,1280x720,960x540 --bitrates 500k,800k,1200k,1600k,2000k,3000k,4000k --name my-autovmaf-test1 my-source-video.mp4
With the above command, when the run is finished transcoded files will be available in the folder my-autovmaf-test1
, and vmaf-data in the folder my-autovmaf-test1/HD
.
npm test
Eyevinn Technology is an independent consultant firm specialized in video and streaming. Independent in a way that we are not commercially tied to any platform or technology vendor.
At Eyevinn, every software developer consultant has a dedicated budget reserved for open source development and contribution to the open source community. This give us room for innovation, team building and personal competence development. And also gives us as a company a way to contribute back to the open source community.
Want to know more about Eyevinn and how it is to work here. Contact us at work@eyevinn.se!
FAQs
Unknown package
The npm package @eyevinn/autovmaf receives a total of 10 weekly downloads. As such, @eyevinn/autovmaf popularity was classified as not popular.
We found that @eyevinn/autovmaf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.