{"id":19177819,"url":"https://github.com/eyevinn/autovmaf-api","last_synced_at":"2025-05-07T20:41:58.685Z","repository":{"id":63667362,"uuid":"458360055","full_name":"Eyevinn/autovmaf-api","owner":"Eyevinn","description":"API to orchestrate AutoVMAF jobs","archived":false,"fork":false,"pushed_at":"2023-06-05T08:39:13.000Z","size":305,"stargazers_count":3,"open_issues_count":23,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-07T20:41:50.718Z","etag":null,"topics":["tools","vmaf"],"latest_commit_sha":null,"homepage":"https://autovmaf.docs.eyevinn.technology/index.html","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Eyevinn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-02-11T22:36:42.000Z","updated_at":"2023-06-06T07:33:55.000Z","dependencies_parsed_at":"2024-01-16T23:30:34.934Z","dependency_job_id":"a9e0b728-0a27-4767-8b5e-3048f3e2d460","html_url":"https://github.com/Eyevinn/autovmaf-api","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fautovmaf-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fautovmaf-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fautovmaf-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fautovmaf-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eyevinn","download_url":"https://codeload.github.com/Eyevinn/autovmaf-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954127,"owners_count":21830893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tools","vmaf"],"created_at":"2024-11-09T10:35:21.042Z","updated_at":"2025-05-07T20:41:58.661Z","avatar_url":"https://github.com/Eyevinn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoVMAF API\n\nAPI to create, run and monitor [autovmaf](https://github.com/Eyevinn/autovmaf) jobs.\n\nCurrent features:\n\n- Possible to start new autoabr jobs.\n- Possible to run multiple autoabr jobs in parallel.\n- Monitor how long a job have been running (milliseconds) and the status i.e `ACTIVE`/`INACTIVE`.\n- Download and compile VMAF results from S3 for all measured bitrates and resolutions for a specific job.\n\nNew Autoabr workers will automatically be created if all current ones are in use.\nThis makes it really easy to create and run jobs in parallel.\n\n## Setup\n\n### Environment\n\nThe following environment variables need to be set.\n\n```bash\nAWS_ACCESS_KEY_ID=MyAccessKeyID\nAWS_SECRET_ACCESS_KEY=MySecretAccessKey\nAWS_REGION=eu-north-1\nLOAD_CREDENTIALS_FROM_ENV=true // If false, it will load credentials from ~/.aws/credentials\n```\n\nUsing an `.env` file is supported. Just rename `.env.example` to `.env` and insert your values.\n\n### Initialize\n\nTo initialize a new `AutoabrService` do:\n\n```typescript\nimport { AutoabrService } from \"@eyevinn/autoabr-api\";\n\n// initialize a new instance of AutoabrService\nconst autoabrService = new AutoabrService();\n// register the routes\nautoabrService.listen(3000);\n```\n\nThe Autoabr service is now up and running and available on port `3000`.\n\n## Endpoints\n\nAvailable endpoints are:\n\n| Endpoint                         | Method   | Description                                                                                         |\n| -------------------------------- | -------- | --------------------------------------------------------------------------------------------------- |\n| `/`                              | `GET`    | Heartbeat endpoint of service                                                                       |\n| `/autoabr`                       | `POST`   | Create a new autoabr job. Provide JSON body with settings                                           |\n| `/autoabr`                       | `GET`    | List all active autoabr workers                                                                     |\n| `/autoabr/:id`                   | `GET`    | List info about a specific autoabr worker                                                           |\n| `/autoabr/result/:output/`       | `GET`    | Download VMAF results from S3 and compile it into JSON. _**NOTE:** Trailing slash is not optional!_ |\n| `/autoabr/result/:output/:model` | `GET`    | Download VMAF results from S3 and compile it into JSON for a specific model                         |\n| `?format=csv` or `?format=tsv`   | `-`      | Optional query parameter for the `/autoabr/result/` enpoints. Compiles results into CSV or TSV.     |\n| `/autoabr/cache`                 | `DELETE` | Clear MediaConvert and AWS pipeline settings cache                                                  |\n\n## Example requests\n\n### Start a job\n\nTo start a new Autoabr job send a `POST` request to the `/autoabr` endpoint with :\n\n```json\n{\n  \"encodingSettingsUrl\": \"s3://bucket-name/encoding-profile.json\",\n  \"pipelineUrl\": \"s3://bucket-name/pipeline.json\",\n  \"job\": {\n    \"name\": \"job-name\",\n    \"reference\": \"s3://bucket-name/reference.mov\",\n    \"models\": [\"UHD\"],\n    \"bitrates\": [10000000, 12800000],\n    \"resolutions\": [\n      {\n        \"width\": 768,\n        \"height\": 432\n      },\n      {\n        \"width\": 1280,\n        \"height\": 720\n      },\n      {\n        \"width\": 1920,\n        \"height\": 1080\n      },\n      {\n        \"width\": 2560,\n        \"height\": 1440\n      },\n      {\n        \"width\": 3840,\n        \"height\": 2160\n      }\n    ]\n  }\n}\n```\n\nIf the `pipelineUrl` and `encodingSettingsUrl` haven't been set it will use the default settings that can be found in `src/resources`.\n\n### Get results\n\nThe endpoint `/autoabr/result/:output/` (output is the output specified in the `job` payload) will download and process all resulting VMAF files from AWS and return the result. This process can take a while depending on how many resolutions and bitrates that have been measured. This means that the response from the endpoint can take several seconds.\n\n#### Example JSON Response\n\n`GET /autoabr/result/job-name/`\n\n```json\n{\n  \"id\": \"BxTH45aRiyAAq_TBbbHqH\",\n  \"status\": \"INACTIVE\",\n  \"result\": {\n    \"job-name\": {\n      \"PhoneHD\": {},\n      \"HD\": {\n        \"1280x720_10000000_vmaf.json\": 91.12216,\n        \"1280x720_12800000_vmaf.json\": 91.12216,\n        \"1920x1080_10000000_vmaf.json\": 97.427916,\n        \"1920x1080_12800000_vmaf.json\": 97.427916\n      },\n      \"UHD\": {}\n    }\n  }\n}\n```\n\n#### Example CSV Response\n\n`GET /autoabr/result/job-name/?format=csv`\n\n```CSV\njobname,model,width,height,bitrate,score\njob-name,HD,1280,720,10000000,91.12216\njob-name,HD,1280,720,12800000,91.12216\njob-name,HD,1920,1080,10000000,97.427916\njob-name,HD,1920,1080,12800000,97.427916\n\n```\n\n#### Example TSV Response\n\n`GET /autoabr/result/job-name/?format=tsv`\n\n```CSV\njobname\tmodel\twidth\theight\tbitrate\tscore\njob-name\tHD\t1280\t720\t10000000\t91.12216\njob-name\tHD\t1280\t720\t12800000\t91.12216\njob-name\tHD\t1920\t1080\t10000000\t97.427916\njob-name\tHD\t1920\t1080\t12800000\t97.427916\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyevinn%2Fautovmaf-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyevinn%2Fautovmaf-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyevinn%2Fautovmaf-api/lists"}