whatisgithub

What is flv.js?

bilibili/flv.js — explained in plain English

Analysis updated 2026-06-21

23,226JavaScriptAudience · developerComplexity · 2/5Setup · easy

In one sentence

A JavaScript library that lets browsers play FLV videos and live streams without Adobe Flash, by converting them on the fly using HTML5's built-in video support.

Mindmap

mindmap
  root((flv.js))
    What it does
      Plays FLV in browsers
      No Flash needed
      Live stream support
    How it works
      Media Source Extensions
      FLV to fMP4 conversion
      HTTP and WebSocket
    Tech stack
      JavaScript
      HTML5 video
      npm
    Use cases
      Legacy video sites
      Live streaming
      Web video players
    Audience
      Web developers
      Video platform devs
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Embed legacy FLV video files on a web page without requiring Flash.

USE CASE 2

Build a low-latency live-streaming player that reads FLV streams over HTTP or WebSocket.

USE CASE 3

Add playback support for FLV content on a platform that still stores video in that format.

What is it built with?

JavaScriptHTML5Media Source Extensionsnpm

How does it compare?

bilibili/flv.jsovity/octotreechalk/chalk
Stars23,22623,18823,182
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity2/51/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires a browser with Media Source Extensions support, not compatible with all mobile browsers.

So what is it?

flv.js is a JavaScript library from Bilibili (a Chinese video platform) that lets web browsers play FLV video files without requiring Adobe Flash. FLV (Flash Video) was a popular video format in the mid-2000s, but modern browsers dropped Flash support. This library bridges that gap. It works by reading an FLV video stream and converting it on the fly into a format (Fragmented MP4) that modern browsers can play natively using an HTML5 video element. This conversion happens entirely in the browser using a standard browser API called Media Source Extensions. Beyond playing recorded FLV files, it also supports low-latency live streaming over HTTP or WebSocket connections, which made it particularly useful for live streaming platforms. It handles video encoded with H.264 and audio encoded with AAC or MP3. You would use flv.js when you need to embed FLV videos or FLV live streams in a web page without Flash, or when working with a platform that still stores or serves content in FLV format. Note that the project is no longer actively maintained, the authors recommend its successor mpegts.js for new live-streaming use cases. The library is written in JavaScript and installable via npm.

Copy-paste prompts

Prompt 1
Using flv.js, write the HTML and JavaScript to embed an FLV video file at /video/sample.flv in a web page so it plays in a modern browser without Flash.
Prompt 2
Show me how to use flv.js to play a live FLV stream from ws://my-server/live/stream in a browser video element.
Prompt 3
I have a website with FLV video files. Write a step-by-step guide to adding flv.js via npm and setting up a basic video player component.
Prompt 4
What are the differences between flv.js and its successor mpegts.js, and when should I migrate my project?

Frequently asked questions

What is flv.js?

A JavaScript library that lets browsers play FLV videos and live streams without Adobe Flash, by converting them on the fly using HTML5's built-in video support.

What language is flv.js written in?

Mainly JavaScript. The stack also includes JavaScript, HTML5, Media Source Extensions.

How hard is flv.js to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is flv.js for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.