以编程方式操作多轨 ogg 文件

发布于 2024-07-19 20:48:32 字数 382 浏览 3 评论 0原文

我计划创建一个用于操作多轨 OGG 文件的程序,但我对相关库没有任何经验,因此我正在寻找有关为此使用哪种语言/库的建议。 我对这种语言并没有任何偏好,我很乐意用 C、C#、Python 等任何能让事情变得最简单(甚至可能)的语言进行编码。 也许甚至有可能以某种方式实现 Audacity 的自动化?

就要求而言,我并不是在寻找任何特别奇特的东西。 它可能是一个命令行程序,我不需要能够播放音频,绘制波形的图像表示等。该程序基本上将用作转换器,但我需要在之前进行一些处理输出。 也就是说,我需要能够以编程方式删除一些轨道、设置每个轨道的平移、更改轨道音量等。没什么太复杂的,只是一些基本处理,然后以 MP3 或易于转换为 MP3 的格式输出结果,例如WAV。

任何建议或一般信息将不胜感激,谢谢。

I'm planning to create a program for manipulating multi-track OGG files, but I don't have any experience with the relevant libraries, so I'm looking for recommendations about which language/library to use for this. I don't really have any preference for the language, I'll happily code it in C, C#, Python, whatever makes things the easiest (or even possible). Perhaps it's even a possibility to automate Audacity somehow?

In terms of requirements, I'm not looking for anything particularly fancy. It will probably be a command-line program, I don't need to be able to play the audio, draw image representations of the waveforms, etc. The program will basically be used as a converter, but I need to do some processing before outputting. That is, I need the ability to programatically remove some tracks, set panning per-track, change track volumes, etc. Nothing too complex, just some basic processing, and then output the result in either MP3 or a format easily converted to MP3, such as WAV.

Any suggestions or general information would be appreciated, thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

穿透光 2024-07-26 20:48:32

SoX 只需使用命令行脚本就可以做很多这样的事情。

我使用 Python + Audiolab 来做更复杂的音频处理工作:

from audiolab import oggread, wavwrite

# Read in a file
data, fs, enc = oggread('test.ogg')

# Keep just the first two channels
newdata = data[:,0:2]

# Reduce by -6 dB
newdata *= 0.5

# Write to a new file
wavwrite(data, 'filename.wav', fs, enc)

SoX can do a lot of this stuff, just using command-line scripts.

I've used Python + Audiolab to do more complex audio processing stuff:

from audiolab import oggread, wavwrite

# Read in a file
data, fs, enc = oggread('test.ogg')

# Keep just the first two channels
newdata = data[:,0:2]

# Reduce by -6 dB
newdata *= 0.5

# Write to a new file
wavwrite(data, 'filename.wav', fs, enc)
卸妝后依然美 2024-07-26 20:48:32

尝试 BASS 库。 它位于 http://www.un4seen.com/bass.html 并且确实可以播放ogg/wav/mp3 以及其他一系列格式。 然后您可以转换/加入并执行 DSP(如压缩器/EQ/等)。

Try the BASS Library. it's located at http://www.un4seen.com/bass.html and it does play ogg/wav/mp3 and a whole other bunch of formats. You can convert/join then and do DSP like Compressor/EQ/etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文