Skip to content

Instantly share code, notes, and snippets.

@wrannaman
Created September 12, 2017 21:32
Show Gist options
  • Save wrannaman/a4dcaebbe0cb5e08a5f7f370f5f226b7 to your computer and use it in GitHub Desktop.
Save wrannaman/a4dcaebbe0cb5e08a5f7f370f5f226b7 to your computer and use it in GitHub Desktop.
Play audio (remote or local file) through axis speaker
ffmpeg -i https://s3-us-west-1.amazonaws.com/bucket/audio/file.wav \
-probesize 32 \
-analyzeduration 32 -c:a pcm_mulaw -ab 128k -ac 1 \
-ar 16000 -f wav -chunked_post 0 \
-content_type audio/axis-mulaw-128 \
http://root:[email protected]/axis-cgi/audio/transmit.cgi
@hausmanconsulting
Copy link

I hope you don't mind a comment here; I was getting a click at the beginning of my wav files using this code, and changing the -f option to s16le solved it, in case that helps anyone.

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