This repository has been archived by the owner on Feb 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.txt
421 lines (292 loc) · 16.4 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
README for acxi - a command line audio processing tool.
================================================================================
CODEBERG REPOS
--------------------------------------------------------------------------------
Please file issue reports or feature requests at:
https://codeberg.org/smxi/acxi
The Codeberg repos will be mirrored to Github until the end of 2023, after that,
no updates to github repos will be made. Some time after that, the code will be
removed.
Please take the time to read this helpful article from the Software Freedom
Conservancy:
https://sfconservancy.org/GiveUpGitHub/
Any use of this project's code by GitHub Copilot, past or present, is done
without my permission. I do not consent to GitHub's use of this project's code
in Copilot.
================================================================================
DOCUMENTATION RESOURCES
--------------------------------------------------------------------------------
acxi.changelog:
https://codeberg.org/smxi/acxi/raw/stable/acxi.changelog
For complete, up to date, current state of acxi development, features, and
fixes.
HTML changelog:
https://smxi.org/docs/acxi-changelog.htm
If you find the HTML version of the changelog easier to read.
HTML man page:
https://smxi.org/docs/acxi-man.htm
This is highly recommended for new users since it fairly complete and explains
most things reasonably completely, and has examples, etc.
HTML help menu:
https://smxi.org/docs/acxi-options.htm
Useful to get a quick overview of acxi options.
Debugging switches for --dbg, and other developer required data:
stable branch: docs/acxi-values.txt
================================================================================
INSTALLATION
--------------------------------------------------------------------------------
Easy way to install. Change paths on local system if required.
With acxi 3.2.16 or newer, self updater: sudo acxi -U
Or, to install the man and acxi files manually:
These are for GNU/Linux. These use a redirecting shortcut from smxi.org
sudo wget -O /usr/local/bin/acxi smxi.org/acxi
Then make executable:
sudo chmod +x /usr/local/bin/acxi
For man page:
sudo wget -O /usr/local/share/man/man1/acxi.1 smxi.org/acxi.1
If you prefer to use the full Codeberg paths:
Program:
sudo wget -O /usr/local/bin/acxi https://codeberg.org/smxi/acxi/raw/stable/acxi
Man page:
sudo wget -O /usr/local/share/man/man1/acxi.1 \
https://codeberg.org/smxi/acxi/raw/stable/acxi.1
If you want to use the -U self-updater option, both acxi and the man page must
be present on your system, and paths to them set either by placing them in the
default locations above, or adding the required configuration paths.
================================================================================
MAIN FEATURES
--------------------------------------------------------------------------------
acxi is a tool that syncs/converts lossless (flac, wav, raw) music libraries to
compressed (mp3,ogg,opus) versions of the lossless library. It also can convert
aif, raw, shn, and wav to flac. It also creates/checks md5, ffp files, tags your
collection, embeds images, gets tags from your collection, and much more. Read
the man page for specifics on how to use the features. Some are quite powerful
but have a significant learning curve to use effectively.
acxi is developed as features are requested or discovered useful. It will in
general 'just work' for as long as it's installed, though it is a good idea to
check for updates now and then since bugs get fixed, new features are added or
extended. Changes will not break existing configurations.
Most options where it makes sense have corresponding configuration items.
--------------------------------------------------------------------------------
TEST ACTIONS:
Using --dry-run/--dry/--test option allows you to see what acxi would have done
for syncing, tagging, and checksum creation actions, without actually running
those.
--------------------------------------------------------------------------------
SYNCING:
In its syncing role, acxi is used to process lossless collections of files
generated by programs like abcde, the audio cd ripping tool, and makes for very
easy updating/syncing of all your music collections.
It also copies over all associated data to the lossy synced collection, like
.txt, .jpg, .png files. You can add or remove these file types using either top
configurations, configuration file, -a [one or more comma separated extensions]
to add/apppend a file type temporarily, or -c [comma separated extension list]
to supply a new list. This results in you having a full copy of your originals
in compressed format.
You can set exclude filenames/directories so you don't add those undesired files
or folders to your synced collection. It further supports, via --clean, the
option to remove clutter from your lossy collection.
You can set all core variables, like compression rates, target and source
directories, and and so on.
For instance, say you have:
/home/fred/media/main
which contains your flac music directories, and you want to sync up your ogg
versions in:
/home/fred/media/ogg
You would run: acxi -s /home/fred/media/main -d /home/fred/media/ogg
and acxi would mirror the directory structure, copy over all the jpg, png, txt,
etc, type files, and then encode your flacs to ogg.
If your ogg, opus, or mp3, directory is located at:
/home/fred/media/main/ogg
that is, in your 'main' directory, acxi will handle that, and ignore that
directory when syncing.
If you run acxi routinely, it will just copy/sync over changed or new files.
Note that acxi will not change to a different compression level already
compressed versions, so if you want to change your compression levels, you have
to use the -f/--force option.
--------------------------------------------------------------------------------
TAGGING:
Using acxi's native auto.tag file format, you can readily tag your recordings.
You can update info text files (--infofix/-X), use that info file as source for
auto.tag file creation (-ES/-EM), or just create the auto.tag file without any
prefills except track file names and disk totals etc. The generated auto.tag
file can then be used to tag your recordings (--autotag/-A).
-X supports several types of info file fixes (see help/man for various fix
options), and also allows you to see what would happen without writing it to
file, then by adding 'w' to the -X command (like -Xdtw), writes changes to info
file.
You can also manually add tags using the --tag/-T option, or embed / remove
images with the --image/-I and --remove-images/-R options.
-L/--taglist shows you what tags exist in one or more directories of FLACs. That
works in a similar way to -X, offering a variety of actions, to either create an
info.txt file from the existing tags, or to output the tags in either full per
file format (default, -L f), or a condensed format, which puts all common tag
data on top of the file, and only different data per file/block of files.
With -La, you end up with an auto.tag file, which can then be used, or
modified/edited, then used, to tag your files using -A. As with -X, adding w
writes out the file(s).
Read the man page for more on auto tagging and info file/tag processing.
--------------------------------------------------------------------------------
CHECKSUMS AND TESTS:
acxi can generate new checksum files (--checksum/-K) (md5 and ffp), and verify
existing md5 hashes and flac file integrity (--checksum-verify/-V and --infofix
v/-Xv).
The --duplicates/--dupes option allows bulk checks of a collection for duplicate
flac files.
The --checksum-ffps/--ffps option allows you to generate on screen full listing
of all recordings in a directory, with file lists, ffp checksums, and track
counts per directory.
The --analyze/-Z option creates a per directory report of given input type file
sizes, times, kbps, then a summary report per directory of hte total size, time,
average kbps. This report, as with --dupes, prints to screen, and can be
redirected to a file.
--------------------------------------------------------------------------------
ERROR CORRECTION AND VALIDATION:
In order to avoid as many possible user error situations as possible, acxi tries
to verify and validate all requested operations, and exit if an impossible
situation is requested, or if incorrect or not valid data was supplied.
================================================================================
CONFIGURATION AND USE
--------------------------------------------------------------------------------
acxi supports configuration files at either /etc/acxi.conf, or user override
files $XDG_CONFIG_HOME/acxi.conf, $HOME/.acxi.conf, or $HOME/.config/acxi.conf.
The user configuration values override any /etc/acxi.conf values.
Sample acxi.conf file included here if you want to use that in a package or as
your configuration file.
See the man page for complete explanations.
If your system does not have the $HOME or $XDG_CONFIG_HOME environmental
variables (Windows, for example), you can use the manual config file path option
$CONFIGURATION_DIRECTORY='';
to create a path to your acxi.conf configuration file.
See the top of acxi, or the man page, for instructions on how to create the
configuration items. Note that user values in configuration files do not use the
'$' you see in the top user configuration section, for example, $SOURCE_DIRECTORY
would be used as: SOURCE_DIRECTORY=path in your configuration file.
--------------------------------------------------------------------------------
SOURCE/DESTINATION DIRECTORIES:
You must at a minimum set your source and destination directories the first time
you run acxi, either using the -s/--source and -d/--destination options, or in
the USER VARIABLES section on the top of the file, or in a configuration file.
Once you set your input/output directory paths (using either -s / -d options, or
creating a configuration file), you can use the --test option to see what acxi
would have done, then, once you have confirmed everything is working as
expected, you can start syncing your music files.
In configuration file:
DESTINATTION_DIRECTORY=/home/you/music/opus
SOURCE_DIRECTORY=/home/you/music/flac
If you want to exclude some directories from your lossy synced collection, use
--exclude/-x or --exclude-append/-a, which will exclude those directory names
from your lossy collection. This is useful to not transfer over stuff you won't
use for lossy, like pdf files, image folders, documentation, artwork, and so on.
--exclude takes ^^ separated list of key words which will match terms in your
source directory you do not want synced or copied over to destination. Separate
items with ^^. Will match the entire path so be aware. --exclude-append/-a adds
types to your existing preset list. --exclude replaces that list.
For example: --exclude "/artwork^^/docs^^/pdfs"
To set these as permanent, use configuration item:
EXCLUDE=/artwork^^/docs^^/pdfs
--------------------------------------------------------------------------------
INPUT/OUTPUT & QUALITY
acxi defaults to flac for input, and defaults to the following quality levels
for output:
* aac/m4a: 160
* flac: 4
* ogg: 7
* mp3: 3
* opus: 144
acxi also copies most common file types from source to destination directories.
Output type can be set with -o/--output, input type with -i/--input, and quality
level with -q/--quality options. The file types to copy over can be changed with
-c/--copy, -a/--append, or configuration file values.
Input/Output types are set in configuration file like so:
INPUT_TYPE=flac
OUTPUT_TYPE=opus
Quality is set in configuration file per type:
QUALITY_FLAC=8
QUALITY_OPUS=160
See man page for full list and explanation of configuratin options.
--------------------------------------------------------------------------------
SCREEN OUTPUT VERBOSITY:
You can change the screen output verbosity using the following options:
* none (--quiet, -v 0)
* single line (-v 1)
* verbose (-v 2)
* full, with all conversion tool outputs (-v 3)
Screen verbosity output values can be set in configuration file using:
VERBOSITY=[0-3]
================================================================================
DEPENDENCIES
--------------------------------------------------------------------------------
For backward compatibility, acxi requires only Perl 5.010 (or newer), so it
should run on anything. Several features (copy, make directory, find files) were
moved from *nix commands to Perl native commands in version 3, which should make
acxi fully platform agnostic.
* AAC/M4A encoding requires: ffmpeg with either native aac codec, or libfdk_aac
(best, Debian/Ubuntu package libfdk-aac2). If you want to preserve tags, use
m4a, if you use aac they will not transfer.
* FLAC -> FLAC requires ffmpeg.
* FLAC resampling requires ffmpeg and metaflac (for source file sample data).
* MP3 encoding requires: lame and flac (if source file is a flac, MP3 encoding
does not support wav or raw formats).
* Ogg encoding requires oggenc (Debian/Ubuntu package: vorbis-tools).
* Opus encoding requires opusenc (Debian/Ubuntu package: opus-tools).
* SHN -> FLAC conversion requires the codec 'shorten' and ffmpeg.
* --analyze, --duplicates, -X [qv], and --ffps require metaflac.
* --analyze, --infofix q if input type not flac, or flac + --ffprobe, require
ffprobe.
* --autotag requires metaflac plus a specially formatted auto.tag file placed
inside each album/collection directory.
* --checksum/--checksum-delete checksum generation require metaflac and md5sum
(or a comparable md5 generating command line utility).
* --checksum-verify requires md5sum (or comparable tool) and flac.
* --fork requires Perl module Parallel::ForkManager
* --image, --remove-images, and --taglist require metaflac.
* --infofix c requires Perl Core Module Encoding::Guess
* --infofix k requires Perl Core Module POSIX::strftime
* --infofix t and u require Perl module Text::Autoformat
* --infofix v requires flac.
* -U self updater requires curl, and valid paths for currently installed acxi
and acxi.1 man page. Will not update if both acxi and acxi.1 are not present on
your system, and correct paths set.
In theory, acxi 3.x should run on Windows and Macs, but I have not tested that,
but as long as the source/destination directory paths and the
application/configuration paths are correct, it should 'just work'.
================================================================================
SPECIAL NOTES ABOUT CODECS
--------------------------------------------------------------------------------
There's a few things that need to be done to use some of the codecs.
--------------------------------------------------------------------------------
AAC:
You can usually install the Frauenhofer libfdk_aac codec if you use the proper
non-free repositories. In Debian/Ubuntu, the package is libfdk_aac2. Otherwise
you can use the ffmpeg native aac codec, but it has been tested and found less
good than the fdk_aac codec. Your call.
Read more about the technical comparisons here:
https://trac.ffmpeg.org/wiki/Encode/AAC
FFMPEG does not transfer tags when the file format is aac, but it does when it's
m4a, so if you have tagged flac source files, then use m4a instead of aac and
most of your tags will transfer fine automatically.
Personally I have no interest in mapping tags to propietary non free formats in
AAC, so if anyone wants to create a function to do that, feel free. See the mp3
tag mapper feature for ideas. But really, just use m4a and call it a good.
--------------------------------------------------------------------------------
SHN SHORTEN:
Finding the shorten codec can be a pain, here's a few sources that may help. You
probably already have the codec if you have shn files and have been playing
them.
http://wiki.etree.org/index.php?page=SoftwareYouNeed
See section: Uncompress
http://adventuresinswitching.blogspot.com/2008/04/convert-shn-shorten-to-mp3-or-flac-in.html
has a good selection of methods for Linux, including compiling directions.
Check for a package/port called 'shorten' in *nix systems, and for Windows,
you'll want to find the shorten.exe.
Arch, Ubuntu, etc, have the shorten package available. deb-multimedia.org has
the shorten codec package for Debian.
For a collection of plugins and other shorten items:
http://shnutils.freeshell.org/shorten/
http://shnutils.freeshell.org/shorten/dist/src/ has the shorten
tar.gz files if you want to compile the codec yourself.
$ ./configure
$ make
$ make check
$ sudo make install