Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th February 2021, 15:07   #1  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 76
Quiet audio from staxrip

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.

Last edited by YaBoyShredderson; 27th February 2021 at 17:01. Reason: Additional information
YaBoyShredderson is offline   Reply With Quote
Old 27th February 2021, 18:11   #2  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 390
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
jlw_4049 is offline   Reply With Quote
Old 27th February 2021, 18:55   #3  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 76
Quote:
Originally Posted by jlw_4049 View Post
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.
YaBoyShredderson is offline   Reply With Quote
Old 27th February 2021, 21:06   #4  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 390
Quote:
Originally Posted by YaBoyShredderson View Post
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
jlw_4049 is offline   Reply With Quote
Old 27th February 2021, 21:25   #5  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 76
Quote:
Originally Posted by jlw_4049 View Post
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)?
YaBoyShredderson is offline   Reply With Quote
Old 28th February 2021, 00:02   #6  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,124
Quote:
Originally Posted by jlw_4049 View Post
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.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is online now   Reply With Quote
Old 28th February 2021, 00:26   #7  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 390
Quote:
Originally Posted by tebasuna51 View Post
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
jlw_4049 is offline   Reply With Quote
Old 28th February 2021, 11:10   #8  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 76
Quote:
Originally Posted by tebasuna51 View Post
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.
YaBoyShredderson is offline   Reply With Quote
Old 28th February 2021, 20:00   #9  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 390
Quote:
Originally Posted by YaBoyShredderson View Post
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
jlw_4049 is offline   Reply With Quote
Old 28th February 2021, 20:42   #10  |  Link
YaBoyShredderson
Registered User
 
Join Date: Jul 2020
Posts: 76
Quote:
Originally Posted by jlw_4049 View Post
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.
YaBoyShredderson is offline   Reply With Quote
Old 1st March 2021, 01:49   #11  |  Link
jlw_4049
Registered User
 
Join Date: Sep 2018
Posts: 390
Quote:
Originally Posted by YaBoyShredderson View Post
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

Last edited by jlw_4049; 1st March 2021 at 01:54.
jlw_4049 is offline   Reply With Quote
Old 1st March 2021, 14:00   #12  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 7,124
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:
Code:
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:
Code:
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:
Code:
ffmpeg -i test.ac3 -af "volume=6dB" -acodec libopus -ab 128k test.opus
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is online now   Reply With Quote
Old 1st March 2021, 14:37   #13  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,936
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.

Last edited by hello_hello; 1st March 2021 at 15:09.
hello_hello is offline   Reply With Quote
Reply

Tags
ac3, audio, handbrake, opus, staxrip

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.