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.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

bitrate

Calculates the bitrate given a file's size and duration

Build Status

example

var bitrate = require('bitrate')

var bytes = 6076940
var seconds = 149

var kilobitsPerSecond = bitrate(bytes, seconds) // => 326.3
var bitsPerSecond = bitrate(bytes, seconds, 'bps') // => 326279
var BytesPerSecond = bitrate(bytes, seconds, 'Bps') // => 40785

api

var bitrate = require('bitrate')

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

  • bytes is a number of bytes
  • seconds is a number of the duration in seconds
  • format is a string of 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 08 Jan 2016

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