explaingit

bilibili/flv.js

23,222JavaScriptAudience · developerComplexity · 2/5StaleLicenseSetup · easy

TLDR

JavaScript library that plays FLV video files and live streams in modern web browsers without Flash, by converting them to a format browsers understand natively.

Mindmap

mindmap
  root((repo))
    What it does
      Play FLV videos
      Stream live FLV
      No Flash needed
    How it works
      Converts to MP4
      Uses Media Source
      Browser-side only
    Use cases
      Embed legacy videos
      Live streaming
      FLV platform support
    Tech stack
      JavaScript
      HTML5 video
      Media Source API
    Audience
      Web developers
      Video platforms
      Legacy system maintainers

Things people build with this

USE CASE 1

Embed FLV video files on a website and play them in modern browsers without Flash.

USE CASE 2

Build a live streaming player that receives FLV streams over HTTP or WebSocket connections.

USE CASE 3

Migrate a legacy video platform from Flash to modern web standards while keeping existing FLV content.

USE CASE 4

Add video playback to a web app that receives H.264 video and AAC/MP3 audio in FLV format.

Tech stack

JavaScriptHTML5Media Source ExtensionsH.264AACMP3

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice and include the license text.

In plain English

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
Show me how to set up flv.js to play an FLV video file from a URL in an HTML5 video element.
Prompt 2
How do I configure flv.js to stream live FLV video over WebSocket and handle playback buffering?
Prompt 3
What's the minimal code to embed an FLV live stream in a web page using flv.js?
Prompt 4
How do I handle playback errors and network issues when using flv.js for live streaming?
Prompt 5
Can you show me how to switch between multiple FLV streams using flv.js?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.