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: Burning Wavpack on Linux? (Read 4477 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Burning Wavpack on Linux?

Hello, I'm new here, 


as the title says: I'm searching for a method to burn this wavpack-file (via a cuesheet). I've tried K3b and Brasero (with Linux Mint) - no luck. Any suggestions would be most welcome. 


cheers

Burning Wavpack on Linux?

Reply #1
If you don't mind using the command line. There are a number of tools that should help you achieve that goal.

Note: In all example commands below. I assume your non-split audio file name does not start with 0-3. And the number of tracks is <= 30. The commands can be adjusted easily if that's not the case.

1- shnsplit (a part of shntool).
    You can use this tool to get split tracks. Example:
Code: [Select]
shntool -h # for detailed help
shnsplit -t '%n - %p - %t' -f file.cue file.wv


2- cuetag (a part of cuetools)
    You can use this tool to tag the split tracks. Example:
Code: [Select]
# Note: If shnsplit created a 00 track. You need to remove/rename it before running cuetag.
cuetag.sh file.cue [0-3]*.wv


3- ffmpeg (a part of FFmpeg)
    You can use FFmpeg to convert the split files to wav. wvunpack can obviously be used in your case. But I want my examples to be generic.
Code: [Select]
# Note: setting to pcm_s16le explicitly in case the source is not compatible.
for f in [0-3]*.wv; do ffmpeg -i "$f" -c:a pcm_s16le "$f".wav; done


4- cdrecord(*) (a part of cdrtools)
    You can use cdrecord to burn the wav files directly. Example:
Code: [Select]
cdrecord -v -pad [0-3]*.wav


(*) Warning: Some distributions ship the inferior fork cdrkit instead of the original cdrtools. I can't vouch for the quality of that fork.


Burning Wavpack on Linux?

Reply #3
Hello, I'm new here, 


as the title says: I'm searching for a method to burn this wavpack-file (via a cuesheet). I've tried K3b and Brasero (with Linux Mint) - no luck. Any suggestions would be most welcome. 


cheers

The simply way:

1. Convert wavpack files to wav (with wvunpack, sox, ffmpeg, etc.)
2. Edit the cue sheet, replacing .wv  to .wav
                                                              [You can to do both with a script]
                                                              [additionally, you can convert the cue to toc -better support metadata, non-compliant CUE sheet support...- with mktoc
                                                              and, if interested, compensate write offset ]
3. Burn with cdrdao (via the command line or K3B, Brasero, etc)

Except mktoc, all other programs are in the repositories.
If you need help with the script, I can send a modified copy of the script I use to flac+cue.

 

Burning Wavpack on Linux?

Reply #4
I am on Ubuntu and I use a Nautilus script that I wrote for similar purpose.

I just right click a folder or WavPack image, Scripts -> Burn as CDDA, click burn, wait and ... done.

Success or errors of the scripts are displayed as desktop notifications or graphical message boxes.

To install requirements:
Code: [Select]
sudo apt-get install -V brasero zenity parallel libnotify-bin wavpack

To install, save the script in ~/.local/share/nautilus/scripts, make it executable, and restart nautilus (nautilus -q).

The script:
Code: [Select]
#!/bin/bash -eu

set -o pipefail

IFS='
'
readonly SCRIPT_NAME=$(basename -- "$0")

# auto cleanup
at_exit() {
  set +u
  rm -Rf "$TMP_DIR"
  set -u
}
trap at_exit EXIT


error() {
  local -r title=${1:?}
  local -r msg=${2:?}
  zenity --error --title="${title}" --text="${msg}" --no-wrap
  exit 1
}


for INPUT in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
do
  TMP_DIR=$(mktemp -d /tmp/burn-cdda.XXXXXXXXXX)

  if [ -f "$INPUT" ]
  then
    # input is a file
    if [ "$(wvunpack -q -c "$INPUT" 2> /dev/null)" ]
    then
      # image file

      # decode
      notify-send -u low -i /usr/share/icons/Humanity/places/48/folder-music.svg "$SCRIPT_NAME" "Starting decoding"
      wvunpack -qz -m -cc "$INPUT" -o "$TMP_DIR/img.wav"

      # burn
      sed -i 's/^\(FILE "\).*\(" WAVE\)$/\1img.wav\2/w /dev/stdout' "$TMP_DIR/img.cue"
      brasero -i "$TMP_DIR/img.cue" &> /dev/null
    else
      error "Input file is not a WavPack image"
    fi

  elif  [ -d "$INPUT" ]
  then
    # input is a directory, assume one file per track

    # decode
    notify-send -u low -i /usr/share/icons/Humanity/places/48/folder-music.svg "$SCRIPT_NAME" "Starting decoding"
    find "$INPUT" -type f -iname '*.wv' -print0 | parallel -0I'{}' wvunpack -qz -m '{}' -o "$TMP_DIR"

    # burn
    brasero -a $TMP_DIR/*.wav &> /dev/null
  fi

  # cleanup
  rm -Rf "$TMP_DIR"
done

Opus 96 kb/s (Android) / Vorbis -q5 (PC) / WavPack -hhx6m (Archive)