-
Notifications
You must be signed in to change notification settings - Fork 73
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
add audio support for playing video files #69
Comments
Adding audio will open a whole can of worms as it might be hard to have an implementation that works on Linux (and the various flavors from simple ALSA to jack etc) and MacOS. |
I was just going over this again and did a little bit of research - apparently there is an audio library which works on most platforms called "sox": https://sourceforge.net/p/sox/code/ci/master/tree/ Update: Maybe it would be easier to add terminal image protocol support to mpv which is a mediaplayer that can also output to the terminal: mpv-player/mpv#9605 |
OpenAL or Portaudio might be options, I believe. If I have the time, I might try to look into this. |
PulseAudio for Linux would work, since most people are either using that or PipeWire which implements compatibility layers for Pulse and Alsa. MacOS is easy since it has a single Audio API. There must be a library for C that implements all this, don't know any names since I'm not that familiar with the C ecosystem. |
It might not help but I have found a simple workaround, #!/bin/zsh
trap '' INT
player () (
afplay $@ & timg $@
)
player $@
pkill timg
pkill afplay instead of afplay we can use any other terminal headless audio player as well and if it has output then simply we can |
The text was updated successfully, but these errors were encountered: