The LBRY format is an application format designed to promote interoperability and transmission of complex digital media.
Go to file
2020-02-03 17:03:44 -05:00
examples add usage examples 2019-06-23 21:39:09 +01:00
.gitignore Initial commit 2019-01-03 22:08:57 -06:00
index.js add option to pack template 2019-06-23 20:58:00 +01:00
lbry-format.js Update name in help command 2019-12-27 06:40:25 +13:00
LICENSE Update LICENSE 2020-02-03 04:07:33 +07:00
package-lock.json Add bin CLI tool 2019-03-28 21:49:05 -05:00
package.json Add bin CLI tool 2019-03-28 21:49:05 -05:00
README.md Merge pull request #1 from upsided/master 2019-03-31 23:24:05 -05:00
templates.js add usage examples 2019-06-23 21:39:09 +01:00

LBRY File Format

The LBRY format is a multimedia-format designed to promote interoperability and transmission of complex digital media.

This repo contains some tools & libraries for working with *.lbry files.

CLI Installation

Requires: NodeJS, Git

Windows: npm i -g https://github.com/lbryio/lbry-format
Mac / Linux: sudo npm i -g https://github.com/lbryio/lbry-format

Once installed, run lbry-format --help

CLI Usage

lbry-format pack ./sourceDirectory ./outputPackage.lbry

What It's For

A lbry-format file is a compressed web site, much like a zip file. More specifically, it's a directory of files individually zipped with Zstandard, then collected into a tar archive.

It is recognized and launched by the LBRY-desktop app to enable rich, interactive media in the client.

When the LBRY desktop app encounters the .lbry extension, and the user presses "play," it decompresses the .lbry file, launches a sandboxed web server in the background, and 'serves up' this file like a real web server might.

This enables a lot of possibilities. To see what is currently possible with this format, check out the LBRY channel @OpenSourceGames.

There are more restrictions to a .lbry archive than normal websites, because of the security issues and the fact that it's not running on a domain.

Name

  • Name Format: *.lbry
  • Character Set: UTF-8
  • Extension: lbry

Metadata

  • Media Type: application/x-lbry

Container

  • Compression: Zstandard
  • Archival: tar

Contents

Descriptor

  • Format: JSON, UTF-8

lbry-format

Requirements

Usage

WARNING: These method signatures will change as the JSON Descriptor is finalized.

Install npm i https://github.com/lbryio/lbry-format.git

Pack

const lbryFormat = require('lbry-format');

// Pack `./` to `package.lbry`
lbryFormat.packDirectory('./', {
  fileName: 'package.lbry',
});

Unpack

const lbryFormat = require('lbry-format');

// Unpack `package.lbry` to `./`
lbryFormat.unpackDirectory('./', {
  fileName: 'package.lbry',
});