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

Add audio filter volume to stream #313

Closed
pick-and-mix opened this issue Feb 28, 2022 · 8 comments
Closed

Add audio filter volume to stream #313

pick-and-mix opened this issue Feb 28, 2022 · 8 comments
Labels

Comments

@pick-and-mix
Copy link

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.

@ioppermann
Copy link
Member

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.

@pick-and-mix
Copy link
Author

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?

@ioppermann
Copy link
Member

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

@pick-and-mix
Copy link
Author

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

@svenerbeck
Copy link
Member

svenerbeck commented Jun 21, 2022

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

@svenerbeck
Copy link
Member

Sorry, I was a bit hasty with the closing. We will add this to the feature request list. #345

@jstabenow
Copy link
Member

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

@svenerbeck
Copy link
Member

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

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

No branches or pull requests

4 participants