File | Date | Author | Commit |
---|---|---|---|
android | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
doc | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
res | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
src | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
CHANGES.txt | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
LICENSE | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
Makefile | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
README.md | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
TODO.md | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
fmedia.conf | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
help-tui.txt | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
help.txt | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
help_DE.txt | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
help_ES.txt | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
help_FR.txt | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
help_ID.txt | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
help_RU.txt | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
makerules | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
test.sh | 2021-03-04 |
![]() |
[d349fe] v1.23.1 |
fmedia is a fast media player/recorder/converter for Windows, macOS, Linux and FreeBSD.
It provides smooth playback and recording even if devices are very slow.
It's highly customizable and can be easily extended with additional plugins.
Its low CPU & memory consumption saves energy when running on a notebook's battery.
Play or convert audio files, record new audio tracks from microphone, save songs from Internet radio, and much more!
fmedia is free and open-source project, and you can use it as a standalone application or as a library for your own software.
fmedia can read: .mp3, .ogg (Vorbis, Opus), .opus, .mp4/.m4a/.mov (AAC, ALAC, MPEG), .mka/.mkv (AAC, ALAC, MPEG, Vorbis), .caf (AAC, ALAC), .avi (AAC, MPEG), .aac, .mpc, .flac, .ape, .wv, .wav.
fmedia can write: .mp3, .ogg, .opus, .m4a (AAC), .flac, .wav, .aac (--stream-copy only).
Audio I/O:
I/O:
Containers:
Lossy codecs:
Lossless codecs:
Playlists:
Other:
fmedia uses modified versions of these 3rd party libraries: libALAC, libfdk-aac, libFLAC, libMAC, libmp3lame, libmpg123, libmpc, libogg, libopus, libsoxr, libvorbisenc, libvorbis, libwavpack, libDynamicAudioNormalizer. See ff-3pt/README.txt
for details.
Unpack archive to the directory of your choice, e.g. to "C:\Program Files\fmedia"
fmedia-1.0-win-x64.zip
) in ExplorerOptionally, run the following command from console (cmd.exe):
"C:\Program Files\fmedia\fmedia.exe" --install
This command will:
* add fmedia directory into user's environment
* create a desktop shortcut to fmedia-gui.exe
Run fmedia-gui.exe
to open graphical interface; or execute commands via fmedia.exe
from console (cmd.exe).
Unpack archive to the directory of your choice, e.g. to /usr/local/fmedia-1
:
tar Jxf ./fmedia-1.0-linux-amd64.tar.xz -C /usr/local
Optionally, create a symbolic link:
ln -s /usr/local/fmedia-1/fmedia /usr/local/bin/fmedia
Run fmedia --gui
to open graphical interface; or execute commands via fmedia
from console.
Requirements:
Create a directory for all needed sources:
mkdir fmedia-src && cd fmedia-src
Download all needed source repositories:
git clone https://github.com/stsaz/ffbase
git clone https://github.com/stsaz/ffaudio
git clone https://github.com/stsaz/ffos
git clone https://github.com/stsaz/ff
git clone https://github.com/stsaz/ff-3pt
git clone https://github.com/stsaz/avpack
git clone https://github.com/stsaz/fmedia
Note: builds from the latest master
branch are not supported and may not work!
To build a working package you should checkout a specific git tag for fmedia (e.g. v1.19
) and then checkout the corresponding git tags for ff* repos with the same release date (e.g. v20.08
).
Build ff-3pt package (3rd-party libraries) or download pre-built binaries. See ff-3pt/README.txt
for details.
Build fmedia:
cd fmedia
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../ff-3pt-bin/linux-amd64
make install
You can explicitly specify path to each of FF source repositories, e.g.:
make install FFOS=~/ffos FF=~/ff FF3PT=~/ff-3pt
Default architecture is amd64. You can specify different target architecture like this:
make install ARCH=i686
You'll also need to specify the proper path to ff-3pt binaries in LD_LIBRARY_PATH
.
Ready! You can copy the directory ./fmedia-1
anywhere you want (see section "INSTALL ON LINUX").
You can build fmedia without dependencies on 3rd-party libraries. This will be a very small package without audio (de)compression features. Follow these steps:
1-2. Repeat previously described steps.
Run this command:
make install-nodeps
Edit fmedia.conf
and manually remove all modules that require 3rd-party libraries.
1-3. See section "BUILD ON LINUX".
Build with mingw (64-bit):
cd fmedia
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../ff-3pt-bin/win-amd64
mingw64-make OS=win CPREFIX=x86_64-w64-mingw32- install
Build with mingw (32-bit):
cd fmedia
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../ff-3pt-bin/win-i686
mingw32-make OS=win ARCH=i686 CPREFIX=i686-w64-mingw32- install
Ready!
The global configuration file fmedia.conf
is located within the fmedia directory itself. It contains all supported settings and their default values. You must restart fmedia after you make changes to this file.
Additional settings may be stored in file fmedia-ext.conf
. This makes it easier to upgrade fmedia without the need to edit fmedia.conf
.
Per-user configuration settings are also supported, they must be stored in fmedia-user.conf
file in home directory:
Windows: %APPDATA%/fmedia/fmedia-user.conf
Linux: $HOME/.config/fmedia/fmedia-user.conf
Settings for a module must be in format "so.module.key value", e.g. to overwrite the global setting for OGG Vorbis encoding quality you should write:
vorbis.encode.quality "7.0"
Core configuration settings start with "core.", e.g. set codepage for non-Unicode text:
core.codepage win1252
While extracting a track from the album in FLAC using CUE sheet, the audio is first decoded to PCM and then re-encoded with FLAC. This behaviour won't result in any audio quality loss since FLAC is a lossless codec.
By default fmedia runs with a terminal UI, which shows information about the currently playing audio track and the currently playing audio position. User commands such as seeking are also supported, all supported commands are described in file "help-tui.txt".
To run fmedia in GUI mode (Windows and Linux) you may execute the console binary like this:
fmedia --gui
Or use this special executable file (Windows only):
fmedia-gui.exe
You should use this binary file for opening files via Explorer's "Open With..." feature.
Note: command-line options are not supported.
fmedia GUI is provided by a separate module - gui.dll. It is written in such a way that it won't become unresponsive even if the main thread (the one that processes audio) is waiting for I/O operations. The module doesn't perform any sound processing, it just issues commands to fmedia core and receives the feedback.
fmedia GUI is highly customizable, thanks to FF library that is used under the hood. FF UI technology allows you to modify properties of every UI control: windows, buttons, menus, tray icons and more. You may resize controls, set different styling, change any text, hotkeys, etc. All this information is stored within "fmedia.gui" which is a plain text file. After you make some changes in fmedia.gui, save it and then restart fmedia.
By default fmedia GUI saves its state in file "%APPDATA%\fmedia\fmedia.gui.conf"
. You can change this by setting "portable_conf" to "true" in fmedia.conf. After that, "fmedia.gui.conf" will be stored in program directory (e.g. "C:\Program Files\fmedia\fmedia.gui.conf"
), thus making fmedia completely portable.
Note the difference between UNIX and Windows terminals when you use special characters and spaces:
Use single quotes ('') on Linux (sh, bash), e.g.:
fmedia './my file.ogg'
fmedia file.wav -o '$filename.ogg'
Use double quotes ("") on Windows (cmd.exe), e.g.:
fmedia "./my file.ogg"
Play files, directories, Internet-radio streams
fmedia ./file.ogg ./*.mp3
fmedia ./Music
fmedia http://radio-stream:80/
Play (mix) multiple streams simultaneously
fmedia --mix ./file1.ogg ./file2.ogg
Play wav file with a corrupted header
fmedia ./file.raw --fseek=44
Convert with parameters
fmedia ./file.ogg --out=./file.wav --format=int16
fmedia ./file.wav --out=./file.ogg --vorbis.quality=7.0
fmedia ./file.wav --out=./file.mp3 --mpeg-quality=0 --rate=48000
Convert all .wav files from the current directory to .ogg
fmedia ./*.wav --out=.ogg
Convert file and override meta info
fmedia ./file.flac --out=.ogg --meta='artist=Artist Name;comment=My Comment'
Extract several tracks from .cue file
fmedia ./album.flac.cue --track=3,7,13 --out='$tracknumber. $artist - $title.flac'
Split audio file
fmedia ./file.wav --seek=00:35 --until=01:35 --out=./file-1.wav
Cut compressed audio without re-encoding
fmedia ./file.ogg --out=./out.ogg --seek=1:00 --until=2:00 --stream-copy
Copy left channel's audio from a stereo source
fmedia ./stereo.ogg -o left.wav --channels=left
Change sound volume in an audio file
fmedia --gain=5.0 ./file.wav --out=./file-loud.wav
Capture audio from the default audio input device until stopped
fmedia --record --out=rec.flac
Record with the specific audio format
fmedia --record -o rec.wav --format=int24 --channels=mono --rate=48000
Record for 60 seconds then stop
fmedia --record --out=rec.flac --until=60
Record while playing
fmedia ./file.ogg --record --out=./rec.wav
Live output
fmedia --record
Record audio from Internet radio (without re-encoding)
fmedia http://radio-stream:80/ -o ./radio.mp3 --stream-copy
Play AND record audio from Internet radio into separate files (without re-encoding)
fmedia http://radio-stream:80/ --out-copy -o './$time. $artist - $title.mp3' --stream-copy
Print audio meta info
fmedia --info ./file.mp3
Print audio meta info and all tags
fmedia --info --tags ./file.mp3
Show PCM information
fmedia input.ogg --pcm-peaks
Create a playlist file from directory:
fmedia ./Music -o music.m3u8
fmedia can be used as a sound library: you can freely use its abilities in your own software. And you don't have to build fmedia by yourself to use its features. All you need to do is link your binary file with core.so
(or core.dll
) and you'll be able to do everything that fmedia can: playback, record and convert audio from your application.
You may add support for a new audio format into fmedia. To do that you have to add your module into "fmedia.conf" and add an appropriate file extension into "input_ext" or "output_ext" section.
For example, after you have built your module (e.g. xyz.so
), add it into "fmedia.conf":
mod "xyz.decode"
Then associate it with ".xyz" file extension:
input_ext {
...
"xyz.decode" xyz
}
fmedia will call module "xyz.decode" each time user orders fmedia to play "*.xyz" files.
See fmedia source code for more details. For example, main.c::main() will show you how fmedia command line binary initializes core module. See acodec/wav.c for an example on how to write a simple filter for fmedia.
If you'd like to use low level interfaces, take a look at the source code of FF & FF-3pt libraries. Together they provide you with an easy interface that you can use to work with a large set of file formats, decode or encode audio and much more. fmedia itself is built upon FF library - it's completely free and open-source.
You are welcome to participate in fmedia's development. Send suggestions, improvements, bug reports, patches - anything that can help the project!
Understanding the top-level source code hierarchy can help you to get involved into fmedia quicker. The source code consists of these separate repositories:
------------------------
fmedia
------------------------
ff |
--------------| avpack, ffaudio
ffos, ff-3pt |
------------------------
ffbase
------------------------
Each of them plays its own part:
If you encounter a bug, please report it: the more issues will be reported by users, the more stable fmedia will become. When filing a bug report try to provide information that can help us to fix the problem. Try to execute the same command once again, only this time add --debug switch, e.g.:
fmedia --debug OPTIONS INPUT_FILES...
It will print a lot of information about what fmedia is doing. This info or a screenshot would be very helpful.