Last active
August 5, 2021 20:20
-
-
Save positlabs/f109262794a9662a828e480bc70faa05 to your computer and use it in GitHub Desktop.
FFMPEG audio conversion for Spark AR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# This command converts audio according to the specifications listed in the Spark docs: | |
# https://sparkar.facebook.com/ar-studio/learn/documentation/docs/audio | |
# mono m4a, 44.1kHz sample rate, 16-bit-depth resolution | |
# Usage: | |
# convert-audio.sh myaudio.mp3 converted.m4a | |
# Notes: | |
# Always use m4a for output file type | |
# Change "64k" to a higher value to improve bitrate/quality. e.g. 96k 128k 192k | |
ffmpeg -i $1 -ac 1 -ar 44.1k -b:a 64k $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you! This works perfectly. Got my audio working on iPhone.