This program uses ffprobe
and ffmpeg
to do this:
ffprobe
gets info about audio streams and used for validation;ffmpeg
gets audio stream and saves it in appropriate format.
- Linux/Windows: https://github.com/BtbN/FFmpeg-Builds/releases
- MacOS:
- Intel: https://evermeet.cx/ffmpeg
- Apple Silicon/Intel: https://www.osxexperts.net
audio-from-video --ffprobe-path /opt/homebrew/bin/ffprobe --ffmpeg-path /opt/homebrew/bin/ffmpeg --format wav --input video.mp4 --output files/ --output-sample-rate 16000 --output-channels 1
You need: cargo, rustc, cross, podman, goreleaser.
- build images and increase resources for podman:
podman build --platform=linux/amd64 -f dockerfiles/Dockerfile.aarch64-unknown-linux-gnu -t aarch64-unknown-linux-gnu:my-edge .
podman build --platform=linux/amd64 -f dockerfiles/Dockerfile.x86_64-unknown-linux-gnu -t x86_64-unknown-linux-gnu:my-edge .
- make binaries:
goreleaser build --clean --snapshot --id audio-from-video --timeout 60m