[LAU] robust command line tool to determine duration of sound file using more than the header
dan.hitt at gmail.com
Thu Aug 18 02:19:08 UTC 2016
I'm looking for a command line tool that can determine the length
(duration in seconds) of a sound file using more than just the file
The situation is that some of the files have incorrect headers.
The data is intact, and they play correctly, but if you attempt to
determine the length based solely on the header, it will be incorrect.
I've tried soxi, mediainfo, and ffprobe (on xubuntu 16.04), and all
seem to rely exclusively on the header.
soxi is good enough that it warns if there's a discrepancy between
what the header says and what is present in the file, in a message to
stderr, but the value to stdout (from soxi -D) is the incorrect header
I suppose i could write code to parse soxi's error message, but would
much prefer to have some option to pass to the program that says "use
file length instead of header info in the event of a conflict".
TIA for any suggestions!
More information about the Linux-audio-user