Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Command-line replaygain scanning (Read 2066 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Command-line replaygain scanning

After I updated Foobar2000 from 1.6.12 to 2.1.5(x64), my command-line script for scanning replaygain no longer works. It used the following commands:

   Foobar2000.exe /context_command:"Replaygain/Scan as a single album" tmp.m3u8
   Foobar2000.exe /context_command:"Replaygain/Scan per-file track gain" tmp.m3u8

After the update, an error message states "Could not load info (Unsupported file format)..." when the script tries to load a playlist file (regardless whether m3u or m3u8).

The script is used for automated processing when it is not practical to include a list of all the individual files in a single command, nor are the files necessarily within the same folder. Even if this were practical, specifying files or a folder that was previously scanned results in a prompt that says "All tracks you have selected already have ReplayGain info. Would you like to scan them anyway?"

Is there any alternative for scanning multiple files in a command-line script?

Is there a way to dismiss or suppress Foobar2000 prompts in a command-line script?

Re: Command-line replaygain scanning

Reply #1
I presume this is for scanning tracks which do not have ReplayGain tags?  It is easy enough to use MP3Tag, and I presume the same in FB2K Library Search, to select all tracks with no ReplayGain value, then scan on the right-click menu.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Command-line replaygain scanning

Reply #2
The challenge is not to identify files lacking ReplayGain data but to scan or rescan them without requiring user interaction.

Rather than use the Media Library, I use my own database, which invokes a rescan whenever an album (in my case, a classical work consisting of individual movement) or individual tracks (not included in any work) are either catalogued or modified. It creates a playlist file for each work, plus one for all individual tracks, then invokes Foobar2000 to rescan each playlist file in the background without any user interaction.

This does not work in the current version of Foobar2000 because:

(1) Foobar2000 no longer accepts a playlist file as the input for a command-line invocation of a ReplayGain scan,
(2) Foobar2000 now issues a prompt if file(s) already have existing ReplayGain data, and
(3) Foobar2000 now issues a prompt ("Update File Tags") before saving ReplayGain data.

The first obstacle may be overcome for an album (work) by specifying the folder instead of a playlist. It may be overcome for individual files by invoking Foobar2000 separately for each individual file (though this would be quite a bit slower when there are many files).

The second obstacle may be avoided by routinely first removing all existing ReplayGain data in the folder or file (though this would also be slower when there are many files).

The third obstacle remains unless there is a way to suppress or override the confirmation prompt. I don't see anything to this purpose in user preferences.

Re: Command-line replaygain scanning

Reply #3
Why not just invoke an instance of 1.6 to do this task, if you know it does what you want?
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Command-line replaygain scanning

Reply #4
That's what I'm doing in the interim. Luckily installing the x64 version left the prior x32 version in place.

Re: Command-line replaygain scanning

Reply #5
If you enable the "Quiet mode" option at Preferences -> Tools -> ReplayGain Scanner there will be no prompts. The prompting part works the same way in the older 1.6 series. I assume you already had the quiet mode enabled there.

Re: Command-line replaygain scanning

Reply #6
Thank you! That's the  option that I had set in the prior version of Foobar2000 but wasn't able to find in the new version. Thank you!