-
Notifications
You must be signed in to change notification settings - Fork 15
Home
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 nodeTo use the encoder, simply run this command from the terminal:
npm install littlstar/ls-psvr-encoder -gThis 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!
Usage: lspe -i /path/to/video.mp4 [options]
Options:
-i, --input Input video path [required]
-d, --degrees Specify video degrees [choices: 180, 360]
-t, --type Input video type [choices: "sbs", "ou", "mono"]
-o, --outputDirectory Output directory (default: same as input path)
-h, --help Show help [boolean]
Examples:
lspe -i encode myvideo.mp4 with default
myvideo.mp4 options (360 degrees, monoscopic,
outputs to same dir as input)
lspe -i encode 180 degree over-under
myvideo.mp4 -d 180 -t ou stereoscopic video
lspe -i encode 360 degree side-by-side
myvideo.mp4 -d 360 -t sbs -o stereoscopic video, output to
/work/encodes /work/encodes directory
Email [email protected] for assistance/accolades.
Copyright 2017 Little Star Media, Inc.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 sbsEncode a 360 degree over-under stereoscopic video like so:
lspe -i ~/Desktop/my360ouvideo.mp4 -d 360 -t ouEncode a 2d fixed-frame video by entering the following:
lspe -i ~/Desktop/my2dffvideo.mp4 -d 0 -t 2dAdd 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