↩ go back to index

Managing MiniDisc Devices From the Command Line

february 25, 2022

MiniDiscs have long been one of my favorite music formats since I first got a recorder two years ago:

October 29, 2020: “hello minidisc :)”

And just a few days ago I finally got a NetMD recorder:

February 23, 2022: “New Gadgets: Thumby (Tiny Game Console) & the Sony MZ-N505 (MiniDisc Recorder/Player)”

So I've been working on getting a CLI NetMD setup going, as all the existing options are either electron-based (bad), or google chrome only (worse). Most of my other workflow is on the command line, if I can avoid it I'm not opening up a GUI or Web app to do just one thing. Particularly since I rerecord various discs every week or more, I wanted something that was convenient to use and was set it and forget it. platinum-md requires me to slowly navigate to the folder holding the song I want, select it to transfer, wait, then slowly navigate to the next folder and so on which is no fun. Also my six year old laptop fans rev up full speed the instant I opened it so that doesn't make it easy to forget it either.

Luckily all the web apps that I know of that actually do something useful (especially if it involves interfacing with USB or other hardware) simply use base CLI tools or js/webasm ports of those tools in their backend. All the web-based fusee launchers use a port of the CLI fusee-launcher in the backend. All of those free file converter sites just use ffmpeg in their backend. WebMD and platinum-md are (luckily) no different. Unfortunately the CLI tools in their backends are a bit finicky and undocumented, but there's workarounds.

netmd

The quintessential program for accessing NetMD devices is linux-minidisc. All other NetMD implementations that I know of are derived from it.

Unfortunately, the original linux-minidisc really leaves plain NetMD by the wayside and instead focuses on HiMD support, which seems to me to be a largely wasted effort since you have to be a millionaire in order to afford a working HiMD player these days.

Instead I have my own fork that integrates improvements from a bunch of linux-minidisc forks

The compilation instructions as given in the README are simple enough:

$ qmake CONFIG+=without_gui
$ make

You need qmake because there's a HiMD Qt app, even though we're disabling that anyways.

However, there are a few limitations to netmdcli, the primary utility in linux-minidisc. Namely:

Let's address these problems one-by-one:

a crash course for netmdcli

The CLI documentation for netmdcli is very poor. I'm working on writing a real man page for it and cleaning up its netmdcli help text, but until that patch gets applied here's a crash course in the most useful commands:

View a rather incomplete list of subcommands.

Did you know that running the command with no arguments will give you the track listing of the current MD? Well I sure as hell didn't, I only found out because I happened to notice it in the source code.

Displays the raw disc title (including groups), the sanitized disc title, and info about the currently playing track.

Move a track to a different position on the disc. Note that tracks in netmdcli are zero-indexed, which is off by one from the track numbers on the player itself. Use the netmdcli command to get the shifted track numbers.

Delete the track at target. Same caveats as netmdcli move.

Rename the track at target. Same caveats as netmdcli move.

Display the remaining SP capacity on the disc. Multiply by 2 if you're recording in LP2 mode and multiply by 4 for LP4.

Erase the disc. This has a tendency to make any later netmdcli commands mess up until you eject the disc and reinsert it.