Using .NET to detect .ogg file properties? Number of channels, bits per channel, sample rate? [closed]

痴心易碎 提交于 2019-12-11 12:03:25

问题


Does anyone know how to detect various .ogg file properties such as the number of channels, bits per channel, and the sample rate?

I would like to do this without using DirectX, can anyone recommend a library that could do it. Can anyone recommend an open-source library that could do it, which could be called from managed code ?


回答1:


I think NAudio can do this, but I'm not entirely sure. I know it can encode audio to ogg, but I'm not sure if it can read existing ogg files.

A StackOverflow user has posted a piece of code for working with ogg files: https://stackoverflow.com/a/8152967/14606




回答2:


Figured it out and wrote about it:

http://ellismis.com/2012/01/06/using-c-net-to-detect-ogg-vorbis-file-properties/




回答3:


Don't know of a library, but the file format looks pretty sane. You should be able to write some fairly trivial code to do this.

See http://en.wikipedia.org/wiki/Ogg#File_format



来源:https://stackoverflow.com/questions/8668767/using-net-to-detect-ogg-file-properties-number-of-channels-bits-per-channel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!