HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: 9p on 2021-06-16 10:15:34

Title: Split file with PCM float samples by cuesheet
Post by: 9p on 2021-06-16 10:15:34
Hello!
I have a vinyl album rip in form of WAV audio file together with a matching cuesheet. The audio file is mono 96 KHz with samples in PCM 32-bit floating point format. I would like to split it into individual tracks. Unfortunately my usual tool of choice shntool refuses to work with float samples:
Code: [Select]
shnsplit: warning: unsupported format 0x0003 (IEEE Float) while processing file: [audio.wav]
shnsplit: warning: none of the builtin format modules handle input file: [audio.wav]
shnsplit: error: cannot continue due to error(s) shown above
I know I could change the sample format to integer with something like ffmpeg but I'd prefer something that can work with float samples natively if possible. I also noticed that Opus encoder is able to take this file as input without any problems. Do you know other good splitters I can use for this task? (preferably ones supporting Linux)
Title: Re: Split file with PCM float samples by cuesheet
Post by: jaybeee on 2021-06-16 10:58:53
I've not tried either, but they may help:

Deflacue (https://github.com/idlesign/deflacue)
Flacon (https://flacon.github.io/)
Title: Re: Split file with PCM float samples by cuesheet
Post by: 9p on 2021-06-16 12:36:13
Deflacue (https://github.com/idlesign/deflacue)
Just tried it but it changed sample format to 24-bit integer probably because it outputs to FLAC

Original:
Code: [Select]
Input #0, wav, from 'N_SLICHENKO_M.wav':
  Duration: 00:39:07.14, bitrate: 3072 kb/s
    Stream #0:0: Audio: pcm_f32le ([3][0][0][0] / 0x0003), 96000 Hz, 1 channels, flt, 3072 kb/s
After splitting:
Code: [Select]
Input #0, wav, from '01 - Малярка.wav':
  Duration: 00:01:28.20, bitrate: 2304 kb/s
    Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 96000 Hz, mono, s32 (24 bit), 2304 kb/s
Title: Re: Split file with PCM float samples by cuesheet
Post by: Rollin on 2021-06-16 16:25:56
foobar2000. Works on Linux under Wine.
Title: Re: Split file with PCM float samples by cuesheet
Post by: 9p on 2021-06-16 18:13:43
Deflacue (https://github.com/idlesign/deflacue)
Just to add to the above it didn't even get the cut points right. Apparently it is confused by not typical sample format.

Flacon (https://flacon.github.io/)

Doesn't seem to mangle sample format but produces a broken WAV files nonetheless
Code: [Select]
[wav @ 0x55cfe46a29c0] no 'data' tag found
02. Мороз.wav: Invalid data found when processing input
I also tried selecting Opus as output but it resulted in error during conversion
Code: [Select]
/usr/bin/sox FAIL formats: can't open input  `-': wave header error: wExtSize inconsistent with wFmtLen

foobar2000. Works on Linux under Wine.
Success! Thanks. It's good to have mature software at hand.

Title: Re: Split file with PCM float samples by cuesheet
Post by: jaybeee on 2021-06-16 18:15:57
I use foobar myself and it was the first to come to mind, but didn't suggest it because you had requested Linux (even though I know foobar can run under Wine). I'll know for next time to just shout out foobar lol :P
Title: Re: Split file with PCM float samples by cuesheet
Post by: 9p on 2021-06-16 18:22:35
I'd say native (for me also command line) solution is always preferred. It's unfortunate that shntool is no longer developed as this thread showed it still has place for improvement.
Title: Re: Split file with PCM float samples by cuesheet
Post by: nu774 on 2021-06-17 14:57:12
tracksplit command of python-audio-tools (https://github.com/tuffy/python-audio-tools) is a handy nice tool that can split tracks according to cuesheet.
Unfortunately, it doesn't support conversion from 32bit input. Maybe you could ask the author about it.

And if you are OK with wine, you could also try refalac64.exe (use -D switch to let it encode to wav file).
It's just a simple CLI program with a lot less dependencies on Windows system DLLs compared to foobar2k.
SimplePortal 1.0.0 RC1 © 2008-2021