[flac-dev] Two questions

Federico Miyara fmiyara at fceia.unr.edu.ar
Mon Aug 2 15:40:14 UTC 2021


Dear All,

1) Is there a way to get the audio size (number of samples) and other 
information, such as number of channels, from a flac file without fully 
decoding it?
I've found that the WAV header is replicated after the "riffRIFF" 
keyword, but I don't seem to be able to predict where it is located or 
whether it is safe or not to asume that the first time such keyword 
appears is the correct one, and if there is an upper bound for its 
location; for instance, some text such as the name of a song or some 
comment could contain that keyword, even if it is unlikely. The 
information preceding the  "reference libFLAC 1.3.3" encoder version 
seems to be non-text information.

2) I decode using the option --skip=0 --until=1. I would expect to get a 
wav file with only 1 sample, but I get 3 samples. Stictly no sample 
should be decoded since 0 samples should be skipped and the help says:

--until={#|[+|-]mm:ss.ss}  Stop at the given sample number for each 
input file. The given sample number is not included in the decoded output.

so sample #1 should not be included, unless the first sample is sample 
#0, in which case only 1 sample, and not 3 samples, should be included 
in the output file.

Thanks,

Federico Miyara


-- 
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20210802/82dd1837/attachment.htm>


More information about the flac-dev mailing list