Find out the recorded time of an audio file
27 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi There,
I have an .wav audio file which I have recorded and I would like to look into its metadata and extract the
recorded time of this file (e.g., 6:31:12 pm). First I was wondering if this is possible with MATLAB? and if so
could anyone guide me into the right path?
All the best,
Nikan
11 Kommentare
Walter Roberson
am 28 Apr. 2022
ID3v1 'ID3' chunks were placed at the end of .mp3 files.
ID3v2 'ID3' chunks were placed the the beginning of .mp3 files -- literally as the very first thing in the file.
If you have a .wav file that starts (very first thing) with 'ID3' then it cannot possibly be a valid .wav file.
If you are starting with a .wav file and using id3parse() from the File Exchange on the .wav, then that code will never be able to find ID3 tags in the file, even if they are present.
If you are starting with a .wav file and using some external utility to convert it to .mp3 file, and then using id3parse() from the File Exchange on the .mp3 file, then if the recorded date does not show up, you have several possibilities:
- the .wav file might not have that information stored anywhere in any form
- the .wav file might not have that information stored in a tag format that the particular conversion utility knows to look for; for example the recording date might be stored as a comment field but the convertor might not think to try to interpret comment fields as potential information to be added to the MP3 tags. That is, this situation covers the case where the information is not written following any of the more common ad-hoc ways of writing tags; it might be difficult to find conversion utilities that match whatever random way the information was written into the .wav file
- the .wav file might have the information stored using a different common ad-hoc way than the conversion utility expects, but a different convertor might know about the method (e.g., non-conforming ID3 chunk at the end of the file versus ID3 embedded in a conforming LIST chunk)
- the .wav file might (not common!) not have the information stored in the first header + body, as it might happen to consist of several WAV files concatenated together
- the .wav file might have it stored using a different identifier than is expected by the conversion program
Thus, the fact that the tag does not show up in a .mp3 file converted from .wav does not necessarily mean that the information was not present in the .wav in any form.... but it might mean that.
That particular information is not information that is commonly stored even with .mp3 files, so it would not be surprising if it does not show up in .wav files.
It might be interesting to run the .wav file through a program such as "Audio File Health Check" which is a MacOS program; https://2manyrobots.com/plaster/
Antworten (0)
Siehe auch
Kategorien
Mehr zu Audio and Video Data finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!