Discussion:
[SoX-users] Checking my music library
Bengt Nilsson
2016-07-26 13:53:40 UTC
Permalink
Friends,

I have reasons to believe I have some faults in my music library. To make things worse, I think I have faults in my backup too, but those are not necessarily aligned to the ones in the active music library.

To recover, I need to find the failed files in my music, and recover them from backup if possible. Once this is done, I can erase the corrupt backup and make a new snapshot.

To play ALL tracks from start to end to check their integrity is of course impractical.

Is there any clever way to let sox (or soxi) go thru everything and log the failed files, if any?
Måns Rullgård
2016-07-26 14:14:53 UTC
Permalink
Post by Bengt Nilsson
Friends,
I have reasons to believe I have some faults in my music library. To
make things worse, I think I have faults in my backup too, but those
are not necessarily aligned to the ones in the active music library.
To recover, I need to find the failed files in my music, and recover
them from backup if possible. Once this is done, I can erase the
corrupt backup and make a new snapshot.
To play ALL tracks from start to end to check their integrity is of course impractical.
Is there any clever way to let sox (or soxi) go thru everything and
log the failed files, if any?
What format are the files? Some formats can be easily verified by
automatic tools, probably as quickly as they can be read from disk.
Since you didn't say what they are or what OS you're using, it's hard to
make a specific recommendation.
--
Måns Rullgård
Bengt Nilsson
2016-07-31 21:31:20 UTC
Permalink
My formats of preference are flac, aiff, wav.
My OS is ubuntu studio 16.04.


Skickat från min iPhone
Post by Måns Rullgård
Post by Bengt Nilsson
Friends,
I have reasons to believe I have some faults in my music library. To
make things worse, I think I have faults in my backup too, but those
are not necessarily aligned to the ones in the active music library.
To recover, I need to find the failed files in my music, and recover
them from backup if possible. Once this is done, I can erase the
corrupt backup and make a new snapshot.
To play ALL tracks from start to end to check their integrity is of course impractical.
Is there any clever way to let sox (or soxi) go thru everything and
log the failed files, if any?
What format are the files? Some formats can be easily verified by
automatic tools, probably as quickly as they can be read from disk.
Since you didn't say what they are or what OS you're using, it's hard to
make a specific recommendation.
--
Måns Rullgård
------------------------------------------------------------------------------
fmiser
2016-08-02 21:33:49 UTC
Permalink
Post by Bengt Nilsson
Post by Måns Rullgård
Post by Bengt Nilsson
I have reasons to believe I have some faults in my music
library.
To recover, I need to find the failed files in my music,
To play ALL tracks from start to end to check their integrity
is of course impractical.
Is there any clever way to let sox (or soxi) go thru
everything and log the failed files, if any?
What format are the files? Some formats can be easily verified
by automatic tools, probably as quickly as they can be read
from disk. Since you didn't say what they are or what OS you're
using, it's hard to make a specific recommendation.
My formats of preference are flac, aiff, wav.
My OS is ubuntu studio 16.04.
Well, find a couple "failed" files and see what soxi has to say
about them. Or maybe stat or stats.

I can't see your files, so I can't even guess how they might have
"failed". Do they sound wrong? Do they stop playing? Do they
skip? Do they not play at all? Is the extension incorrect?

My course of action would be to use command line tools
to try to find a way to spot the "failed" files. Once you know
what is wrong, then there is a chance for a shell script to sort
them out. But until you - or we - have some clue as to how they
failed, there is little chance of success.

-- f


------------------------------------------------------------------------------
Bengt Nilsson
2016-08-03 09:41:32 UTC
Permalink
I had an incident several months go, when an album simply wouldn’t play.
I replaced it with the backed up version and it was okay.
Unfortunately, I did not pay attention to exactly what happened, so the evidence/clue is gone. Stupid, but that is the situation now.
I suspect that this is probably not a singular incident.

My problem with the backup is that I swapped first and last name of the artist folders for sorting reasons, and the backup software apparently tried to cope with this but failed silently.
A more stupid backup system would have simply duplicated the data, which would have been better.
Now, if I try to recover an old folder with the ”new order” I have no data. I have to go back to a snapshot with the ”old order” to recover it.
So it is a mess. Slightly off-topic, but I need a method to verify what I have so I can clear the present backup and make a fresh restart.

So soxi is the way to go?
Is there any soxi -switch that actually reads and analyzes more file data than the others?
I guess some will only look at the header info, which maybe is not enough.

I will try to make some kind of recursive script that does a suitable soxi command on everything, and log the result.
Post by fmiser
Post by Bengt Nilsson
Post by Måns Rullgård
Post by Bengt Nilsson
I have reasons to believe I have some faults in my music
library.
To recover, I need to find the failed files in my music,
To play ALL tracks from start to end to check their integrity
is of course impractical.
Is there any clever way to let sox (or soxi) go thru
everything and log the failed files, if any?
What format are the files? Some formats can be easily verified
by automatic tools, probably as quickly as they can be read
from disk. Since you didn't say what they are or what OS you're
using, it's hard to make a specific recommendation.
My formats of preference are flac, aiff, wav.
My OS is ubuntu studio 16.04.
Well, find a couple "failed" files and see what soxi has to say
about them. Or maybe stat or stats.
I can't see your files, so I can't even guess how they might have
"failed". Do they sound wrong? Do they stop playing? Do they
skip? Do they not play at all? Is the extension incorrect?
My course of action would be to use command line tools
to try to find a way to spot the "failed" files. Once you know
what is wrong, then there is a chance for a shell script to sort
them out. But until you - or we - have some clue as to how they
failed, there is little chance of success.
-- f
------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
https://lists.sourceforge.net/lists/listinfo/sox-users
Bengt Nilsson
AnsåsvÀgen 8
438 53 Hindås
0301-22150
Bengt Nilsson
2016-08-03 16:13:12 UTC
Permalink
I did a recursive script with various soxi tests, and got terrors for some of my files, e.g.

soxi FAIL formats: can't open input file `Modern/Starr, Ringo/Good Night Vienna/13 Blindman.aif': AIFF: no sound data on input file
soxi FAIL formats: can't open input file `Classical/HÀndel, Johann Friedrich/Water Music/10 water music- suite in f major, hwv 348 (hornpipe).aiff': AIFF: no sound data on input file

I got this for 20-30 files, strangely enough only AIFF.
I suppose this is enough for starting my manual recover.
Thanks for the help.
Post by fmiser
Post by Bengt Nilsson
Post by Måns Rullgård
Post by Bengt Nilsson
I have reasons to believe I have some faults in my music
library.
To recover, I need to find the failed files in my music,
To play ALL tracks from start to end to check their integrity
is of course impractical.
Is there any clever way to let sox (or soxi) go thru
everything and log the failed files, if any?
What format are the files? Some formats can be easily verified
by automatic tools, probably as quickly as they can be read
from disk. Since you didn't say what they are or what OS you're
using, it's hard to make a specific recommendation.
My formats of preference are flac, aiff, wav.
My OS is ubuntu studio 16.04.
Well, find a couple "failed" files and see what soxi has to say
about them. Or maybe stat or stats.
I can't see your files, so I can't even guess how they might have
"failed". Do they sound wrong? Do they stop playing? Do they
skip? Do they not play at all? Is the extension incorrect?
My course of action would be to use command line tools
to try to find a way to spot the "failed" files. Once you know
what is wrong, then there is a chance for a shell script to sort
them out. But until you - or we - have some clue as to how they
failed, there is little chance of success.
-- f
------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
https://lists.sourceforge.net/lists/listinfo/sox-users
Bengt Nilsson
AnsåsvÀgen 8
438 53 Hindås
0301-22150
Måns Rullgård
2016-08-08 11:05:05 UTC
Permalink
Post by Bengt Nilsson
Post by Måns Rullgård
Post by Bengt Nilsson
Friends,
I have reasons to believe I have some faults in my music library. To
make things worse, I think I have faults in my backup too, but those
are not necessarily aligned to the ones in the active music library.
To recover, I need to find the failed files in my music, and recover
them from backup if possible. Once this is done, I can erase the
corrupt backup and make a new snapshot.
To play ALL tracks from start to end to check their integrity is of course impractical.
Is there any clever way to let sox (or soxi) go thru everything and
log the failed files, if any?
What format are the files? Some formats can be easily verified by
automatic tools, probably as quickly as they can be read from disk.
Since you didn't say what they are or what OS you're using, it's hard to
make a specific recommendation.
My formats of preference are flac, aiff, wav.
My OS is ubuntu studio 16.04.
For FLAC files the "flac -t <file>" command decodes and verifies the
decoded data against the checksum in the header. AIFF and WAV files are
hard to verify automatically beyond checking that the file size matches
the header.
--
Måns Rullgård

------------------------------------------------------------------------------
Bengt Nilsson
2016-08-08 12:15:22 UTC
Permalink
Any comments about this?

soxi FAIL formats: can't open input file `file.wav': WAVE: RIFF header not found

Bengt Nilsson
Ansåsvägen 8
438 53 Hindås
0301-22150
Post by Måns Rullgård
Post by Bengt Nilsson
Post by Måns Rullgård
Post by Bengt Nilsson
Friends,
I have reasons to believe I have some faults in my music library. To
make things worse, I think I have faults in my backup too, but those
are not necessarily aligned to the ones in the active music library.
To recover, I need to find the failed files in my music, and recover
them from backup if possible. Once this is done, I can erase the
corrupt backup and make a new snapshot.
To play ALL tracks from start to end to check their integrity is of
course impractical.
Is there any clever way to let sox (or soxi) go thru everything and
log the failed files, if any?
What format are the files? Some formats can be easily verified by
automatic tools, probably as quickly as they can be read from disk.
Since you didn't say what they are or what OS you're using, it's hard to
make a specific recommendation.
My formats of preference are flac, aiff, wav.
My OS is ubuntu studio 16.04.
For FLAC files the "flac -t <file>" command decodes and verifies the
decoded data against the checksum in the header. AIFF and WAV files are
hard to verify automatically beyond checking that the file size matches
the header.
--
Måns Rullgård
Måns Rullgård
2016-08-08 12:49:01 UTC
Permalink
Post by Bengt Nilsson
Any comments about this?
soxi FAIL formats: can't open input file `file.wav': WAVE: RIFF header not found
That's the error you get if the file is empty.
--
Måns Rullgård

------------------------------------------------------------------------------
Bengt Nilsson
2016-08-08 12:50:32 UTC
Permalink
Wow, that means I actually got someting then!
Or, actually, NOT.
This means some progress.

Bengt Nilsson
Ansåsvägen 8
438 53 Hindås
0301-22150
Post by Måns Rullgård
Post by Bengt Nilsson
Any comments about this?
soxi FAIL formats: can't open input file `file.wav': WAVE: RIFF header not found
That's the error you get if the file is empty.
--
Måns Rullgård
Bengt Nilsson
2016-08-08 12:56:14 UTC
Permalink
Post by Bengt Nilsson
Wow, that means I actually got someting then!
Or, actually, NOT.
This means some progress.
False alarm, it was a ._*.wav ”resource file” created by smb.
Same WAV extension, but no audio content only icons and such stuff.

Bengt Nilsson
AnsåsvÀgen 8
438 53 Hindås
0301-22150
Post by Bengt Nilsson
Post by Bengt Nilsson
Any comments about this?
soxi FAIL formats: can't open input file `file.wav': WAVE: RIFF header not found
That's the error you get if the file is empty.
--
Måns Rullgård
fmiser
2016-08-08 20:47:20 UTC
Permalink
AIFF and WAV files are hard to verify automatically beyond
checking that the file size matches the header.
That might be helpful for him. Do you know a way to perform that
test? That is, check the file length compared to the header value?
Loading...