简体   繁体   English

新的音频文件格式

[英]New Audio File Format

Is there any ways to create my own audio file format? 有什么方法可以创建自己的音频文件格式? I'm planning to create simple player with its codec. 我打算用其编解码器创建简单的播放器。 What should I learn before now? 我现在应该学习什么?

thanks. 谢谢。

An audio file format is not the same as an audio codec. 音频文件格式与音频编解码器不同。 For example the WAV file format can contain audio compressed with a wide variety of codecs. 例如,WAV文件格式可以包含使用多种编解码器压缩的音频。

To create your own audio compression format, you would need to learn a lot about digital signal processing (DSP). 要创建自己的音频压缩格式,您需要学习很多有关数字信号处理(DSP)的知识。 The approach you take depends on what type of audio you are compressing (eg speech or music, mono or stereo etc), and how you weigh the tradeoff between audio quality and file size. 您采用的方法取决于您要压缩的音频类型(例如,语音或音乐,单声道或立体声等),以及如何权衡音频质量和文件大小之间的权衡。

I suggest checking out the xiph.org site, because they have information on multiple audio codecs which are free, open, and unencumbered by patents. 我建议您访问xiph.org网站,因为它们具有有关多个音频编解码器的信息,这些音频编解码器是免费的,开放的,并且不受专利保护。

As mentioned by Mark Heath, the first step is to understand the difference between a container format, such as ogg or WAV , and a compression algorithm , implemented by a codec. 正如Mark Heath提到的,第一步是了解容器格式(如oggWAV )与由编解码器实现的压缩算法之间的区别。 The WAV container format is most often used for uncompressed PCM audio, although it is also possible to use it with MP3 and a few other compressed audio formats. WAV容器格式最常用于未压缩的PCM音频,尽管也可以将其与MP3和其他一些压缩的音频格式一起使用。 The ogg container format is commonly used with the Vorbis codec, especially when encoding music. ogg容器格式通常与Vorbis编解码器一起使用,尤其是在编码音乐时。 A container format can usually contain multiple audio channels (eg stereo audio), or video and audio channels with synchronization, using different codecs for each. 容器格式通常可以包含多个音频通道(例如,立体声音频)或具有同步的视频和音频通道,每个通道使用不同的编解码器。

Other audio codecs that can be used with ogg include speex (for speech), CELT (for ultra-low delay audio), and FLAC (for lossless audio compression). 可与ogg一起使用的其他音频编解码器包括speex (用于语音), CELT (用于超低延迟音频)和FLAC (用于无损音频压缩)。 All of these codecs are open and you can read about and compare the different features, algorithms, and design decisions of each in order to determine the unique goals for your project. 所有这些编解码器都是开放的,您可以阅读并比较每种功能的不同功能,算法和设计决策,从而确定项目的独特目标。 Before designing a new codec, you will probably want to read through and fully understand the specifications for any of these codecs that are similar. 在设计新的编解码器之前,您可能需要通读并完全理解任何类似的编解码器的规范。 Wikipedia also has a comparison of audio codecs, in table form. Wikipedia还以表格形式比较了音频编解码器。

Why flood the space with more codecs that we don't really need? 为什么要用我们实际上不需要的更多编解码器充斥整个空间? Use something that's already widely adopted and save yourself unnecessary man hours. 使用已经被广泛采用的方法,并节省不必要的工时。

除非您是为了获得学习经验而这样做,否则我认为,已经有很多编解码器和播放器可以使用,而创建另一个编解码器则弊大于利。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM