Skip to content

Instantly share code, notes, and snippets.

@vergissberlin
Created April 1, 2018 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vergissberlin/23f1e32571f86da0167f2b3b7d4eda58 to your computer and use it in GitHub Desktop.
Save vergissberlin/23f1e32571f86da0167f2b3b7d4eda58 to your computer and use it in GitHub Desktop.
Convert WAV files to OpenTX compatible WAV files
#!/bin/bash
mkdir -p converted
for i in *.wav;
do name=`echo $i | cut -d'.' -f1`;
echo $name;
ffmpeg -i "$i" -acodec pcm_s16le -ar 32000 -ac 1 "converted/${name}.wav";
done
@vergissberlin
Copy link
Author

vergissberlin commented Apr 1, 2018

Requirements

  • ffmpeg (brew install ffmpeg)
  • Create records in wav format

Using

  • Open terminal
  • Change to the directory with the wav files cd your/path
  • Download the gist file wget https://gist.githubusercontent.com/vergissberlin/23f1e32571f86da0167f2b3b7d4eda58/raw/718f6b9e5951f29404fbad5dede0cfa6b9c96489/convert-optentx.sh
  • Run the script bash convert-opentx.sh
  • Copy the files from the folder "converted" to your SD card

File name

Take care that the files names fits to following rules:

  • File Name: 123456.wav (up to 6 characters plus .wav)

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