-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Filtering Mid-Stream #6
Comments
To my knowledge it's not possible without restarting ffmpeg, which could be done, you could stop ffmpeg and start it at the timestamp it stopped, but im not planning on adding anything like that myself. |
It's possible, but you need to use an obscure sparsely documented option: https://ffmpeg.org/ffmpeg-filters.html#zmq_002c-azmq Outside of this document and a few mailing list conversations, I can't find much more information about doing this on the fly without restarting ffmpeg (not ideal). |
@alexwh I've already looked into that, and given its dependency on another framework it doesn't seem like something nice to play with. I'm considering forking this library anyway, so maybe I'll consider a pass-through ffmpeg process to get the raw PCM data, change the volume programmatically, and then pass it back through another ffmpeg process for shipping off to Discord. |
I've also been wanting for a little more control over the audio stream data and ffmpeg options. Personally, I think restarting a new ffmpeg process with filters applied is a better solution than running two in tandem (you could keep the old one running until the new one is ready to send data, and sync their playing time, then make the switch). Without doing that though, zmq seems to be the only supported way of doing this within ffmpeg, next is just figuring out the arcane filter syntax ffmpeg uses. I believe if the process is initialized with all the filters you will ever want to use, but with their parameters set to a default value, it is then possible to tweak their numbers with zmq messages. |
If you can figure out a way to do this purely in Go, please let me know! |
Ah i didn't know ffmpeg had that kinda feature, the documentation on this seems really shit tough (which is probably why i didn't know about it) |
Yeah I've looked into it myself and it's not fun to work with due to the lack of proper documentation. |
Studying the source of
dca
and its current setup, I've been doing my best to try and research if there's any possible way to filter audio output mid-stream using FFMPEG and some message with an STDIN pipe. My reason for trying to figure this out is I absolutely love the simplistic librarydca
provides (and I even plan on adding a few things of my own in the near future with a pull request), however it seems almost impossible to change the volume mid-stream or apply equalizer effects mid-stream unless FFMPEG specifically allows it.If you have the knowledge on how to do this, it'd be an amazing feature for
dca
to have. Even if you don't feel like doing it yourself, I'd be happy to help add it for things like changing the volume mid-stream should you or anyone else know how to go about it.Thanks in advance for anything pertaining this,
JoshuaDoes
The text was updated successfully, but these errors were encountered: