{"id":16641994,"url":"https://github.com/artskydj/bitrate","last_synced_at":"2025-07-30T05:33:38.756Z","repository":{"id":143860271,"uuid":"42313532","full_name":"ArtskydJ/bitrate","owner":"ArtskydJ","description":":chart_with_upwards_trend: Calculates the bitrate given a file's size and duration","archived":false,"fork":false,"pushed_at":"2016-01-08T02:40:01.000Z","size":5,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-09T03:34:53.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ArtskydJ.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}},"created_at":"2015-09-11T14:34:18.000Z","updated_at":"2019-07-09T14:32:01.000Z","dependencies_parsed_at":"2023-03-21T05:21:17.398Z","dependency_job_id":null,"html_url":"https://github.com/ArtskydJ/bitrate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ArtskydJ/bitrate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtskydJ%2Fbitrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtskydJ%2Fbitrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtskydJ%2Fbitrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtskydJ%2Fbitrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArtskydJ","download_url":"https://codeload.github.com/ArtskydJ/bitrate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtskydJ%2Fbitrate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267815187,"owners_count":24148356,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-12T07:48:32.715Z","updated_at":"2025-07-30T05:33:38.736Z","avatar_url":"https://github.com/ArtskydJ.png","language":"JavaScript","readme":"bitrate\r\n=========\r\n\r\n\u003e Calculates the bitrate given a file's size and duration\r\n\r\n[![Build Status](https://travis-ci.org/ArtskydJ/bitrate.svg)](https://travis-ci.org/ArtskydJ/bitrate)\r\n\r\n# example\r\n\r\n```js\r\nvar bitrate = require('bitrate')\r\n\r\nvar bytes = 6076940\r\nvar seconds = 149\r\n\r\nvar kilobitsPerSecond = bitrate(bytes, seconds) // =\u003e 326.3\r\nvar bitsPerSecond = bitrate(bytes, seconds, 'bps') // =\u003e 326279\r\nvar BytesPerSecond = bitrate(bytes, seconds, 'Bps') // =\u003e 40785\r\n```\r\n\r\n# api\r\n\r\n```js\r\nvar bitrate = require('bitrate')\r\n```\r\n\r\n## `var rate = bitrate(bytes, seconds, [format])`\r\n\r\n- `bytes` is a number of bytes\r\n- `seconds` is a number of the duration in seconds\r\n- `format` is a string of the desired format. Accepts:\r\n\t- `bps`, `b/s`; bits per second\r\n\t- `kbps`, `kb/s`; kilobits per second **default**\r\n\t- `mbps`, `mb/s`; megabits per second\r\n\t- `Bps`, `B/s`; bytes per second\r\n\t- `KBps`, `KB/s`; kilobytes per second\r\n\t- `MBps`, `MB/s`; megabytes per second\r\n- **Returns** `rate` number\r\n\r\n# install\r\n\r\nWith [npm](http://nodejs.org/download) do:\r\n\r\n\tnpm install bitrate\r\n\r\n# license\r\n\r\n[VOL](http://veryopenlicense.com)\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartskydj%2Fbitrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartskydj%2Fbitrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartskydj%2Fbitrate/lists"}