Skip to content
Andrew Grathwohl edited this page Dec 29, 2017 · 15 revisions

Quick Start Guide (macOS)

System Setup

macOS users will need to use brew in order to install the required software. If you do not have brew, getting it is as simple as running the following in your terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Once this command has completed, go ahead and run these brew commands in order:

# Update brew's package repository so that we get the most up-to-date software

brew update


# Install FFmpeg and make sure to include all available build flags for full codec coverage

brew reinstall ffmpeg --with-fdk-aac --with-sdl2 --with-freetype --with-frei0r --with-libass --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-theora --with-tools


# Install MP4Box, GPAC's MP4 authoring libraries

brew install mp4box


# Install Node/npm

brew install node

Install the encoder

To use the encoder, simply run this command from the terminal:

npm install littlstar/ls-psvr-encoder -g

This installs the lspe binary into your /usr/local/bin. To verify the install was successful, run lspe -h. If you get a help output like the one below, then you're gluten! If you get an error from Node, verify that you're running Node LTS (8.9.0), as older Node versions are not compatible.

Usage: index.js -i /path/to/video.mp4 [options]

Options:
  -i, --input            Input video path                             [required]
  -d, --degrees          Specify video degrees, or 0 for flat/fixed-frame
                                               [required] [choices: 0, 180, 360]
  -t, --type             Input video type
                          [choices: "sbs", "ou", "mono", "2d"] [default: "mono"]
  -p, --platform         Specify the platform target
            [choices: "psvr", "gear", "daydream", "windowsmr"] [default: "psvr"]
  -s, --subtitles        Path to subtitle track to overlay on top of video (2dff
                         only)
  -o, --outputDirectory  Output directory (default: same as input path)
  -h, --help             Show help                                     [boolean]

Examples:
  node index.js -i myvideo.mp4 -d 360 -t    encode 360 degree monoscopic video;
  mono                                      outputs to same dir as input
  node index.js -i myvideo.mp4 -d 180 -t    encode 180 degree over-under
  ou                                        stereoscopic video
  node index.js -i myvideo.mp4 -d 360 -t    encode 360 degree side-by-side
  sbs -o /work/encodes                      stereoscopic video, output to
                                            /work/encodes directory
  node index.js -i myvideo.mp4 -d 0 -t 2d   encode a 2D flat video with
  -p windowsmr -s mysubtitles.srt           overlayed subtitles for viewing in
                                            theater mode for Windows MR

Email [email protected] for assistance/accolades.

Copyright 2018 Little Star Media, Inc.

Usage Examples

Now, let's try encoding a video.

Encode a 180 degree side-by-side stereoscopic video by invoking the -d and -t flags:

lspe -i ~/Desktop/my180sbsvideo.mp4 -d 180 -t sbs

Encode a 360 degree over-under stereoscopic video like so:

lspe -i ~/Desktop/my360ouvideo.mp4 -d 360 -t ou

Encode a 2d fixed-frame video by entering the following:

lspe -i ~/Desktop/my2dffvideo.mp4 -d 0 -t 2d

Add the -s flag to overlay some subtitles (feature available for 2d fixed-frame videos only):

lspe -i ~/Desktop/my2dffvideo.mp4 -d 0 -t 2d -s ~/Desktop/my2dffsubtitles.srt

See the support tables section for a breakdown of all video flags/options.

Clone this wiki locally