Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following example extracts 30 seconds of audio data (starting from a specific offset), re-samples the audio to 22kHz and stores the result as WAV file. Total download for this example is about 600kb17MB out of a ~800MB file.

Code Block
languagebash
# setup auth for ffmpeg 
APIKEY="your api key here"
AUTH=$(echo "apikey:$APIKEY" | base64)
ffmpeg \
  -ss 00:00:30 -t 00:00:30 \
  -multiple_requests 1 -seekable 1 \
  -headers "Authorization:  Basic $AUTH" \
  -i "https://data.tern.org.au/ecoacoustics/CapeTribulation/CapeTribulation01/audio_files/2018/01/capetrib-FNQ2-DRO_20180101_034910.flac" \
  -af aresample=resampler=soxr \
  -ar 22000 \
  test.wav

...