Op ma 2 aug. 2021 om 17:40 schreef Federico Miyara <fmiyara at fceia.unr.edu.ar>:> > 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.If you are looking for a tool, take a look at the metaflac command line utility. metaflac --list file.flac returns all metadata in a FLAC file> 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.Strange, I am not able to replicate that behaviour. When I use flac -d --skip 0 --until 1 file.flac I get a WAV file with a single sample per channel. I tested with a mono and a stereo file. Can you perhaps share the full command line you're using?
Martijn,> If you are looking for a tool, take a look at the metaflac command > line utility. metaflac --list file.flac returns all metadata in a FLAC > fileThanks, this is very interesting.>> 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. > Strange, I am not able to replicate that behaviour. When I use flac -d > --skip 0 --until 1 file.flac I get a WAV file with a single sample per > channel. I tested with a mono and a stereo file. Can you perhaps share > the full command line you're using?It is embarrassing, I cannot replicate it either. The only explanation I can find is that I was not running flac from the command line but through the command line function dos() of Scilab. When arranging the command string to pass to the function I used string variables instead of the actual 0 and 1, and it is possible that they contained different values from the desired (and believed) ones. Apologies, my fault. Regards, 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/20210805/062914a7/attachment.htm>