[LAU] robust command line tool to determine duration of sound file using more than the header

From: Dan Hitt <dan.hitt@email-addr-hidden>
Date: Thu Aug 18 2016 - 05:19:08 EEST

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
header.

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
value.

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!

dan
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Thu Aug 18 08:15:01 2016

This archive was generated by hypermail 2.1.8 : Thu Aug 18 2016 - 08:15:02 EEST