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 > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th September 2021, 01:02   #21  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
Dolby's official E-AC3 encoders are dramatically better than what's available in ffmpeg, and in addition to being better quality the Dolby tooling (e.g. Dolby Encoding Engine) can properly analyze and set DRC and dialnorm metadata. They also of course support the 7.1 and Atmos / JOC flavors of E-AC3.

The AC3 and E-AC3 encoders in ffmpeg are fine for most folks use cases (mostly getting S/PDIF compatibility for 5.1 audio), but they definitely don't represent the bitstream capabilities
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 8th September 2021, 03:37   #22  |  Link
bokeron2020
Registered User
 
Join Date: Aug 2021
Location: Sea of Doubts
Posts: 28
Quote:
Originally Posted by Blue_MiSfit View Post
Dolby's official E-AC3 encoders are dramatically better than what's available in ffmpeg, and in addition to being better quality the Dolby tooling (e.g. Dolby Encoding Engine) can properly analyze and set DRC and dialnorm metadata. They also of course support the 7.1 and Atmos / JOC flavors of E-AC3.

The AC3 and E-AC3 encoders in ffmpeg are fine for most folks use cases (mostly getting S/PDIF compatibility for 5.1 audio), but they definitely don't represent the bitstream capabilities
That was out of the question. What was being compared was ffmpeg AC3 vs. ffmpeg EAC3.

I would like to have a Dolby Encoder to test... but we hobbyists can't play with big boy's toys.
bokeron2020 is offline   Reply With Quote
Old 8th September 2021, 07:46   #23  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
Of course, just stating for anyone jumping to the end of the thread
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 8th September 2021, 15:00   #24  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Well, if your claims are true, then we should avoid encoding at very low bitrates for both AC-3 and E-AC-3. I personally encode all my Blu-rays with E-AC-3 5.1 @ 960 kbps and can't tell the difference between it and the source lossless DTS HD MA
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 8th September 2021, 20:28   #25  |  Link
bokeron2020
Registered User
 
Join Date: Aug 2021
Location: Sea of Doubts
Posts: 28
Quote:
Originally Posted by microchip8 View Post
Well, if your claims are true, then we should avoid encoding at very low bitrates for both AC-3 and E-AC-3. I personally encode all my Blu-rays with E-AC-3 5.1 @ 960 kbps and can't tell the difference between it and the source lossless DTS HD MA
I'm not really claiming anything.
I was interested in getting opinions on the results I have, wether to confirm or disprove them, and also to expose it to people with the knowledge to explain what's going on with ffmpeg's AC3/EAC3.

At 960 I doubt we'd hear any difference even comparing to the proverbial choir of angels

FWIW, I guess 640 is more than enough for 5.1 ffmpeg's AC3/EAC3
bokeron2020 is offline   Reply With Quote
Old 8th September 2021, 22:48   #26  |  Link
j7n
Registered User
 
j7n's Avatar
 
Join Date: Apr 2006
Posts: 137
Quote:
Originally Posted by bokeron2020 View Post
Or is there really no quality difference between EAC3 and AC3 for the same bitrate/channels even using professional codecs and comparing between them?
Quote:
I would like to have a Dolby Encoder to test...
The Dolby encoder degrades more gracefully at extremely low bitrates than ffmpeg. 5.1 music at 256 kbit/s is unlistenable with ffmpeg. But those bitrates should not be used. I would prefer AC-3 for maximum compatibility with 2 or 6 channels. Audio size is easy to handle relative to video, with modern internet connections or storage.

EC3 has slightly more bandwidth than AC3 at the same bitrate. I struggle to hear a significant difference with normal music, apart from artificial killer samples with sharp impulses such as "Everything Is Green" where ffmpeg is more smeared. But the reason for that is mainly my worn ears.

Tools with the Dolby encoder are frustrating to use. They either require split channels, encode only one file at a time, or read from directshow with random delay and limited maximum file size, or the GUI is bloated and awkward, may require mapping of input channels. There is a plugin for Sound Forge, it can take floating point input, but seems to work only with stereo.

j7n.sytes.net/misc/ac3samples/
j7n is offline   Reply With Quote
Old 9th September 2021, 01:22   #27  |  Link
bokeron2020
Registered User
 
Join Date: Aug 2021
Location: Sea of Doubts
Posts: 28
Quote:
Originally Posted by j7n View Post
The Dolby encoder degrades more gracefully at extremely low bitrates than ffmpeg. 5.1 music at 256 kbit/s is unlistenable with ffmpeg. But those bitrates should not be used. I would prefer AC-3 for maximum compatibility with 2 or 6 channels. Audio size is easy to handle relative to video, with modern internet connections or storage.

EC3 has slightly more bandwidth than AC3 at the same bitrate. I struggle to hear a significant difference with normal music, apart from artificial killer samples with sharp impulses such as "Everything Is Green" where ffmpeg is more smeared. But the reason for that is mainly my worn ears.

Tools with the Dolby encoder are frustrating to use. They either require split channels, encode only one file at a time, or read from directshow with random delay and limited maximum file size, or the GUI is bloated and awkward, may require mapping of input channels. There is a plugin for Sound Forge, it can take floating point input, but seems to work only with stereo.

j7n.sytes.net/misc/ac3samples/
I just did a quick test using your samples and encoding your wav to Ac3 so I can compare with current ffmpeg version, the one I used for my own tests. I've marked those as *myf*

Equinox in stereo:
  • equinoxf_pro128.Ac3 - ABX 10/10
  • equinoxf_pro128.Ec3 - ABX 10/10
  • equinoxf_myf128.Ec3 - ABX 10/10
pro-Ec3 has a slight edge over pro-Ac3, though.


  • equinoxf_pro192.Ac3 - ABX 8/10
  • equinoxf_pro192.Ec3 - ABX 7/10
  • equinoxf_myf192.Ac3 - ABX 10/10
pro-Ec3 still have a slight edge over pro-Ac3


  • equinoxf_pro256.Ac3 - ABX 6/10
  • equinoxf_pro256.Ec3 - ABX 3/10
  • equinoxf_myf256.Ac3 - ABX 7/10
pro-Ac3 is almost transparent to me but I still can tell it apart if I focus on very specific sounds.
pro-Ec3 is basically transparent to me here... I think I still hear something different somewhere but couldn't pinpoint it well enough so I might be simply wrong.


  • equinoxf_myf384.Ac3 - ABX 5/10
ffmpg's Ac3 @384 is apparently transparent but I think I could find something to focus on if I took more time to test.



Sooo... pro-Ec3 > pro-AC3 > ffmpeg AC3 ... quite what everybody expected, I suppose
I'll try 5.1 when I have time (If I have time)


PS: Did I read something about Dolby Encoding Engine being used via CLI? I think that would speed things up when automating via scripting even if you need to split 5.1 tracks to 6 wav files. Once your script is working the process would be transparent to you.
bokeron2020 is offline   Reply With Quote
Old 9th September 2021, 08:45   #28  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
Quote:
Originally Posted by j7n View Post
Tools with the Dolby encoder are frustrating to use. They either require split channels, encode only one file at a time, or read from directshow with random delay and limited maximum file size, or the GUI is bloated and awkward, may require mapping of input channels. There is a plugin for Sound Forge, it can take floating point input, but seems to work only with stereo.

j7n.sytes.net/misc/ac3samples/
Dolby Encoding Engine is a very flexible general purpose CLI application that also has a REST API. It accepts lots of different input file formats (I often feed interleaved RF64 pcm_s24le WAV files)
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 9th September 2021, 09:13   #29  |  Link
Etroxamin
Registered User
 
Join Date: Jul 2021
Location: Bremen, Germany
Posts: 36
dolby e-ac3 encoder will sound better in most cases i guess, unless a bitrate is used where it eventually won't make sense to do lossy encoding at all.

on the other side, there might be a bitrate, giving ffmepg a try over dolbys settings:

Eventually you may listened to music, or sound in lossless high quality. A day later you istened to the same audio in lossy, for whatever reason and without even much hearing you can actually say after a few seconds, that this sounds horrible to you in some way. While doing comparisons directly, the difference might not be so obviously.

This may sounds very subjective, but you can't just hear music, you can also feel it and much like this seems obviously for bass sounds (as we all know how it feels to stand near to huge speaker) there are also high frequencies stimulating the brain, even if we can't hear them with our ears, this is known known as "hypersonic effect".

Consdering this, at a certainly high bitrate, like 150-200kbps per channel and more, ffmepg may not sound better, but feels better

but that's just theory of course, i actually don't know if the dolby encoder will put more bits into high frequencies, if a lvl of quality is more or less saved by a certain bitrate already - could be the case, or not and the dolby encoder starts to waste bitrate at some point.

Unfortunately i cant say much about ac3 vs eac3, only that you may not always should compare directly, but make a delayed test, and choose by your feeling.
Etroxamin is offline   Reply With Quote
Old 13th September 2021, 16:40   #30  |  Link
SquallMX
Special SeeD
 
Join Date: Nov 2002
Location: Mexico
Posts: 333
Quote:
Originally Posted by bokeron2020 View Post
That was out of the question. What was being compared was ffmpeg AC3 vs. ffmpeg EAC3.

I would like to have a Dolby Encoder to test... but we hobbyists can't play with big boy's toys.
Old versions of Adobe Audition had an official EAC3 encoder, is way better than the one at FFMPEG, but not perfect, at 256 Kbps it created some ringing on sources with 15.7 Khz tones (The line frequency of old NTSC TVs, very common on dubs), I had to manually lowpass such files in order to avoid it.
SquallMX is offline   Reply With Quote
Old 14th September 2021, 12:54   #31  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Quote:
Originally Posted by nevcairiel View Post
The main reason E-AC3 was added to FFmpeg was that it allows flexible bitrate values (including a higher maximum), and not just the pre-defined presets AC3 uses. New E-AC3 coding tools are not actually implemented, unless required by the bitstream.
Due to some coding improvements its minimally better then AC3 at any given bitrate, but probably not even measurable.
That is true but higher bitrates were broken for a very long time until I investigated and mkver fixed it. That was like an one liner fix. https://trac.ffmpeg.org/ticket/8513

AFAIK, there is no limit on maximum bitrate

Last edited by Balling; 14th September 2021 at 13:11.
Balling is offline   Reply With Quote
Old 14th September 2021, 12:57   #32  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Quote:
Originally Posted by Etroxamin View Post
Eventually you may listened to music, or sound in lossless high quality. A day later you istened to the same audio in lossy, for whatever reason and without even much hearing you can actually say after a few seconds, that this sounds horrible to you in some way. While doing comparisons directly, the difference might not be so obviously.
Actually, ffmpeg EAC3/AC3 decoder has DRC turned on by default. You can turn it off, though Dolby recommends using it.
Balling is offline   Reply With Quote
Old 14th September 2021, 13:01   #33  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Quote:
Originally Posted by Blue_MiSfit View Post
Dolby's official E-AC3 encoders are dramatically better than what's available in ffmpeg, and in addition to being better quality the Dolby tooling (e.g. Dolby Encoding Engine) can properly analyze and set DRC and dialnorm metadata. They also of course support the 7.1 and Atmos / JOC flavors of E-AC3.

The AC3 and E-AC3 encoders in ffmpeg are fine for most folks use cases (mostly getting S/PDIF compatibility for 5.1 audio), but they definitely don't represent the bitstream capabilities
DRC can be decoded by ffmpeg, by default. TrueHD decoder is not supporting DRC, that is one of its key limitations (besides decoding 7.1 full 24 bit content that is somehow not lossless). Now encoders are not supporting DRC, true. https://patchwork.ffmpeg.org/project...mbs@rcombs.me/

Last edited by Balling; 16th September 2021 at 09:26.
Balling is offline   Reply With Quote
Old 31st January 2024, 00:55   #34  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Has there been any improvement in ffmpeg DDP implementation?

I have a 2.1 (L,R,LFE) DTS audio file that ffmpeg only could encode in 2.1 keeping proper channel configuration.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 24th February 2024, 06:31   #35  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
Quote:
Originally Posted by tormento View Post
Has there been any improvement in ffmpeg DDP implementation?

I have a 2.1 (L,R,LFE) DTS audio file that ffmpeg only could encode in 2.1 keeping proper channel configuration.
Can you clarify your issue?
Balling is offline   Reply With Quote
Old 25th February 2024, 10:16   #36  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Balling View Post
Can you clarify your issue?

I always use DEE but it lacks some channel configurations, such as 2.1 and 6.1.

The last time I used ffmpeg it went up to 5.1 and the quality wasn’t optimal.

Hence my question about ffmpeg DDP improvement, if any.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 25th February 2024, 11:56   #37  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 272
There is many improvements, since last your donations.
richardpl 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 20:35.


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