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 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th December 2017, 21:11   #1  |  Link
Madcow
Registered User
 
Join Date: Sep 2017
Posts: 5
I learned about ffmpeg, x264/x265 and the best CRF's, but what about audio?

Hi,

I ripped a bunch of my Blu-Rays after reading a lot about ffmpeg, x264, x265 and the specific settings, presets and CRF values. I think my rips look very nice and have a very small footprint for their quality (being around 12 GB a disc).

I also found that the answer to the question to life the universe and everything is x264 with a CRF between 16 and 21 with a tune/preset that fits the movie. Maybe I am exaggerating a bit, but as someone who doesn't want to obtain a doctorate, that is truly everything I need to know.

I was hoping that for the audio files there is a very similar approach. Like 15 years ago where you would just decode everything into MP3 with a VBR of around 192 and never be wrong with that.

It would be great, if you could give a practical example for one of my Blu-Rays here. All languages are equally important, so I would not encode a foreign language in with a lower bitrate. But I would not keep two audio streams of the same language. In this case, one is apparently of better quality.

Thanks!

Code:
    Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 2152919
      DURATION-eng    : 03:47:00.608000000
      NUMBER_OF_FRAMES-eng: 1276932
      NUMBER_OF_BYTES-eng: 3665508800
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.7 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-09-23 15:52:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1509000
      DURATION-eng    : 03:47:00.608000000
      NUMBER_OF_FRAMES-eng: 1276932
      NUMBER_OF_BYTES-eng: 2569187184
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.7 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-09-23 15:52:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:3(deu): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 640000
      DURATION-eng    : 03:47:00.608000000
      NUMBER_OF_FRAMES-eng: 425644
      NUMBER_OF_BYTES-eng: 1089648640
      SOURCE_ID-eng   : 001101
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.7 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-09-23 15:52:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:4(ita): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 640000
      DURATION-eng    : 03:47:00.608000000
      NUMBER_OF_FRAMES-eng: 425644
      NUMBER_OF_BYTES-eng: 1089648640
      SOURCE_ID-eng   : 001102
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.10.7 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2017-09-23 15:52:18
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Madcow is offline   Reply With Quote
Old 12th December 2017, 23:24   #2  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 744
From what I see, the quality of the video you use therefore deserves good audio quality. It is safest to use aac (or m4a, which is the container) at a quality of at least 128 vbr 5.1 (there are radio stations that consider this broadcast quality of 128 aac as premium). Well, that's my opinion, maybe people like tebasuna51 suggest an even higher quality. You could use for coding fdkaac, fhgaac (my favorites), Apple and ffmpeg. All are available with BeHappy. Good luck!

PD: if you use mp3 192 vbr IMHO I do not think it's going so badly but aac is not going to disappoint you.
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 12th December 2017 at 23:27.
GMJCZP is offline   Reply With Quote
Old 12th December 2017, 23:58   #3  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Today I simply flac audio and don't worry about it. It is lossless too so I can always reencode it if I want to.

If I want to save space for some reason I use AAC at 160 kbps (stereo), I usually keep multichannel audio as flac and downmix to stereo if I want to save space.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 2nd January 2018, 02:43   #4  |  Link
abolibibelot
Registered User
 
Join Date: Jun 2015
Location: France
Posts: 46
If you want to keep multichannel audio, 128kb/s may not be enough to preserve a satisfying quality (especially considering the generous settings chosen here for the video part). Approximately twice that would be needed, possibly more if the soundtrack is hectic. Therefore, if audio is in AC3, there's little to be gained by converting to AAC 5.1 (going from 384kb/s to ~256kb/s, compared with the whole size of the file it's not worth the trouble). If audio is in DTS, it's more interesting though, as those have a much higher bitrate. With QAAC (command line frontend for Apple AAC encoder) you can set the quality at “91” (it's just an arbitrary number, not an actual bitrate) for all your rips and it will produce very high quality transcoded streams, regardless of the input (you just don't know the final bitrate beforehand). Fraunhofer's encoders (fdkaac, fhgaac) are equally well reputed, but I haven't tried them, they probably have a similar quality-based setting. The other AAC encoders are inferior from what I could gather (including ffmpeg's native one, even though it's said to have been improved lately).

Here's a command line I used to convert 7.1 DTS to 5.1 AAC :
Code:
FOR %%F in (*.dts) do "C:\Path_to_ffmpeg\ffmpeg.exe" -i "%%F" -f wav -acodec pcm_f32le - | "C:\Path_to_qaac\qaac.exe" -V 82 -i --no-delay - -o "%%~nF.m4a"
(“82” is already very good, “91” is a tad better)
abolibibelot is offline   Reply With Quote
Old 12th January 2018, 09:31   #5  |  Link
Nexin
Registered User
 
Join Date: Dec 2007
Posts: 150
NUMBER_OF_BYTES-eng: 3665508800 = 3495.7016 Megabyte
Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s

Normally I would say always keep the original audio. acodec copy or simlar option. If need to compress most people will say aac @ 128 and is what the scene mostly uses.

I agree aac is ATM the best choice audio for video encoded with CBR and always the LC option.

Beware of aac 128 which is the minimum borderline. Below aac 128 the audio starts to suffer, the drop is steep and fast. I would suggest aac 192 CBR LC is a safer choice.

Find what bitrate is the aac equivalent for DTS 1536 kb/s and use that as the aac bitrate or a few bits higher.

Or do a search here is one.
Code:
DTS 1536 Kb/s -> AAC, what bitrate to encode?

https://hydrogenaud.io/index.php/topic,86677.0.html
Nexin is offline   Reply With Quote
Reply

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 09:02.


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