HydrogenAudio

Lossless Audio Compression => WavPack => Topic started by: WOW! JUst: WOW! on 2015-08-09 12:17:58

Title: Burning Wavpack on Linux?
Post by: WOW! JUst: WOW! on 2015-08-09 12:17:58
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
Title: Burning Wavpack on Linux?
Post by: 2012 on 2015-08-09 15:08:20
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 (http://www.etree.org/shnutils/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 (https://github.com/svend/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 (https://ffmpeg.org/))
    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 (http://cdrecord.org))
    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.
Title: Burning Wavpack on Linux?
Post by: shadowking on 2015-08-09 15:19:54
I remember that Burrrn worked fine via WINE, though i didn't test cue sheets.

http://www.burrrn.net/?page_id=6 (http://www.burrrn.net/?page_id=6)
Title: Burning Wavpack on Linux?
Post by: remenor on 2015-11-03 17:52:55
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 (https://github.com/cmcginty/mktoc/raw/master/dist/mktoc-1.3.tar.gz)
                                                              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.
Title: Burning Wavpack on Linux?
Post by: dutch109 on 2015-11-03 21:54:45
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