Be able to recalculate the audio length field in headers #581
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Be able to recalculate the audio length field in headers
Description
Sone audio file types can have metadata in their headers
that give the length of the audio in sample frames or whatever.
It would be useful to be able to correct this if it is wrong,
such as if a file was written but could not be rewound to
rewrite its header, if a (e.g. MP3) file may need decoding fully
to determine its real length or if audio files are truncated.
Analysis
One way to implement this is to write an effect, say
fixlength,that modifies the audio stream's metadata as it passes through.
This would require temporary storage.
Another is a global option, say
--fix-length, that means"determine and rewrite the audio length in the header fields"
as it only affects the single output audio file.
It may be that SoX already does this if the output file is seekable
and e.g. lengths in ID3 or Xing tags are always recalculated.