View Full Version : Quiet audio from staxrip
YaBoyShredderson
27th February 2021, 15:07
I used to use handbrake to encode my videos, the audio would be encoded into ac3. Now im using staxrip, and im using opus audio. Watching on my tv, the audio is very quiet, i have to turn it up at least twice as far as i used to (15-20 up to 40-50). Whats going on here? It could be the show, ill have a look as i also have the handbrake encode.
EDIT: I muxed the ac3 audio from handbrake into the file from staxrip, along with the opus audio. I watched the video on my tv, and switched between the 2, ac3 from handbrake is clearly louder.
EDIT 2: Playing the 2 files on my PC, I dont notice a difference in volume, only on my tv.
jlw_4049
27th February 2021, 18:11
That's codec specific and not StaxRips fault. You can add gain if you'd like. You can also encode with staxrip in ac3 if you'd like.
Feel free to check out my software in my signature too.
Sent from my SM-G986U1 using Tapatalk
YaBoyShredderson
27th February 2021, 18:55
That's codec specific and not StaxRips fault. You can add gain if you'd like. You can also encode with staxrip in ac3 if you'd like.
Feel free to check out my software in my signature too.
Sent from my SM-G986U1 using Tapatalk
What do u mean its codec specific? Opus is just quieter on samsung tvs than ac3? Its very very quiet, not just a bit i jave to crank my tv up half way to its max.
jlw_4049
27th February 2021, 21:06
What do u mean its codec specific? Opus is just quieter on samsung tvs than ac3? Its very very quiet, not just a bit i jave to crank my tv up half way to its max.Every audio codec is different. Original DTS tracks are quieter then AC3. This isn't program specific but codec specific.
Opus is higher quality then AC3, you can use the gain option to raise the sound some during encode or you can continue using AC3.
If its stereo QAAC is really nice too.
StaxRip and my program supports all these options.
Sent from my SM-G986U1 using Tapatalk
YaBoyShredderson
27th February 2021, 21:25
Every audio codec is different. Original DTS tracks are quieter then AC3. This isn't program specific but codec specific.
Opus is higher quality then AC3, you can use the gain option to raise the sound some during encode or you can continue using AC3.
If its stereo QAAC is really nice too.
StaxRip and my program supports all these options.
Sent from my SM-G986U1 using Tapatalk
I would rather stick to ac3 if raising the gain far enough is going to affect quality. The audio is ridiculously quiet, i have to turn my tv up much higher just to even hear it. Why would it not affect the volume when i play it on my pc with vlc (or my phone even)?
tebasuna51
28th February 2021, 00:02
Every audio codec is different. Original DTS tracks are quieter then AC3. This isn't program specific but codec specific.
Sorry but that is not true. All codecs must output the same volume level than source if are decoded correctly.
Maybe is a problem of decoders is some devices, for you in the DTS, for YaBoyShredderson in the TV opus decoder.
jlw_4049
28th February 2021, 00:26
Sorry but that is not true. All codecs must output the same volume level than source if are decoded correctly.
Maybe is a problem of decoders is some devices, for you in the DTS, for YaBoyShredderson in the TV opus decoder.Sorry thats what I was getting at but couldn't figure out how to explain to him fully. Every codec is different per device.
Sent from my SM-G986U1 using Tapatalk
YaBoyShredderson
28th February 2021, 11:10
Sorry but that is not true. All codecs must output the same volume level than source if are decoded correctly.
Maybe is a problem of decoders is some devices, for you in the DTS, for YaBoyShredderson in the TV opus decoder.
If it was a problem with the way my tv decodes the audio, surely i would have more problems than just volume? If i turn it all the way up to the point where its level with ac3, it sounds the same.
jlw_4049
28th February 2021, 20:00
If it was a problem with the way my tv decodes the audio, surely i would have more problems than just volume? If i turn it all the way up to the point where its level with ac3, it sounds the same.Different codecs are decoded different by device. You can try to turn volume leveling on your TV, you can encode with extra gain, or you can encode with AC3 since you know your TV likes it.
Sent from my SM-G986U1 using Tapatalk
YaBoyShredderson
28th February 2021, 20:42
Different codecs are decoded different by device. You can try to turn volume leveling on your TV, you can encode with extra gain, or you can encode with AC3 since you know your TV likes it.
Sent from my SM-G986U1 using Tapatalk
Guess ill stick with ac3 then, size savings are not significant. I tested on my phone again, and ac3 is also significantly louder, though the quietness of opus isnt a problem. On my pc its only slightly quieter. Im not too well informed on audio encoding, but it makes no sense why a different codec would be so much quieter? Thats like H.265 being brighter than H.264, or AV1 being more saturated etc, doesnt make sense to me.
jlw_4049
1st March 2021, 01:49
Guess ill stick with ac3 then, size savings are not significant. I tested on my phone again, and ac3 is also significantly louder, though the quietness of opus isnt a problem. On my pc its only slightly quieter. Im not too well informed on audio encoding, but it makes no sense why a different codec would be so much quieter? Thats like H.265 being brighter than H.264, or AV1 being more saturated etc, doesnt make sense to me.Yeah, unfortunately it's just how the device takes the codec. You could easily encode it with gain. However applying gain could negatively effect the audio.
However, you can use ffmpeg to increase the volume during encode and as far as I know this wouldn't hurt the quality.
Sent from my SM-G986U1 using Tapatalk
https://uploads.tapatalk-cdn.com/20210301/9bb37b7e5e1ab76bc763a377e5eed461.jpg
tebasuna51
1st March 2021, 14:00
In order to amplify the volume without damage your audio you can use the volumedetect filter before.
Also to confirm the TV opus decode problem you can make some test over an audio ac3 converted to opus:
First check the volume:
ffmpeg -i test.ac3 -af "volumedetect" -acodec pcm_s24le test_ac3.wav
...
[Parsed_volumedetect_0 @ 000001c441599fc0] mean_volume: -26.4 dB
[Parsed_volumedetect_0 @ 000001c441599fc0] max_volume: -1.1 dB
...
Now convert to opus and recheck the volume:
ffmpeg -i test.ac3 -acodec libopus -ab 128k test.opus
ffmpeg -i test.opus -af "volumedetect" -acodec pcm_s24le test_opus.wav"
...
[Parsed_volumedetect_0 @ 0000024505fdee80] mean_volume: -26.5 dB
[Parsed_volumedetect_0 @ 0000024505fdee80] max_volume: -1.0 dB
...
Like you can see the volume is preserved (more or less with a lossy conversion)
This sample only admit amplify 1dB without distort.
If max_volume was -6 dB you can recode the opus with:
ffmpeg -i test.ac3 -af "volume=6dB" -acodec libopus -ab 128k test.opus
hello_hello
1st March 2021, 14:37
Maybe it's something to do with volume metadata. I know very little about opus, but I know the gain is supposed to be saved to the opus header, and maybe your TV has expectations regarding gain metadata, and maybe it reduces the volume when there aint none. Something like the way Dialnorm works for AC3.
Until an opus expert comes along (edit: tebasuna51 posted before I submitted mine, so there's an expert here now), have a look to see if there's any gain info saved (I checked with MediaInfo in debug mode).
00009 Frame (19 bytes)
000009 Identification (19 bytes)
000009 opus_codec_id: OpusHead
000011 opus_version_id: 1 (0x01)
000012 channel_count: 2 (0x02)
000013 preskip: 312 (0x0138)
000015 rate: 44100 (0x0000AC44)
000019 ouput_gain: 0 (0x0000)
00001B channel_map: 0 (0x00)
It's possible without a gain value, players are supposed to make an assumption, and the volume is reduced as a result of that assumption. Or maybe that's complete bollocks. I don't know.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.