如何使用 gst-python 生成音频流?
我希望在 gstreamer 中生成流,如果可能的话,我更愿意从 python 中生成流。这指向使用 gst-python,但我没有看到明确的方法。看起来创建一个新流需要制作一个 gstreamer 插件,而 gst-python 似乎无法做到这一点。
为了澄清,我希望能够生成传递给声卡的实际值,例如,允许我制作正弦曲线音调。我不想使用内置的 python OSS 支持,因为它有点过时,并且锁定 /dev/dsp。
有人建议尝试一下吗?或者甚至另一个(现代)音响系统可以做到这一点?
I'm looking to generate a stream in gstreamer, and I'd prefer to do it from python if possible. This points towards using gst-python, but I don't see a clear way to do it. It looks like creating a new stream would require making a gstreamer plugin, which gst-python doesn't seem to be able to do.
To clarify, I'd like to be able to generate the actual values getting handed to the sound card, allowing me to, for example, make a sine-curve tone. I don't want to use the built-in python OSS support, as it's a bit outdated, and locks /dev/dsp.
Does anyone have a suggestion of something to try? Or even another (modern) sound system that can do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看
appsrc
(gst-inspect appsrc
)。我使用其对应的appsink
从 gstreamer 管道中获取数据。这是一个(几乎)有效的示例。 http://gstreamer-devel.966125.n4。 nabble.com/appsrc-random-crash-td973529.html
Take a look at
appsrc
(gst-inspect appsrc
). I used its counterpartappsink
to get data out of a gstreamer pipeline.And here's an (almost)-working example. http://gstreamer-devel.966125.n4.nabble.com/appsrc-random-crash-td973529.html