New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bitrate

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitrate

Calculates the bitrate given a file's size and duration

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

bitrate

Build Status Dependency Status devDependency Status

Calculates the bitrate given a file's size and duration

example

var bitrate = require('bitrate')

var rate1 = bitrate(6076940, 149) // => 326.3
var rate2 = bitrate(6076940, 149, 'bps') // => 326279
var rate3 = bitrate(6076940, 149, 'Bps') // => 40785

api

var bitrate = require('bitrate')

var rate = bitrate(bytes, seconds, [format])

  • bytes is the number in bytes
  • seconds is the duration in seconds
  • format is the desired format. Accepts:
    • bps, b/s; bits per second
    • kbps, kb/s; kilobits per second default
    • mbps, mb/s; megabits per second
    • Bps, B/s; bytes per second
    • KBps, KB/s; kilobytes per second
    • MBps, MB/s; megabytes per second
  • Returns rate number

install

With npm do:

npm install bitrate

license

VOL

Keywords

FAQs

Package last updated on 11 Sep 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc