Skip to content
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

Audio not working on new docker installation of fruitnanny #33

Open
James-h143 opened this issue Jul 5, 2020 · 5 comments
Open

Audio not working on new docker installation of fruitnanny #33

James-h143 opened this issue Jul 5, 2020 · 5 comments

Comments

@James-h143
Copy link

I have found i am getting the exact same error detailed here:
#28

This is on a new docker installation of fruitnanny for a new monitor i'm building, previously i followed the non docker installation instructions and this exact same microphone worked fine (although had some interferance).

@alogoc
Copy link

alogoc commented Jul 19, 2020

If you haven't found a solution already you can give a try to gsaudio. Pulseaudio never worked for my setup either.
I am starting gsaudio with the following arguments and it works fine with fruitnnany

gst-launch-1.0 -v alsasrc device=hw:1 ! queue ! audioconvert ! audioresample ! queue ! opusenc ! queue ! rtpopuspay ! queue max-size-bytes=0 max-size-buffers=0 ! queue ! udpsink host=127.0.0.1 port=5002

@TheMage79
Copy link

Hi all,
I have the same issue, with the same error messages for pulseaudio.

Did someone come up with a solution for this yet?
@alogoc I checked the /opt/fruitnanny/bin/audio.sh
and cannot see a difference in the arguments you provided.
Can you please elaborate what you mean with using gsaudio instead of pulseaudio?

I would be so happy if I could run the webinterface with audio and video support!
Best
Tobias

@NinjaGeoff
Copy link

NinjaGeoff commented Jan 10, 2021

If you haven't found a solution already you can give a try to gsaudio. Pulseaudio never worked for my setup either.
I am starting gsaudio with the following arguments and it works fine with fruitnnany

gst-launch-1.0 -v alsasrc device=hw:1 ! queue ! audioconvert ! audioresample ! queue ! opusenc ! queue ! rtpopuspay ! queue max-size-bytes=0 max-size-buffers=0 ! queue ! udpsink host=127.0.0.1 port=5002

Thank you for this! For whatever reason I couldn't get that to run when putting it in audio.sh, but editing the docker-compose.yml and putting that in as a command did the trick.

My setup:
Raspberry Pi Zero W
Official RPi Camera V2.1
Old AF logitech desk mic.
Raspbian Lite installed with the official Raspberry Pi Imager and fully updated as of 1/9/2021

@TheMage79
Copy link

Dear ghebert,
thank you for your answer.
I ended up with a similar approach which allowed me to get audio in the browser interface.
I put a similar pipline into a chronjob that starts at reboot. This worked for me.
My setup is a:
Raspberry Pi 4b 4GB
OV5647 Camera Sensor
iGOKU USB microfone
Raspberry Pi full installation with updates from 01/03/2021.

So in principal it works also this way, but I still have a problem with IOS.
In safari or chrome browser I can hear the audio, but it sounds somehow scrambled. I will try different opusenc settings to solve the problem. Will post an update here.

Best
Tobias

@egoitz89
Copy link

egoitz89 commented Aug 8, 2021

If you haven't found a solution already you can give a try to gsaudio. Pulseaudio never worked for my setup either.
I am starting gsaudio with the following arguments and it works fine with fruitnnany

gst-launch-1.0 -v alsasrc device=hw:1 ! queue ! audioconvert ! audioresample ! queue ! opusenc ! queue ! rtpopuspay ! queue max-size-bytes=0 max-size-buffers=0 ! queue ! udpsink host=127.0.0.1 port=5002

Wow! Thanks a lot. This worked for me! What is the best way to automatically launch this command? I've already tried putting in /opt/fruitnanny/bin/audio.sh but is not working. Should I put it in /opt/fruitnanny/docker-compose.yml? Couriusly it was commented:

  gstreamer-audio:
    image: ivadim/fruitnanny-gstreamer
    restart: always
    privileged: true
    network_mode: "host"
    depends_on:
      - janus
    devices:
      - "/dev/snd:/dev/snd"
#command: gst-launch-1.0 -v pulsesrc device=microphone ! audioconvert ! audioresample ! opusenc ! rtpopuspay ! queue max-size-bytes=0 max-size-buffers=0 ! udpsink host=127.0.0.1 port=5002
command: "/audio_entry.sh"
command: gst-launch-1.0 -v alsasrc device=hw:1 ! queue ! audioconvert ! audioresample ! queue ! opusenc ! queue ! rtpopuspay ! queue max-size-bytes=0 max-size-buffers=0 ! queue ! udpsink host=127.0.0.1 port=5002

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

No branches or pull requests

5 participants