about summary refs log tree commit homepage
DateCommit message (Collapse)
2024-02-01dtas-splitfx: add --stats/-S switch HEAD master
Similar to the switch in dtas-archive(1), I got tired of having to manually add stats to all the rips I was tracking out.
2024-01-27test_player_integration: fix w/ ffmpeg > avconv
I forgot to run tests :x
2024-01-27drop MSG_EOR for AF_UNIX + SOCK_SEQPACKET
Using MSG_EOR with these local sockets is not necessary, and appears to trigger a truncation bug on OpenBSD 7.3. Link: https://marc.info/?i=20230826020759.M335788@dcvr
2024-01-27av_ff_common: use mcache
As with soxi(1), waiting for ffprobe(1) or avprobe(1) is still an expensive operation despite Process.spawn being optimized to use vfork(2).
2024-01-27av_ff_common: attempt to fix encodings for ffprobe/avprobe
As with sox, these will be dealing with legacy encodings and badly-encoding software until the end of days, so do our best to fix them up.
2023-10-12favor ffmpeg over deprecated avconv
When this project started avconv was favored in Debian, but that hasn't been the case in many years. Increase the priority of ffmpeg to match the current situation in Debian.
2023-10-12av_ff_common: set TRACKNUMBER comment from "track"
ffprobe aways says `track' instead of `TRACKNUMBER'; but the rest of our code follows FLAC metadata conventions; so use `TRACKNUMBER'. (avprobe is untested since the libav project is dead)
2023-07-03dtas-tl: reto: force ASCII-8BIT regexp match
POSIX path names aren't guaranteed to be UTF-8, and dtas should be capable of playing non-UTF-8 path names from read-only legacy FSes.
2023-07-03dtas-tl: speed up prune by pipelining requests
We are safely be able to pipeline 10 requests via SOCK_SEQPACKET on any OS without hitting buffering limits.
2023-07-03dtas-tl: reduce syscalls to speedup `reto' subcommand
Syscalls and waiting for responses are expensive, so grab 128 track IDs at once like we do for other subcommands.
2023-07-03dtas-archive: support -m/--match=REGEXP switch
Sometimes I only want to archive files matching a certain regexp pattern.
2023-07-03add dtas-2splitfx script
This generates a dtas-splitfx-compatible YAML snippet based on a sorted list of audio tracks: dtas-2splitfx 1.flac 2.flac ... >tracks.yml
2022-11-24dtas-tl edit: do not shell-escape text file
There's no need to shell-escape the text file in most cases, so make the display of non-ASCII characters more pleasant to users with UTF-8-capable terminals and editors.
2022-11-24README: favor AUTH=ANONYMOUS for IMAP
It's the established standard for anonymous IMAP access, and our IMAP server now prioritizes anonymous users over the catch-all username:password system due to IMAP scraper bots.
2022-09-06dtas 0.21.0 v0.21.0
There's two minor fixes for dtas-splitfx, and one for dtas-player users using the rate=bypass optimization. 3 changes since v0.20.0 (2022-02-03): splitfx: fix error reporting of failed tracks splitfx: warn on improper encodings for titles player: drain sinks completely before changing sink rate
2022-08-14player: drain sinks completely before changing sink rate
For users of the CPU-saving bypass mode (e.g. "format rate=bypass"), this fixes a bug when enqueueing a 44.1kHz immediately after a 48kHz file (or vice-versa). Note: gapless playback with different rates/channels between tracks has never been supported with bypass mode enabled. Bypass only allows opportunistic gapless when sequential tracks have the same format.
2022-07-16splitfx: warn on improper encodings for titles
Sometimes I get non-English song titles and copy+paste them from non-UTF8 texts.
2022-02-12splitfx: fix error reporting of failed tracks
Sometimes the command fails on certain tracks, and we need to use the proper track object for error reporting.
2022-02-03dtas 0.20.0 - ruby 3.1+ compatibility, splitfx improvements v0.20.0
This release catches up with Psych (YAML) changes in Ruby 3.1+ Ruby 2.3+ is now the minimum version, though keep in mind the ruby-core team already dropped support for it long ago. Most of the features are focused on audio engineering capabilities of dtas-splitfx. dtas-splitfx gains the --filter switch, along with per-track environment variables and comments. These new features have made my workflow significantly better. dtas-archive supports explicit comments, and omits the default SoX comment. To better cope with temporary and modified files during editing, dtas-player metadata now checks ctime before reusing the cache, handy for frequently-modified files. "dtas-tl prune" is now supported to cull temporary files from the player tracklist. There's a few dtas-console improvements, too. 28 changes since v0.19.0 (2021-09-05): archive: support comments, default to none splitfx: use Etc.nprocessors for jobs if unspecified dtas-console: set X11 terminal title iff DISPLAY is set dtas-console: add 'i' toggle to show comments (metadata) splitfx: fix track_zpad with integer arg doc: drop ordered map from examples player: reduce syscalls when splicing to single target dtas-console: support Wayland terminal titles, too console: workaround safe warnings in outdated `curses' gem require Ruby 2.3+ get rid of DTAS.dedupe_str wrapper move dtas-graph into script/, support Perl for dtas.sh use YAML.unsafe_load in Psych 4.x (Ruby 3.1+) deduplicate and freeze pathnames + metadata player: remove omap conversion dtas: drop unnecessary "require 'yaml'" statements dtas-tl prune: cull missing files from tracklist dtas-tl: drop encoding hacks, use binary stdout+stderr use IO#wait_readable consistently get rid of DTAS::Nonblock wrapper for Ruby <= 2.0 unix_accepted: drop Ruby < 2.3 support code do not check IO#closed? before calling IO#close splitfx: support per-track environment variables splitfx: add --filter option to limit match to comments player: expire sox metadata cache on file st_ctime changes readahead: do not call -@ on non-String splitfx: disallow combining --trim and --filter splitfx: document changes ahead of 0.20.0 release
2022-02-03splitfx: document changes ahead of 0.20.0 release
--filter, per-track comments and environments are the subtle but major new features for the next release.
2022-02-03splitfx: disallow combining --trim and --filter
They're two different ways of accomplishing roughly the same thing, but --filter can be more flexible given the use of per-track environment variables.
2022-01-27readahead: do not call -@ on non-String
There may not be an `infile' element in the `current' response. Fixes: bf9787ac517fe19a ("deduplicate and freeze pathnames + metadata")
2022-01-24player: expire sox metadata cache on file st_ctime changes
We still need the TTL to deal with fuse.sshfs and maybe other weird FSes which don't return the st_ctime properly.
2022-01-24splitfx: add --filter option to limit match to comments
This can allow filtering for tracks with a given comment declared via the ".#{COMMENT}" mechanism or the track title. If no prefix is given (before the '='), then all comment values are matched.
2022-01-24splitfx: support per-track environment variables
This allows setting the `FX' env on a per-track basis, since some recordings may have massive dynamic shifts which aren't desirable for casual listening or broadcast playback.
2022-01-23do not check IO#closed? before calling IO#close
IO#close is idempotent since Ruby 2.3, so reduce our instruction footprint to save some memory.
2022-01-23unix_accepted: drop Ruby < 2.3 support code
This should save a little bit of memory for current users.
2022-01-23get rid of DTAS::Nonblock wrapper for Ruby <= 2.0
We require 2.3+, nowadays, so jettison a bunch of code.
2022-01-23use IO#wait_readable consistently
Since Ruby 2.3, it no longer checks FIONREAD, and we require Ruby 2.3+ nowadays, so drop our IO.select-based workarounds.
2022-01-23dtas-tl: drop encoding hacks, use binary stdout+stderr
Try to consistently treat pathnames as binary blobs everywhere, since POSIX FSes allow everything but "\0" in pathnames.
2022-01-23dtas-tl prune: cull missing files from tracklist
This helps for folks creating and replacing many throwaway files while editing with dtas-splitfx, or compulsive renamers.
2022-01-21dtas: drop unnecessary "require 'yaml'" statements
We use DTAS.yaml_load to wrap all YAML.*load calls, but we still need "require 'yaml'" for various .to_yaml calls.
2022-01-21player: remove omap conversion
"omap" is specific to Ruby and makes interopability with other languages more difficult. While it's true environment variables are stored as an ordered array of C strings (see environ(7)); order doesn't matter in practice. Everyone in the real world treats the environment as an unordered key-value store. Followup-to: cac63517e7f751cc (doc: drop ordered map from examples, 2022-01-07)
2022-01-21deduplicate and freeze pathnames + metadata
This ought to save some memory for dtas-player and dtas-readahead users with multiple instances of the same track(s) on their track list.
2022-01-21use YAML.unsafe_load in Psych 4.x (Ruby 3.1+)
Psych 4.x defaults to "nanny mode" to handle untrusted data. This causes breakage with since YAML references (aliases) emitted by dtas-player can't be handled by Psych clients under Ruby 3.1. Since dtas is single user and is a shell designed to run arbitrary code, favor the new YAML.unsafe_load API which behaves like the old YAML.load in Ruby <= 3.0.
2022-01-21move dtas-graph into script/, support Perl for dtas.sh
"script/" is the standard location for Perl ExtUtils::MakeMaker-based installations, so and we'll probably overload "lib" to support Perl scripts. This is another step in expanding our use of Perl5 and avoiding the slow startup and API instability of Ruby.
2022-01-21get rid of DTAS.dedupe_str wrapper
Ruby 2.3+ supports String#@-, though it did not deduplicate strings. But 2.5 is already old at this point and most users can be expected to have it. This gives some memory regressions for Ruby <= 2.4 users, but cuts down on the code we maintain and reduces bytecode overhead for 2.5+ users.
2022-01-21require Ruby 2.3+
This allows us to jettison a bunch of compatibility code since we've started using Etc.nprocessors and String#- (uminus) in more places. The Ruby core team doesn't support <= 2.5, even.
2022-01-16console: workaround safe warnings in outdated `curses' gem
Debian bullseye users are stuck with ruby-curses 1.2.4, which means they'll hit rb_safe_level warnings with Ruby 2.7+. cf. https://bugs.debian.org/958973
2022-01-11dtas-console: support Wayland terminal titles, too
Tested-by: James Rowe <jnrowe@gmail.com>
2022-01-11player: reduce syscalls when splicing to single target
splice(2) alone does not give enough information as to whether the source or destination is blocking. However, as far as audio playback chain goes, the sink should ALWAYS be the limiting factor as decoder sources need to be able to produce data at least as fast as the audio is being played (otherwise there'll be audible drops). Thus, we bias the select(2) into waiting on a targets on if we splice(2) less than the data we requested.
2022-01-11doc: drop ordered map from examples
"omap" is specific to Ruby and makes interopability with other languages more difficult. While it's true environment variables are stored as an ordered array of C strings (see environ(7)); order doesn't matter in practice. Everyone in the real world treats the environment as an unordered key-value store, and we shall follow.
2022-01-11splitfx: fix track_zpad with integer arg
This is a rarely-needed corner-case, but I just needed to use this feature.
2022-01-11dtas-console: add 'i' toggle to show comments (metadata)
This can be useful in the face of non-descriptive filenames.
2022-01-11dtas-console: set X11 terminal title iff DISPLAY is set
This allows users running terminals in graphical environments to navigate to the terminal running dtas-console more easily.
2022-01-11splitfx: use Etc.nprocessors for jobs if unspecified
We'll take advantage of multicore if available; because even bums like me have SMP machines these days.
2022-01-11archive: support comments, default to none
The default "Processed by SoX" comment is pointless, and I often want to archive + tag something in one step to reduce FS I/O.
2021-09-05dtas 0.19.0 - odd pathname fixes v0.19.0
Non-UTF-8-encoded pathnames now handled properly by dtas-mlib. Shell-unfriendly filenames are handled properly if they require ffmpeg (they were always handled properly when using sox). Some minor URL and doc updates, too, and there's a new "make symlink-install" target for users who lack permissions to install RubyGems. 6 changes since v0.18.1 (2021-02-13): mlib: pathnames may be blobs README: replace NNTP URL with NNTPS gemspec: allow building gem without setting VERSION build: add "symlink-install" target do not shell-quote filenames for environment doc: use Tor v3 .onion URLs
2021-05-30doc: use Tor v3 .onion URLs
Tor is dropping v2 .onion in favor of more secure (but less readable) v3 .onion URLs. Zooko's triangle once again :/ (no, we won't support planet-destroying proof-of-work schemes)
2021-05-25do not shell-quote filenames for environment
This allows dtas-player to play files with wonky filenames when piping ffmpeg (or avconv) to sox. SoX-only code dtas-player paths are not affected since they don't require an extra Bourne shell. All of our internal shell pipelines quote "$INFILE", anyways, so there was never any need to escape for those. This may cause compatibility problems for splitfx users, but splitfx is probably too esoteric to have any users besides myself. And I expect anybody editing audio with dtas-splitfx to pick shell-friendly filenames. dtas-player is far more general, and likely to encounter shell-unfriendly filenames which require quoting.