Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
FFMPEG audio conversion for Spark AR
#! /bin/bash
# This command converts audio according to the specifications listed in the Spark docs:
# mono m4a, 44.1kHz sample rate, 16-bit-depth resolution
# Usage:
# 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

This comment has been minimized.

Copy link
Owner Author

@kamend kamend commented Aug 20, 2020

ffmpeg -i audio.wav -ar 44100 -ac 1 output.m4a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment