开发者

How to generate an audio stream using gst-python?

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 lo开发者_运维技巧oks 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?


Take a look at appsrc (gst-inspect appsrc). I used its counterpart appsink 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜