Find out the recorded time of an audio file
30 次查看(过去 30 天)
显示 更早的评论
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 个评论
Walter Roberson
2022-4-28
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/
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!