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 July 2021, 20:54   #41  |  Link
Ripmann
Registered User
 
Join Date: Nov 2019
Posts: 73
Quote:
Originally Posted by tebasuna51 View Post
I want a Atmos surround 3D (at least 5.2.1) EAC3 encoder better than a 2D 7.1
I didn't realize that these are two separate things. That's what I'm after as well. The main problem here is that any 5.1-converted backups I'll make will have noticeably inferior audio quality compared to the originals, so my only choice is to copy TrueHD and waste a crapload of space in the process.

Is there any tangible progress going in that area? As in, is there any reason to expect that any of the existing tools will start supporting 7.1/5.2.1 by the end of this year? Hope an expert will chime in to give a quick status update.
Ripmann is offline   Reply With Quote
Old 9th July 2021, 00:58   #42  |  Link
junh1024
Registered User
 
Join Date: Mar 2011
Posts: 59
DDP 71 is inefficient due to 4ch surround replacement as others have said.

qAAC & FDK AAC should support 71 AAC, which might be suitable for your purposes.
junh1024 is offline   Reply With Quote
Old 9th July 2021, 04:19   #43  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,990
Dolby Encoding Engine is a great option for this. Yes it's a paid pro tool, but if you're a pro it's reasonably (imo) priced.
Blue_MiSfit is offline   Reply With Quote
Old 9th July 2021, 09:47   #44  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,961
Quote:
Originally Posted by Ripmann View Post
...The main problem here is that any 5.1-converted backups I'll make will have noticeably inferior audio quality compared to the originals...
For what?

To emulate a 2D surround over a point is enough 3 speakers, like humans have 2 ears it is better 4 speakers in the 4 corners. For what do you need 7 speakers?

If you need more quality 2D use better bitrate, if you need more power buy a new AVR/speakers 5.1 with more power. It is enough a 4.1 but we can respect the standards.

[EDIT] If you have already a AVR 7.1 you can use qaac AAC like junh1024 say. I tested it with my AVR 5.2.1, configured like 7.1, and work fine.
Of course you need a player (PC or standalone) than send PCM 7.1 to the AVR by HDMI.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 9th July 2021 at 10:09. Reason: add info
tebasuna51 is online now   Reply With Quote
Old 10th July 2021, 12:48   #45  |  Link
junh1024
Registered User
 
Join Date: Mar 2011
Posts: 59
Quote:
Originally Posted by tebasuna51 View Post
For what?

To emulate a 2D surround over a point is enough 3 speakers, like humans have 2 ears it is better 4 speakers in the 4 corners. For what do you need 7 speakers?

If you need more quality 2D use better bitrate, if you need more power buy a new AVR/speakers 5.1 with more power. It is enough a 4.1 but we can respect the standards.
40 is a bit unstable & has a tiny sweet spot, and there are compromises depending on speaker placement for 51, so 71 is a HQ option for 2D. SOundtrack/mixing is also a factor.
junh1024 is offline   Reply With Quote
Old 10th July 2021, 18:27   #46  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,961
Quote:
Originally Posted by junh1024 View Post
40 is a bit unstable & has a tiny sweet spot
Sorry, I don't understand you.

Quote:
there are compromises depending on speaker placement for 51
I think there are much more compromises for 7.1
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is online now   Reply With Quote
Old 13th July 2021, 12:45   #47  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,934
Quote:
Originally Posted by Blue_MiSfit View Post
Dolby Encoding Engine is a great option for this. Yes it's a paid pro tool, but if you're a pro it's reasonably (imo) priced.
+1.
That's what everyone uses professionally and it can take a DAMF as input and encode it to like E-AC3 5.1.4 Atmos etc.
For people it's gonna be good 'cause it encodes directly to what the end-user should receive. Of course it's less good for broadcasters 'cause we're better off with Dolby ED2 as mezzanine and then encode in consumer-tier codecs, but still, for your scenario it's what you're looking for, but of course it's not free, just like literally everything Dolby has ever made eheheheheh
FranceBB is offline   Reply With Quote
Old 9th August 2021, 15:59   #48  |  Link
ymgenesis
Registered User
 
Join Date: Jul 2021
Posts: 7
Quote:
Originally Posted by Ripmann View Post
Putting it back on topic, I'm kind of stumped that there seem to be no available 7.1 E-AC3 solutions in 2021, especially considering that uncompressed TrueHD 7.1 streams for movies routinely take is 3-4GB in [mostly wasted] space.

Were there any developments in 7.1 E-AC3 encoding since 2020? I just started looking for it (finally got a cheap 7.1 speaker set) and was genuinely surprised to learn that neither eac3to nor ffmpeg support this rather essential feature. Anyone?
Has anyone looked into how Plex handles TrueHD 7.1 streams? It uses something called EasyAudioEncoder to decode TrueHD 7.1 and encode to eac3 7.1, all on the fly during transcoding. Therefore, that means their transcoder (which is basically just FFmpeg) is able to utilize a custom or proprietary decoder/encoder (EasyAudioEncoder) to convert TrueHD 7.1 (and probably DTS MA 7.1) to eac3 7.1.

Looking more into this... I looked at the transcoder console as it started transcoding TrueHD to eac3 7.1 and found the FFmpeg commands it used to do this. It uses a decoder for TrueHD called "truehd_eae", and an encoder for EAC3 7.1 called "eac3_eae", "eae" being EasyAudioEncoder. I couldn't find reference to this *coder anywhere, but Plex is using it on the fly to convert TrueHD to EAC3 7.1 (streaming Atmos with full 7.1 channels, not Blu-ray 5.1 with some others). The command output is packaged into a TS stream (for streaming to the Plex player), but it wouldn't be hard to alter the FFmpeg command to output to a file instead of a TS stream.

Next step for anyone interested would be to figure out how to use those tools locally on command line outside of Plex. The tools are installed when installing Plex, and are there, it's just a matter of mimicking the manner in which Plex calls EasyAudioEncoder, and passing the Plex Transcoder (FFmpeg) the right options. Plex itself recommends using its transcoder from time to time on the command line. Link, see "Use the Plex Transcoder".

Last edited by ymgenesis; 9th August 2021 at 16:12.
ymgenesis is offline   Reply With Quote
Old 13th August 2021, 02:47   #49  |  Link
ymgenesis
Registered User
 
Join Date: Jul 2021
Posts: 7
Seeing as the title of this thread is "Looking for a eac3 7.1 encoder", I figure this is on-topic:

Building on my idea above, I wrote a UNIX/macOS only bash script that manages various audio conversions in MKVs using FFmpeg/FFprobe and EasyAudioEncoder (TrueHD 7.1/DTS MA 7.1 to EAC3 7.1 encoding included). It requires some resource gathering from your Plex installation on your machine to the script’s folder, but once setup its fairly powerful and straight forward. Script and instructions are macOS only, though with some tweaking of the script, and a little exploration of your Plex installation, you could probably configure it on Linux.

Requires up-to-date Plex Media Server, FFmpeg, and FFprobe (as of writing).

https://github.com/ymgenesis/AudioTool

Last edited by ymgenesis; 13th August 2021 at 15:05.
ymgenesis is offline   Reply With Quote
Old 13th August 2021, 07:06   #50  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,990
Quote:
Originally Posted by FranceBB View Post
+1.
That's what everyone uses professionally and it can take a DAMF as input and encode it to like E-AC3 5.1.4 Atmos etc.
For people it's gonna be good 'cause it encodes directly to what the end-user should receive. Of course it's less good for broadcasters 'cause we're better off with Dolby ED2 as mezzanine and then encode in consumer-tier codecs, but still, for your scenario it's what you're looking for, but of course it's not free, just like literally everything Dolby has ever made eheheheheh
Current releases of DEE can take DAMF or ADM-BWF as input which is emerging in popularity since it's just a single Broadcast WAV file with all the fancy baked in metadata.

I'd actually never even heard of ED2! So what, it's backwards compatible with good old Dolby E so you can route it over SDI / AES (8 channels per pair)? How does that work if you're carrying immersive audio that might have dozens of overlapping objects? Wouldn't you need a variable number of SDI/AES pairs?

Also, yuck compressed audio!
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 26th August 2021, 08:41   #51  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 692
Quote:
Originally Posted by ymgenesis View Post
Seeing as the title of this thread is "Looking for a eac3 7.1 encoder", I figure this is on-topic:

Building on my idea above, I wrote a UNIX/macOS only bash script that manages various audio conversions in MKVs using FFmpeg/FFprobe and EasyAudioEncoder (TrueHD 7.1/DTS MA 7.1 to EAC3 7.1 encoding included). It requires some resource gathering from your Plex installation on your machine to the script’s folder, but once setup its fairly powerful and straight forward. Script and instructions are macOS only, though with some tweaking of the script, and a little exploration of your Plex installation, you could probably configure it on Linux.

Requires up-to-date Plex Media Server, FFmpeg, and FFprobe (as of writing).

https://github.com/ymgenesis/AudioTool
Why not a Windows build ???
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 28th August 2021, 14:38   #52  |  Link
ymgenesis
Registered User
 
Join Date: Jul 2021
Posts: 7
Because I don't develop/script for Windows. No experience. The script and concept is open on Github. If someone has the necessary experience they can adapt it.
ymgenesis is offline   Reply With Quote
Old 5th September 2021, 08:09   #53  |  Link
Lollaskates
Registered User
 
Join Date: Feb 2021
Posts: 4
EasyAudioEncoder appears to use MainConcept's Dolby Digital Plus Pro SDK, statically compiled. Pretty neat.
Lollaskates is offline   Reply With Quote
Old 8th September 2021, 01:24   #54  |  Link
bokeron2020
Registered User
 
Join Date: Aug 2021
Location: Sea of Doubts
Posts: 28
Quote:
Originally Posted by Lollaskates View Post
EasyAudioEncoder appears to use MainConcept's Dolby Digital Plus Pro SDK, statically compiled. Pretty neat.
In Plex Media Server for Windows it looks like they've compiled a custom ffmpeg with eae encoder/decoder enabled ("Plex Transcoder.exe"), though it needs dlls.

Is it the same thing?
bokeron2020 is offline   Reply With Quote
Old 16th September 2021, 09:24   #55  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 541
Quote:
Originally Posted by bokeron2020 View Post
In Plex Media Server for Windows it looks like they've compiled a custom ffmpeg with eae encoder/decoder enabled ("Plex Transcoder.exe"), though it needs dlls.

Is it the same thing?
Yes. It is -c:a eac3_eae, truehd_eae. See: https://github.com/ymgenesis/AudioTo...iotool.sh#L333
Balling is offline   Reply With Quote
Old 17th September 2021, 14:52   #56  |  Link
Lollaskates
Registered User
 
Join Date: Feb 2021
Posts: 4
The ffmpeg in the transcoder is old, and it doesn't decode dtshdma 7.1 . After testing of it's decoding and looking at the resulting audio, its only decoding 5.1 DTS core. This also means when plex thinks its transcoding DTSHDMA -> AAC 7.1, its actually taking 5.1 DTS and upmixing it to 7.1 (probably just copying the side channels to rear). Modern ffmpeg does decode DTSHDMA correctly, so to maintain all channels we can decode 7.1 dtshdma to FLAC or similar lossless with modern ffmpeg, then input the FLAC to Plex transcoder/eae to encode 7.1 EAC3.

eae doesn't seem to respect the bitrate you set with ffmpeg args, it'll always encode at 1024kbps. I'm looking into it too.

I've also written a windows equivalent in powershell (that accepts args) and has an accompanying batchfile with drag and drop functionality. It only works with audio: drop in audio and get out eac3 7.1. that's all I'd use it for, I'd use modern ffmpeg for any other operation. There's no need to pass the transcoder ffmpeg video related information, can just do simple audio conversion.

truehd_eae seemed to decode and produce the same file that modern ffmpeg decodes with its truehd codec, so no issue there. The only useful thing here imo is eac3_eae. After I polish up this powershell implementation i'll look into hooking it nicely into Staxrip or something for ease of use.

Last edited by Lollaskates; 17th September 2021 at 17:53.
Lollaskates is offline   Reply With Quote
Old 1st October 2021, 02:49   #57  |  Link
ymgenesis
Registered User
 
Join Date: Jul 2021
Posts: 7
Quote:
Originally Posted by Lollaskates View Post
The ffmpeg in the transcoder is old, and it doesn't decode dtshdma 7.1 . After testing of it's decoding and looking at the resulting audio, its only decoding 5.1 DTS core. This also means when plex thinks its transcoding DTSHDMA -> AAC 7.1, its actually taking 5.1 DTS and upmixing it to 7.1 (probably just copying the side channels to rear). Modern ffmpeg does decode DTSHDMA correctly, so to maintain all channels we can decode 7.1 dtshdma to FLAC or similar lossless with modern ffmpeg, then input the FLAC to Plex transcoder/eae to encode 7.1 EAC3.
Bummer. I had a feeling it was too good to be true when it just seemed to work in the same manner as TrueHD. Maybe Plex will update this one day. I use/rip TrueHD 7.1 sources whenever I can, so it doesn't affect me too much. Plus, my LG TV doesn't support DTS at all, so a 5.1 upmix to 7.1 isn't that bad at the moment.

Quote:
Originally Posted by Lollaskates View Post
eae doesn't seem to respect the bitrate you set with ffmpeg args, it'll always encode at 1024kbps. I'm looking into it too.
I noticed this as well when I tried to up the quality to see if it would change the poor audio limiting in some instances.

Quote:
Originally Posted by Lollaskates View Post
The only useful thing here imo is eac3_eae. After I polish up this powershell implementation i'll look into hooking it nicely into Staxrip or something for ease of use.
Very cool!
ymgenesis is offline   Reply With Quote
Old 1st October 2021, 08:56   #58  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,961
Quote:
Originally Posted by ymgenesis View Post
... so a 5.1 upmix to 7.1 isn't that bad at the moment.
I can't understand, upmix 5.1 to 7.1?
Any AVR 7.1 do so on the fly without need a previous upmix wasting time and space.

Quote:
I noticed this as well when I tried to up the quality to see if it would change the poor audio limiting in some instances.
Poor quality with a bitrate of 1024 Kb/s?
With 640 Kb/s is already 'transparent' for many speakers and ears.

BTW I can help to do a GUI if there are a free eac3 (for windows) encoder with 7.1 support.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 1st October 2021 at 09:13.
tebasuna51 is online now   Reply With Quote
Old 3rd October 2021, 15:30   #59  |  Link
ymgenesis
Registered User
 
Join Date: Jul 2021
Posts: 7
Quote:
Originally Posted by tebasuna51 View Post
Poor quality with a bitrate of 1024 Kb/s?
With 640 Kb/s is already 'transparent' for many speakers and ears.
To elaborate, EasyAudioEncoder limits/compresses loud audio (much like a limiter, compressor, or maximizer in audio production does). In some particularly loud instances it can cause some awful volume fluctuation/flutters. I originally thought it was a side effect of the bitrate, however I learned it was the encoder's normalization process itself. More here.

Quote:
Originally Posted by tebasuna51 View Post
BTW I can help to do a GUI if there are a free eac3 (for windows) encoder with 7.1 support.
I guess EasyAudioEncoder is technically free, but it is packaged and licensed to Plex Media Server and its users. It requires a license file that comes with the installation. So while not exactly a paid tool, it is still licensed. Also, I paid for PlexPass, so I'm not 100% sure if its available to free users. Maybe someone can confirm this.
ymgenesis is offline   Reply With Quote
Old 3rd October 2021, 18:55   #60  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,961
About your post in plex forum:

- The -filter_complex' '[0:a:0] aresample=async=1cl='\''7.1''\'':rematrix_maxval=60.000000dBsr=48000[0]' '-map' '[0]'
do absolutly nothing over the TrueHD decoded audio because is already 7.1 and 48 KHz. Don't exist resample or rematrix.

[- I can't know if there are fluctuations but in your sample the EAC3 7.1 is -15 dB less volume than TrueHD or EAC3 5.1 track.
The sample have high volume but without clip and a encoder with this behaviour is usseless to transcode audio tracks.]

- The ffmpeg eac3 track is limited to 5.1 but do a aceptable recode with the same volume than the TrueHD.

EDIT: I was wrong in the second point.
The problem is the DRC data included in the EAC3 stream, the 3 tracks in your MKV play at same level if the player don't apply the Dynamic Range Compression.
Decoded the track with the ffmpeg parameter -drc_scale 0 output the full audio volume.

Code:
File: C:\tmp\Bsid12.eac3
Size: 1302528 bytes
----------------------------------------- First Frame Info
StrmTyp .....................: 0 (0=Ind, 1=Dep, 2=AC3)
SubStreamID .................: 0 
FrameSize....................: 2292 bytes (573 Kb/s)
SampleRate ..................: 0 (48000 Hz)
NumBlksCod ..................: 3 (6 Blocks)
Audio coding mode (acmod) ...: 7 (3/2 - L, C, R, SL, SR)
Low frequency effects channel: 1 (Present)
Version (bsid) ..............: 12 (Other sintax)
Dialogue normalization ......: -31 dB
Dynamic Range gain ..........: -0.27 dB
Mixing metadata .............: 0 (Not exist)
Informational metadata ......: 0 (Not exist)
Additional Bsi ..............: 0 (Not exist)
----------------------------------------- Revised EAC3 Info
Dyn. Range min/max : -18.06/3.34 dB
Frames Tot/Ind/AC3.: 636 / 318 / 0
Bitrate average... : 1024 Kb/s
Duration ..........: 10176 ms (0 h. 0 m. 10.176 s.)
------------------------------------------------- End Info
Like you can see the DRC force to attenuate the volume until -18 dB or amplify 3 dB, it's normal listen fluctuations.

Then the problem in the PLEX forum is solved configuring the player to don't apply DRC (like is always recommended, use 'Night mode' or similar in the AVR)
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 4th October 2021 at 03:30.
tebasuna51 is online now   Reply With Quote
Reply

Tags
eac3

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 17:12.


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