Skip to content
This repository has been archived by the owner on Nov 18, 2023. It is now read-only.

How to stream / pipe audio to a process #7

Open
antorsae opened this issue Oct 31, 2017 · 3 comments
Open

How to stream / pipe audio to a process #7

antorsae opened this issue Oct 31, 2017 · 3 comments

Comments

@antorsae
Copy link

antorsae commented Oct 31, 2017

Hi, I got plaincast to work on a headless raspberry pi, after launching and casting audio to it I get:

./bin/plaincast
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started

could you point me to where I may change the output of plaincast to pipe it to a different process. My goal is to take the audio e.g. in a know format e.g. 44k 24 bit (or 16 bit) 2 ch and pipe it into ecasound https://ecasound.seul.org/ecasound/

Any pointer you could bring would be great.

@aykevl
Copy link
Owner

aykevl commented Oct 31, 2017

It uses MPV (actually libmpv) as a backend. You can see it here:
https://github.com/aykevl/plaincast/blob/master/apps/youtube/mp/mpv.go

Can you try playing a file (any audio file) using mpv and see if that works?

@antorsae
Copy link
Author

after installing mpv (it was not installed) I get:

$ mpv noise-51.wav
Warning: mpv was compiled against a different version of libav than the shared
library it is linked against. This can expose subtle ABI compatibility issues
and can lead to misbehavior and crashes.
Playing: noise-51.wav
[libav/demuxer] wav: max_analyze_duration 5000000 reached
[stream] Audio (+) --aid=1 (pcm_s16le)
[ao/alsa] Playback open error: No such file or directory
[ao/oss] Can't open audio device /dev/dsp: No such file or directory
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
[ao/jack] cannot open server
AO: [null] 44100Hz stereo 2ch s16
A: 00:00:11 / 00:00:12 (98%)


Exiting... (End of file)

and streaming:

 ./bin/plaincast
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started

@aykevl
Copy link
Owner

aykevl commented Oct 31, 2017

I would suggest first trying to get normal MPV playback to work the way you want to use it (with ecasound). If that works, I'll take a look what I can do to make it work with plaincast.
EDIT: or does it work already?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants