Skip to content

Command Line Usage

Gianluca Pernigotto edited this page Feb 4, 2023 · 13 revisions

Usage

ffcuesplitter -i FILENAMES DIRNAMES [FILENAMES DIRNAMES ...]   
              [-r]   
              [-f {wav,flac,mp3,ogg,opus,copy}]   
              [-o OUTPUTDIR]   
              [-c {artist+album,artist,album}]   
              [-ow {ask,never,always}]   
              [--ffmpeg-cmd URL]   
              [--ffmpeg-loglevel {error,warning,info,verbose,debug}]   
              [--ffmpeg-add-params 'parameters']   
              [-p {tqdm,standard}]   
              [--ffprobe-cmd URL]   
              [--dry]   
              [--prg-loglevel {error,warning,info,debug}]   
              [-h]   
              [--version]   

Description

What does the program do?

The program takes one or more input files of type "CUE" sheet and/or directories containing such files and, by default, writes split audio tracks to the same directory as the input files using .flac output format.

How do I specify the input?

Just give the -i option and pass one or more input files or directories to the program as arguments separated by spaces from each other, for example:

just a file

ffcuesplitter -i 'file1.cue'

just a directory

ffcuesplitter -i '/my/directory1'

mixed

ffcuesplitter -i 'file1.cue' '/my/directory1' 'my/directory2' 'file2.cue' ...

Well how can I process a bunch of cue files at once?

If you have many cue files in multiple directories on your file system, then just pass them as an argument to the -i option. If instead all your cue files are cataloged in various sub-directories you should use the procedure above but using the -r option. The -r option works recursively with directories only and expect no arguments. It is used to search for CUE sheet files based on the .cue suffix in all sub-directories starting from a base directory (called root directory). A base directory it is the one you passed as an argument to the -i option. If you didn't passed at least a directory as argument this option will simply do nothing.

How do I specify the output?

You can specify a single output directory for all input files processed with the -o option. If you specify a directory that doesn't exist yet, it will be created automatically. If no -o option is specified, the output files will be written to the default output directory, the same as input file(s).

Example:

ffcuesplitter -i 'file1.cue' -o '/My/new/directory'

Output audio format

The following audio formats are available as arguments using the -f option: wav, flac, mp3, ogg, opus, copy.
The copy argument is not actually an audio format but is used to copy the source format without any quality lossless, just fast splitting of the audio tracks without re-encoding.

--ffmpeg-add-params option

The --ffmpeg-add-params option allows you to add your own parameters to the ffmpeg command line, as codec quality, etc. Note, all additional parameters must be quoted.

Example:

ffcuesplitter -i 'file1.cue' -f mp3 --ffmpeg-add-params '-b:a 320k'

Overwrite existing files

By default, the program will ask the user to make a choice in the case of already existing files. However you can specify a different action using the -ow option. The -ow option expects one of the following arguments: ask, never, always.

  • ask Is the default option which will always ASK for a user response for each file to be overwritten.
  • never It will never overwrite files that already exist in the destination path.
  • always Force overwrite existing files. Will always overwrite files that already exist in the destination path.

Automatically generate audio collection directories

Since the program saves split tracks without creating other directories, using the -c option you can define a hierarchy for your audio collection, for example Artist/Album/TrackNumber - Title. This option expects one of the following arguments: artist+album, artist, album

  • artist+album Creates two more sub-directories with artist and album names in a specified or default destination path.
  • artist Creates a single sub-directories with the artist's name in the specified or default destination path.
  • album Creates a single sub-directories with the album name in the specified or default destination path.

The --ffmpeg-cmd and --ffprobe-cmd options

Each of these options sets the full path to the executable other than the system default. Or you can provide the filename available at $PATH. By default it is ffmpeg and ffprobe respectively.

--ffmpeg-loglevel option

The log level option allows you to specify a log level for messages given by FFmpeg while processing files. This option expects one of the following arguments: error, warning, info, verbose, debug, default is info. For the meaning of log levels please see the FFmpeg documentation.

Progress meter mode -p --progress-meter

The progress meter mode is how processing progress is displayed when running FFmpeg. This option expects one of the following arguments: tqdm, standard, default is tqdm. Unlike tqdm, the standard option only prints output to the console, it does not write it to the log file.

  • tqdm show a progress bar and a few other data in the command line output.
  • standard shows typical progress with FFmpeg's more or less verbose output messages.

Note that tqdm argument adds -progress pipe:1 -nostats -nostdin parameter to the FFmpeg recipes. Keep this in mind if you intend to use the recipes in your own way.

--dry option

The --dry option perform the dry run with no changes done to filesystem. Only show what would be done. You may enjoy using this option to try and see the results of many of the options described above.

--prg-loglevel option

Set the program logging level of tracking events to console. It expects one of the following arguments: debug, info, warning, error, default is info.

-h and --version options

The -h option gives you help for all program options. The --version option will give you the program version and release date