@bubltechnology/spherical-metadata
A port of google's [spatial media tools](https://github.com/google/spatial-media/tree/master/spatialmedia) to JS
Last updated 4 years ago by turbobeast .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @bubltechnology/spherical-metadata 
SYNC missed versions from official npm registry.

spherical-metadata

A port of google's spatial media tools to JS

CircleCI js-standard-style Build Status

npm version

License

Using the library

  npm install @bubltechnology/spherical-metadata

injectMetadata

Inject spherical metadata into an MP4 file

const sphericalMetadata = require('@bubltechnology/spherical-metadata')

sphericalMetadata.injectMetadata({
  source: 'equi.MP4',
  destination: 'equi-with-metadata.MP4',
  software: 'Bubl',
  projection: 'equirectangular',
  sourceCount: 4
}).catch((err) => {
  console.log(`Error occurred while injecting metadata: ${err}`)
}).then(() => {
  console.log('Metadata injection completed')
})

Options

{
  stereo: 'top-bottom' || 'left-right',
  crop: {
    CroppedAreaImageWidthPixels: pixelValue,
    CroppedAreaImageHeightPixels: pixelValue,
    FullPanoWidthPixels: pixelValue,
    FullPanoHeightPixels: pixelValue,
    CroppedAreaLeftPixels: pixelValue,
    CroppedAreaTopPixels: pixelValue
  },
  software: String,
  projection: 'equirectangular',
  sourceCount: Number,
  source: filePath,
  destination: filePath
}

readMetadata

Read the spherical metadata currently in an MP4 file and return an options object

const sphericalMetadata = require('@bubltechnology/spherical-metadata')
sphericalMetadata.readMetadata(value).then((data) => {
  console.log(data)
})

License

Apache 2.0

Current Tags

  • 1.0.1                                ...           latest (4 years ago)

2 Versions

  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 2
Dependencies (4)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |