restreamer icon indicating copy to clipboard operation
restreamer copied to clipboard

Add audio filter volume to stream

Open pick-and-mix opened this issue 3 years ago • 7 comments

Is there anyway to edit (I assume) live.json to get -af "volume=6dB" to work.

I have a really quiet stream and i used volumestect and I need to boost the audio by 6db.

I have tried adding it to live.json, but it either hasnt worked or errors out. Any help would be great.

pick-and-mix avatar Feb 28 '22 14:02 pick-and-mix

You should edit the audio_codec_aac and/or audio_codec_mp3section in the live.json. It might look like this for AAC encoding:

"audio_codec_aac": {
   "outputOptions": [
      "-codec:a aac",
      "-bsf:a aac_adtstoasc",
      "-af volume=6dB",
   ]
},

In the UI you have to select AAC encoding for the audio stream.

ioppermann avatar Feb 28 '22 14:02 ioppermann

yes that is pretty much what i was doing. "-af volume=6dB", needs the comma removing or you get a docker syntax error.

But even with the correct syntax, it doesnt seem to do anything. The audio level stays the same. I have tried boosting it by a ridiculous dB and it does nothing. The audio stays at the same level I have also tried normalizing: "-af dynaudnorm=f=150:g=15" and that does nothing, audio stays at the same level.

I am encoding the audio to aac: AAC encode 64Kbit/s stereo 44100 Hz. The last two I have even tried inherit.

Is the audio edited in any way after ffmpeg has encoded the audio and is passed on to hls?

pick-and-mix avatar Feb 28 '22 16:02 pick-and-mix

How did you transport this modification into the container? Did you build your own image?

You can also simply mount the modified live.json in to the official image by adding this option to your docker command, e.g.:

docker run ... -v /path/to/your/modified/live.json:/restreamer/conf/live.json ... datarhei/restreamer:latest

ioppermann avatar Mar 01 '22 08:03 ioppermann

The way I done it was: SSH into server and then run: sudo docker exec -t -i restreamer /bin/bash Installed nano the first time I logged into docker. cd /restreamer/conf cp live.json live.json.bck This is a backup of the original file, in case of problems. nano live.json Make changes and save. exit sudo reboot

If it doesnt work go back in and run: cp live.json.bck live.json and reboot

pick-and-mix avatar Mar 01 '22 16:03 pick-and-mix

Please check this with the Restreamer v2 🚀. We would be happy to receive feedback.

svenerbeck avatar Jun 21 '22 19:06 svenerbeck

Sorry, I was a bit hasty with the closing. We will add this to the feature request list. https://github.com/datarhei/restreamer/discussions/345

svenerbeck avatar Jun 21 '22 20:06 svenerbeck

Hello @pick-and-mix The v2.2.0 now supports the volume filter. Here is a overview: https://docs.datarhei.com/restreamer/knowledge-base/user-guides/how-to-use-the-audio-filters

Here it is: Video Edit > Audio Settings > Audio Encoding (AAC/MP3) > Filter

Cheers

jstabenow avatar Jul 22 '22 11:07 jstabenow

💛 If you were satisfied with the support, and we could help you, please rate us on Google.

svenerbeck avatar Nov 15 '22 09:11 svenerbeck