npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

web-bml

v1.0.1

Published

Webブラウザで動作するデータ放送ブラウザ(BMLブラウザ)

Readme

web-bml

Webブラウザで動作するデータ放送ブラウザ(BMLブラウザ)

デモ https://otya128.github.io/web-bml

screenshot

動作環境

  • LinuxまたはWindows上のNode.js (v22とv24で動作確認済)
  • 新しめのFirefoxまたはChromium系ブラウザ
  • ffmpeg (動画視聴する場合)

使い方

Mirakurunからの放送、EPGStationからの録画または引数に与えたファイルを再生できます。

実行方法

ライブラリ部分をビルド:

npm ci
npm run build
npm -w example run build
npm -w example run start [input.ts]

localhost:23234

実行方法(コンテナ)

docker build -t web-bml .
docker run --init --rm --name web-bml -e MIRAK_URL=http://localhost:40772 -e EPG_URL=http://localhost:8888 -p 23234:23234 web-bml

ファイルを試す場合:

docker run --init --rm --name web-bml --mount "type=bind,source=PATH-TO-TS.ts,target=/app/input.ts,readonly" -e INPUT_FILE=input.ts -p 23234:23234 web-bml

MirakurunとEPGStationが既にコンテナで動いている場合:

docker run --init --rm --name web-bml --net=host -e MIRAK_URL=http://localhost:40772 -e EPG_URL=http://localhost:8888 web-bml
docker run --init --rm --name web-bml --net=xxxx -e MIRAK_URL=http://mirakurun:40772 -e EPG_URL=http://epgstation:8888 -p 23234:23234 web-bml

動画形式

null以外はffmpegが必須

?format=...&demultiplexServiceId=...&seek=bytes

  • null
    • ブラウザ向けに動画をエンコードせずデータカルーセルのみをデコードする
    • データ放送のみのサービス(NHK BS1 707ヘルプチャンネルなど)はこれじゃないと表示できないことがある
      • /channels/BS/BS15_0/stream?demultiplexServiceId=707&format=null
  • mp4
    • <video>のみで再生する
    • 字幕非対応
  • h264-mpegts
    • デフォルト
    • mpegts.jsを利用
    • 低遅延で再生されるまでが速い
    • aribb24.jsによる字幕に対応
    • 生配信にのみ対応
      • ただしffmpegのオプションに-reを付けて等速にしているため録画でも一応は動く
  • hls
    • hls.jsを利用
    • aribb24.jsによる字幕に対応
    • 特に理由がなければh264-mpegtsで良い

設定

環境変数か.envファイルに以下のように記述

MIRAK_URL=http://localhost:30772/

MIRAK_URL

MirakurunのURL

デフォルト値 http://localhost:40772/

EPG_URL

EPGStationのURL

デフォルト値 http://localhost:8888/

FFMPEG

ffmpegの実行ファイル

デフォルト値 ffmpeg

FFMPEG_OUTPUT

1であればffmpegの標準エラー出力をリダイレクト

デフォルト値 0

HLS_DIR

HLSを使う場合の一時出力先

デフォルト値 ./hls

PORT

待ち受けるポート番号

デフォルト値 23234

HOST

待ち受けるホスト

デフォルト値 localhost

INPUT_FILE

入力ファイル

フォント

丸ゴシック用にKosugiMaru(モトヤLマルベリ3等幅)、太丸ゴシック用に丸ゴシック用フォントを太らせたもの、ゴシック用にKosugi(モトヤLシーダ3等幅)が含まれています。

制約が厳しいBMLではスペースによるレイアウトがよく使われるためフォントは仕様で規定されている通り等幅であることが必須です。 (UnicodeではなくJISコード基準なので記号なども全角幅であるべき)

実装

STD-B24, TR-B14, TR-B15の仕様を部分的に実装しています。

一部のイベント(CCStatusChanged、MediaStopped)やAPIなどは現状未実装です。