I think it's impossible to change drive offset in FLAC files without reencoding.
What I do then I need to change it (I'm using Linux and shntool package):
- decode .flac files to .wav
- create .cue file for the tracks (shntool cue *.wav > img.cue)
- join .wav files in one big .wav image (shntool join *.wav, it creates joined.wav)
- if drive offset is positive (it meens I need cut off first N*4 bytes of audio data and add the same amount of zero data at the end) I use something like:
CODE
head -c 44 joined.wav > img.wav
tail -c $((<wav_size>-44-4*<drive_offset>)) joined.wav >> img.wav
dd if=/dev/zero bs=4 count=<drive_offset> >> img.wav
where <wav_size> is size of .wav image in bytes, and <drive_offset> is positive offset of drive where disc was ripped.
- if drive offset is negative the algorithm is a bit more complex:
CODE
head -c 44 joined.wav > img.wav
dd if=/dev/zero bs=4 count=<drive_offset>
tail -c $((<wav_size>-44)) | head -c $((<wav_size-44-4*<drive_offset>)) >> img.wav
Note: you need use absolute value as <drive_offset>, not negative.
- if you wish you can check tracks by ARcue.pl, just edit img.cue and change "joined.wav" to "img.wav", then run ARcue.pl img.cue
- remove unused .wav files (decoded .flac tracks and joined.wav)
- split img.wav back to tracks (shntool split -f img.cue img.wav), remove img.wav & img.cue
- encode back to .flac, tag, rename.
It's possible to write a shell script to do this in one command, even with copying FLAC comments from old files to new but this is a task for someone else