[英]How can I generate a random mp3 file?
For a personal project I'm trying to write some code that will generate an MP3 file with random noise. 对于个人项目,我正在尝试编写一些代码,以生成带有随机噪声的MP3文件。 I opened up an mp3 file in sublime text and saw that there was a hexadecimal format of thousands of lines of 8 sets of 4 hexidecimal numbers in the file.
我打开了一个高品质的mp3文件,发现文件中有成千上万行的十六进制格式,其中包含8组4个十六进制数字。 Ex...
恩...
4944 3303 0000 0002 0c27 5459 4552 0000
4944 3303 0000 0002 0c27 5459 4552 0000
0005 0000 0032 3031 3454 5055 4200 0000
0005 0000 0032 3031 3454 5055 4200 0000
1f00 0001 fffe 4800 6500 6c00 6c00 6f00
1f00 0001 fffe 4800 6500 6c00 6c00 6f00
So I wrote some code to randomly generate millions of lines of that. 所以我写了一些代码来随机生成数百万行。 The issue is that when I try to open it in itunes or VLC it says the song is zero seconds long.
问题是,当我尝试在iTunes或VLC中打开它时,它说歌曲的长度为零秒。 This makes me think that there is some sort of metadata that the random generation is botching up.
这使我认为随机生成正在破坏某种元数据。 Is there a simple guide on how to make an mp3 file from scratch or a guide on how to make sensible metadata?
是否有关于如何从头开始制作mp3文件的简单指南,或有关如何制作明智的元数据的指南?
如果您查看“ MP3规格”,它会告诉您哪些位代表什么, 也许有些位需要硬编码为特定值?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.