Getting Started with fmedia — Installation, Basics, and Tipsfmedia is a compact, fast command-line audio player, recorder and converter designed for power users who prefer minimal, scriptable tools. It supports many audio formats, low-latency playback, flexible routing, and batch processing — making it useful for audio work on servers, embedded systems, and desktop environments where a GUI is unnecessary.
What fmedia is good for
- Lightweight playback and recording with low resource usage.
- Format conversion between common audio formats (WAV, FLAC, MP3, OGG, Opus, etc.).
- Batch processing and scripting, enabling automated workflows.
- High-performance streaming and piping, suitable for real-time use cases.
- Flexible input/output routing including device selection and file output.
Installation
Below are common methods to install fmedia on major platforms. Choose the method that fits your system.
Linux (Debian/Ubuntu)
- If a packaged .deb is available for your distribution, download it and install:
sudo dpkg -i fmedia_<version>_amd64.deb sudo apt-get -f install
- Alternatively, download the static binary from the official releases, extract, and place it into /usr/local/bin:
tar xvf fmedia-<version>-linux-x86_64.tar.gz sudo mv fmedia /usr/local/bin/ sudo chmod +x /usr/local/bin/fmedia
Linux (Arch/Manjaro)
- Use the AUR package (if available):
yay -S fmedia
macOS
- Use Homebrew if formula exists:
brew install fmedia
- Or download the macOS binary, make it executable and move to /usr/local/bin:
chmod +x fmedia sudo mv fmedia /usr/local/bin/
Windows
- Download the ZIP package from releases, extract, and add the folder to your PATH or place the executable in a directory already in PATH.
- Use PowerShell to run fmedia from the extracted folder or install via Chocolatey if a package exists:
choco install fmedia
From source
- If you need to build from source, follow the project’s build instructions (typically found in README). Building provides the latest fixes but requires development tools.
Basic usage and commands
fmedia’s CLI style is compact: you typically specify an action (play, record, convert) followed by options and file names.
Play audio
fmedia myfile.mp3
This plays the specified file with default output device.
List supported input/output devices (useful when multiple sound cards exist)
fmedia -devices
Record audio from default device to WAV
fmedia -recout out.wav -rec
Record from a specific device (example device name shown; get exact name from -devices)
fmedia -recdev "hw:0,0" -recout mic.wav -rec
Convert file format (e.g., WAV to FLAC)
fmedia track.wav -o track.flac
Batch convert multiple files
fmedia *.wav -o *.flac
Show file information (metadata, sample rate, channels)
fmedia -i track.flac
Adjust volume for playback (example: reduce to 80%)
fmedia track.mp3 -vol 0.8
Use pipes for streaming between programs
fmedia -o - track.wav | some-other-tool -
Here -o -
outputs to stdout so another process can read the raw stream.
Common options explained
- -i / -info: Show file info and metadata.
- -o: Output file (or
-
for stdout). - -rec: Start recording.
- -recout: File path for recording.
- -recdev: Specify recording device.
- -vol: Set playback volume (0.0–1.0+).
- -devices: List available audio devices.
- -threads: Control threading for conversion/performance.
- -format/codec options: Choose specific encoding parameters (see fmedia docs for exact flags per codec).
Example workflows
-
Convert a folder of WAV files to FLAC with preserved names:
fmedia /path/to/wavs/*.wav -o /path/to/flacs/*.flac
-
Record a podcast segment, normalize and encode to MP3:
fmedia -recout raw.wav -rec fmedia raw.wav -normalize -o normalized.wav fmedia normalized.wav -mp3 192k -o episode01.mp3
-
Real-time piping: capture mic and stream to another tool for processing
fmedia -recdev "YourDeviceName" -recout - | audio_processor -
Tips and best practices
- Use device listing first (-devices) to find exact device strings for select input/output devices.
- When scripting, prefer absolute paths to avoid confusion with working directories.
- For batch jobs, test on a single file first to confirm parameters, then run the pattern.
- Monitor CPU usage when converting large batches; use -threads to tune concurrency.
- Keep separate folders for intermediate files (raw recordings) and final outputs to avoid accidental overwrites.
- If you need metadata editing, check whether fmedia supports the specific tags; otherwise use dedicated tools (eyeD3, metaflac) as part of the pipeline.
- When piping, specify formats explicitly if the downstream tool expects a particular sample rate/format.
Troubleshooting
- No sound: verify default output device and use -devices to choose a specific one. Also confirm system volume/mute.
- Permissions errors on Linux/macOS: ensure the binary is executable and you have permission to access audio devices (some systems require membership in an audio group).
- Format/codec unsupported: install necessary codecs or use a different tool for that format.
- Distorted recording: check sample rate and buffer settings; try a lower sample rate or different device.
Further reading and resources
- Official fmedia documentation and command reference (check project README and manual pages).
- Community examples and scripts for batch processing, podcast workflows, and real-time audio routing.
- Complementary CLI tools: ffmpeg (wider codec support), sox (editing/processing), and tag editors (eyeD3, metaflac).
fmedia is small but powerful — once you learn a few core commands (play, record, convert, -devices), you can stitch them together into reliable scripts for audio production, server-side processing, or embedded projects.
Leave a Reply