FFmpeg no audio on stream with hassio

Hi everyone,

I was looking for some help with my ffmpeg configuration
The video stream works fine but don’t hear audio within hassio it looks like the sound is blocked bij hassio if I use VLC or onvif device manager or even ispy they all support video and audio with rtsp stream

If I try to open the audio stream with hassio rtsp://user:[email protected]:88/audio the screen keeps loading and no audio ( VLC etc works fine)

If i inspect the cam feed with chrome I see muted (see image below) I guess that is no good.

<video autoplay="" muted="" playsinline="" controls="" src="blob:https://192.168.1.43:8123/97cca49c-0d2e-4da0-a158-d23b48913860"></video>

I assume it needs some “extra_arguments:” but I can’t find a solution and can’t read the configurations for ffmpeg

Please help to get me my desired audio for monitoring my coming baby :slight_smile:

Thank you for reading,replying and helping !!

Hardware:

  • Fosbaby P1 camera
  • Raspberry pi3 hassio
ffmpeg:
  ffmpeg_bin: /usr/local/bin/ffmpeg

camera: 
  - platform: foscam
    ip: 192.168.1.158
    port: 544
    username: user
    password: pass
    name: Fosbaby

  - platform: ffmpeg
    input: rtsp://user:[email protected]:88/videoMain
    extra_arguments: -q:v 2
    
    
    
  - platform: ffmpeg
    input: rtsp://user:[email protected]:88/audio    
#    input: -rtsp_transport tcp -i rtsp://user:[email protected]:88/videoMain
#    extra_arguments: -drc_scale == 0


  - platform: mjpeg
    mjpeg_url: http://192.168.1.158:88/videostream.cgi?user=user&pwd=pass
    name: Fosbaby_mjpeg  

  - platform: generic
    still_image_url: http://192.168.1.158:888/jpg/image.jpg
    stream_source: rtsp://192.168.1.158:88
    username: user
    password: pass
    name: Fosbaby Generic

  - platform: onvif
    host: 192.168.1.158
    port: 888
    username: user
    password: pass
    name: Fosbaby onvif
    

1 Like

hello,

did you find a solution to this? i also want to hear audio…

Hi Chilman

I did not found a solution

ah thx, too bad…would be nice to have audio

Just wanted to bump this thread to see if anyone has any new information. Thanks!

Hi, I have the same problem with a generic IP Cam : works great for streaming with ffmpeg or rtsp, but in both case I can never get the audio in hassio.

Same problem here with 2 wyze cam with RTSP enabled. video and sound streaming fine in VLC. Video streaming fine but no sound in hassio.

stream:
camera:
    - platform: ffmpeg
      name: livingroom-cam
      input: !secret livingroom-cam-url

edit:
as mentioned in this post the audio seems to not be implemented in the stream component…

Same for me…Any news on that?

something new here?

Yep, audio was added to the stream component back in August, so if you’re running the latest version, you should have it.

It says only some codecs are supported. does anyone know what is supported and worked for them?

A look at the commits from that PR suggest AAC, AC3, and MP3. I’m not too familiar with that part of the codebase though, so take that with a grain of salt.

I am trying to get the audio stream. On VLC works great. What am I doing wrong?

ffmpeg:

camera:
  - platform: ffmpeg
    name: AlexiaCameraAudio
    input: rtsp://192.168.100.42/ch0_2.aac

You’re trying to add an audio stream do as a camera entity, which I imagine won’t work. What are you trying to do with the audio stream? If you’re trying to send it to a speaker or chromecast, you should just use that rtsp URL as your content URL. So a service call to media_player would look like:

entity_id: media_player.my_chromecast
service: media_player.play_media
data:
  media_content_type: music
  media_content_id: "rtsp://192.168.100.42/ch0_2.aac"

I am trying to play the audio on the device where the HA client I running (Android App or Browser).

1 Like

Did anyone solved issue with audio for ip cameras

1 Like

Don’t know, no one replied yet and I searched net, looks like no solution yet

Nope, meanwhile i have other camera’s :stuck_out_tongue: