Skip to content

Instantly share code, notes, and snippets.

@cgons
Created January 16, 2026 22:57
Show Gist options
  • Select an option

  • Save cgons/b1b317ac5c847b17f413ddf3e337e005 to your computer and use it in GitHub Desktop.

Select an option

Save cgons/b1b317ac5c847b17f413ddf3e337e005 to your computer and use it in GitHub Desktop.
M4A to MP3 (for voip.ms voicemail recordings)
#!/bin/bash
# Convert m4a files to MP3 (for VoIP.ms voicemail recordings) via FFmpeg.
# ---
INPUT_FILE="$1"
# Extract filename without extension
BASENAME=$(basename "$INPUT_FILE" .m4a)
OUTPUT_FILE="${BASENAME}.mp3"
# Convert using ffmpeg
# -i: Input file
# -codec:a libmp3lame: Use LAME MP3 encoder
# -ac 1: Mono channel
# -ar 44100: Sample rate 44.1kHz (Standard compatibility)
# -b:a 128k: Bitrate 128kbps
ffmpeg -i "$INPUT_FILE" -codec:a libmp3lame -ac 1 -ar 44100 -b:a 128k "$OUTPUT_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment