Global Transcoder for WAV/FLAC/AIFF Data
By: @RoderickQiu, @CypherBruce, @SheepDoctor
This project is a command line tool for converting audio files between different formats built using C++, supporting RAW, WAV, FLAC and AIFF.
- Basic parts
- Metadata display & edit for FLAC,
type 0 (STREAMINFO)
andtype 4 (VORBIS_COMMENT)
. - RAW to WAV convertor support, with file info contained in
INI
format. - WAV to FLAC convertor support, using
verbatim predictor
with channel assignment of2 channels: left
, withSTREAMINFO
andVORBIS_COMMENT
metadata, 16Bit int or 24Bit int. - FLAC to WAV convertor support, with
STREAMINFO
andVORBIS_COMMENT
metadata andverbatim subframes
. - WAV to RAW convertor support.
- Metadata display & edit for FLAC,
- Bonus parts
- Excellent Project Management.
- We use
git
andGitHub
to manage our project, with clear commit messages. - We use
CLion
as our IDE, and have a unified code formatter ruleset. - We use
CMake
to build our project.
- We use
- More Metadata Block Types.
- Parsing and editing support for
PADDING
block, and it will be shortened if the previous block enlarges. - Parsing support for
APPLICATION
andSEEKTABLE
block.- Here we didn't implement editing support for application and seek table blocks, because we think it is only meaningful to edit them when the project also works as a FLAC editor.
- Parsing and editing support for
- Extreme Robustness.
MD5
signature andCRC
check support.- Exception handling and memory management optimizations.
- Passed
Google Sanitizer
check with no warnings.
- GUI.
- Support for all functions of this app.
- Should support both Windows and macOS.
- With an elegant and intuitive interface.
- More Audio Formats.
- Extra support for AIFF file format. Cool!
- Anything You Regard as "Bonus".
- Various playing speed!
- Slowing done or fasting the audio are supported!
- Various playing speed!
- Excellent Project Management.
- RoderickQiu (A): Project structure, Flac metadata reading and editing, AIFF conversion, GUI.
- SheepDoctor (A): RAW conversion, WAV to FLAC conversion, File IO supporter lib.
- Cypher-Bruce (A): FLAC to WAV conversion, CRC and MD5 signature support, File IO supporter lib.
cmake .
make
Should work for both Windows, macOS and Linux.
- For all modes:
-h
or--help
: print help message-m
or--mode
:w2f
for wav to flacf2w
for flac to wavf2r
for flac to rawr2f
for raw to flacr2w
for raw to wavw2r
for wav to raww2a
for wav to aiffa2w
for aiff to wava2f
for aiff to flacf2a
for flac to aiffa2r
for aiff to rawr2a
for raw to aifffm
for flac meta data readingfe
for flac meta data editing
-i
or--input
: input file path-o
or--output
: output file path-t
or--temp
: manually indicate a preferred temp directory
- For
raw
input files (e.g.r2w
,r2f
):-c
or--config
: config ini file path forraw
files
- For
w2f
mode only:-v
or--velocity
: play speed- argument is the speed of the output file
- a float number between 0 and 1
- For
fe
mode (Flac meta data editing):-mv
or--modify-vendor
: modify vendor- argument is the vendor string to modify
-mc
or--modify-comment
: modify comment- need two arguments
- the first one is the comment content
- the second one is the comment index to alter
- need two arguments
-ac
or--append-comment
: append comment- argument is the comment content to append
- if you have multiple comments, use a simple
;
without space to split
-rc
or--remove-comment
: remove comment- argument is the comment index to remove
We suggest that testers use absolute paths for the input and output files.
# flac meta data editing
gtwd -m fe -i yourPathToInputFlac -o yourPathToOutputFlac -mv newVendor -ac yourCommentToAppend
# flac meta data reading
gtwd -m fm -i yourPathToInputFlac
# convert raw to wav (ovs.pcm)
gtwd -m r2w -i yourPathToInputRaw -o yourPathToOutputWav -c yourPathToCorrespondingIni
# convert wav to flac (ovs.wav)
gtwd -m w2f -i yourPathToInputWav -o yourPathToOutputFlac -mv yourVendor -ac yourCommentToAppend
# convert flac to wav (ovs.flac)
gtwd -m f2w -i yourPathToInputFlac -o yourPathToOutputWav
# convert flac to raw (ovs.flac)
gtwd -m f2r -i yourPathToInputFlac -o yourPathToOutputRaw
# convert: aiff to flac (ovs.aiff)
gtwd -m a2f -i yourPathToInputAiff -o yourPathToOutputFlac
If it is reported that "Error getting temp folder from environment variables" when executing gtwd
, please manually
add -t
flag to the command line to indicate a preferred temp folder. It is because the default temp folder is not
available in some environments.
gtwd -m f2w -i yourPathToInputFlac -o yourPathToOutputWav -t yourTempPath
- Flac Metadata
ProvidedDocuments/flac/mono.flac
- RAW -> WAV -> FLAC
ProvidedDocuments/raw/ovs.pcm
withProvidedDocuments/raw/ovs.ini
ProvidedDocuments/wav/ovs.wav
- FLAC -> WAV -> RAW
ProvidedDocuments/flac/ovs.flac
ProvidedDocuments/wav/ovs.wav
- More Metadata
ProvidedDocuments/metadata/application.flac
forAPPLICATION
,ProvidedDocuments/raw/seektable.flac
forSEEKTABLE
andProvidedDocuments/raw/padding.flac
forPADDING
blocks
- AIFF
ProvidedDocuments/aiff/mint16.aif
,ProvidedDocuments/aiff/mint24.aif
andProvidedDocuments/aiff/mint32.aif
, each with different bit depthProvidedDocuments/aiff/ovs.aiff
- Different Velocity
ProvidedDocuments/wav/ovs.wav
- Robustness Test
ProvidedDocuments/robust/*
The GUI is built using Electron
, so you need to install Node.js
first, and run the following commands.
cd Gui
npm install
npm run start
The GUI is intuitive to use, and support all formats. View a screenshot of it at here.
If you are not using Windows x86_64
or macOS arm64
, you may need to alternate the executive of gtwd
used, which is
put under Gui/exec
folder.
If you cannot install electron
due to the limit of your network, you can use the following commands to indicate an
alternative source:
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
In this project, we have used the following open source libraries:
- Clipp - cross-platform command line interfaces for modern C++.
- Licensed under the MIT License.
- Copyright (c) 2017-2018 André MÜLLER.
- SimpleIni - allows an INI-style configuration file to be used on both
Windows and Linux/Unix.
- Licensed under the MIT License.
- Copyright (c) 2013-2023 Brodie THIESFIELD.
- Using
ConvertUTF
in the lib.- Copyright 2001-2004 Unicode Inc.
Also, in this project, we use CLion
as our IDE, thanks to their free educational plan.
Thanks for Prof. Feng ZHENG for his C++ class. Thanks for the efforts of TAs of the class, especially Kangrui CHEN and Site FAN.
You may ask why the project is named GTWD?
It actually originated in the famous saying:
GuTao[1] tastes good, no need for salt.