# Unsatisfactory audio quality for music / ability to show video from file

**URL:** <https://openvidu.discourse.group/t/unsatisfactory-audio-quality-for-music-ability-to-show-video-from-file/279>\
**Category:** How to implement?\
**Tags:** v2\
**Created:** [March 20, 2020, 1:22pm UTC](https://openvidu.discourse.group/t/unsatisfactory-audio-quality-for-music-ability-to-show-video-from-file/279 "2020-03-20T13:22:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigmatt](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@bigmatt](https://openvidu.discourse.group/u/bigmatt)\
**Post date:** [March 20, 2020, 1:22pm UTC](https://openvidu.discourse.group/t/unsatisfactory-audio-quality-for-music-ability-to-show-video-from-file/279/1 "2020-03-20T13:22:07Z")

</div>

Hello,

I’m building webinar application based on the openvidu-mvc-node tutorial. Main purpose is for videoconferencing and screen sharing. So far I really like how OpenVidu is working!

However I came across to issues:

1. When I stream desktop audio content that is more than just speech (it is most noticeable with low volume music) the quality of audio is not that great. Is there anything I can do to force better quality? I used OpenVidu Server configuration parameters to force higher max bitrates or made publisher resolution option higher but it does not have any effect. It sounds almost like a lower frequency for audio is used. Is it defined anywhere and could it be changed?

2. I would like to pass a video from a file on my server to my publisher and have it shown to all subscribed at the same time - is it something that can be done in OpenVidu?

Many thanks!  
Matt

---

<div class="post-metadata">

**Author:** ![bigmatt](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@bigmatt](https://openvidu.discourse.group/u/bigmatt)\
**Post date:** [March 20, 2020, 3:06pm UTC](https://openvidu.discourse.group/t/unsatisfactory-audio-quality-for-music-ability-to-show-video-from-file/279/2 "2020-03-20T15:06:45Z")

</div>

Did some more digging and no matter what I do the audio stream seems to be capped at around 50kbps.

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [March 20, 2020, 4:48pm UTC](https://openvidu.discourse.group/t/unsatisfactory-audio-quality-for-music-ability-to-show-video-from-file/279/3 "2020-03-20T16:48:45Z")

</div>

1. The parameters to tweak the max and min bandwidth are only for video tracks. Audio quality will basically depend on what the client decides to capture and send. If its quality could be increased, it woud be in principle done somehow on the client side.
2. Yes, you can in fact do this very easily with the new IP Cameras feature of 2.12.0. When running this REST Operation ([https://openvidu.io/docs/reference-docs/REST-API/#post-apisessionsltsession\_idgtconnection](https://openvidu.io/docs/reference-docs/REST-API/#post-apisessionsltsession_idgtconnection)) in parameter **rtspUri** instead of an rtsp URL use a file URI like this: `file:///opt/videos/myVideo.mp4`

Take into account that the video file must be in the Kurento machine. You cannot use an http url there, must be a local path to the file.

Regards.

---

<div class="post-metadata">

**Author:** ![bigmatt](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@bigmatt](https://openvidu.discourse.group/u/bigmatt)\
**Post date:** [March 20, 2020, 5:17pm UTC](https://openvidu.discourse.group/t/unsatisfactory-audio-quality-for-music-ability-to-show-video-from-file/279/4 "2020-03-20T17:17:59Z")

</div>

Awesome, many thanks! I will look into the client side for audio.

---

<div class="post-metadata">

**Author:** ![bigmatt](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@bigmatt](https://openvidu.discourse.group/u/bigmatt)\
**Post date:** [March 20, 2020, 5:32pm UTC](https://openvidu.discourse.group/t/unsatisfactory-audio-quality-for-music-ability-to-show-video-from-file/279/5 "2020-03-20T17:32:55Z")

</div>

Sorry, to clarify - would that be client side of the publisher or subscriber?

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [March 20, 2020, 5:35pm UTC](https://openvidu.discourse.group/t/unsatisfactory-audio-quality-for-music-ability-to-show-video-from-file/279/6 "2020-03-20T17:35:01Z")

</div>

Publisher always. Try for example researching the audio constraints when creating the MediaStream: [https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints)

Maybe there’s somthing you can play with there.

Regards.

---

<div class="post-metadata">

**Author:** ![tusharspawar](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@tusharspawar](https://openvidu.discourse.group/u/tusharspawar)\
**Post date:** [August 18, 2020, 1:16pm UTC](https://openvidu.discourse.group/t/unsatisfactory-audio-quality-for-music-ability-to-show-video-from-file/279/7 "2020-08-18T13:16:43Z")

</div>

@bigmatt Did you have any audio quality improvements for music? If there are improvements then can you explain what changes did you do?

---

<div class="post-metadata">

**Author:** ![Bernard\_Song](https://avatars.discourse-cdn.com/v4/letter/b/76d3ee/32.png) [@Bernard\_Song](https://openvidu.discourse.group/u/Bernard_Song)\
**Post date:** [March 5, 2022, 8:02am UTC](https://openvidu.discourse.group/t/unsatisfactory-audio-quality-for-music-ability-to-show-video-from-file/279/8 "2022-03-05T08:02:20Z")

</div>

@bigmatt I also have this problem but basically it is when multiple speakers speaking (parallel streams), with audio quality degrading. We are using audio only so video is not even our concern. How can we prevent the audio quality from degrading (user input is high quality) by forcing the audio bitrate?
