View Full Version : eac3to - audio conversion tool
richardpl
10th May 2022, 09:32
Its dead software, Jim.
jpsdr
10th May 2022, 14:21
Its dead software, Jim.
If it's using Lazarus, it should be fine.
(Ok, i'm out...:o).
Barough
10th May 2022, 18:16
Good to see ya around again madshi. :)
Updating libFLAC.dll should be easy. Unfortunately updating the ffmpeg dlls is not easy at all. Most of the dlls I'm using have a stable interface, which means you can update to a newer build without a worry in the world. However, with ffmpeg, updating is never easy. It could screw with everything. E.g. I've experienced in the past that the channel order of decoders changed from one libav build to another. The internal structures change for sure, which makes things more difficult for Delphi. So everything would have to be carefully retested from scratch. That's not something I can do atm. Changing to other decoders and/or encoders is even more time consuming. That's why I love dlls like libFLAC.dll and libDcaDec.dll because they make my life easy. Don't get me wrong, I think ffmpeg is a wonderful project. I just wish they offered a precompiled dll version with a stable binary interface, and with no funny unexpected changes like channel order reordering from one version to another, or other things like that.
Updating shared FFmpeg DLL's can for sure become a issue. Seen other softwares using the DLL's and manual updates of those can do more harm then good......
Would be gr8 to see a new release from ya in the near future that contains dll's that's easily updated. ;)
Unfortunately you are right, Barough. Updating the ffmpeg core in VirtualDub2 has been delayed for ... generations of ffmpeg, I fear. Some changes in the API / ABI :confused: ... must have been fundamental.
Bandits
11th May 2022, 09:01
eac3to v3.36 released
* fixed: UHD Blu-Ray support didn't work with newer releases
* fixed: on some OSs there were crashes
* fixed: libav command line output hooking wasn't working properly
* added special handling for TrueHD seamless branching
* 2nd pass for audio gap fixing is auto-disabled for (UHD) Blu-Rays now
* libDcaDec: updated to 0.2.0
http://madshi.net/eac3to.zip
Sorry for the long absence. The new build mainly aims at fixing the most important UHD Blu-Ray problems.
Please note that the new TrueHD seamless branching feature aims only at preventing any "pops" or other unwanted artifacts. It does not try to keep proper sync. Which is usually not important for TrueHD because sync loss is less than 1ms per seamless branching file/part. However, there may be a few rare (UHD) Blu-Rays with an insane number of parts. In that case there may be a small sync mismatch at the end of the audio track. Or maybe not. eac3to now drops frames where it helps prevent audio artifacts. And it doesn't drop frames where that's better to prevent audio artifacts. So maybe sync is already perfect afterwards, I'm not sure. Needs to be tested. For most (UHD) Blu-Rays, sync will not be an issue, anyway.
Are there any devs interested in taking over eac3to development (bugfixes and improvements)? I'm considering open-sourcing it, because I don't have a lot of time for it now, and probably in the near future. However, eac3to is written in Delphi, and the code is not in great shape (due to constant lack of time). Plus, the source code might be more complex/long than many devs might expect, because of the simple reason that eac3to has a *lot* of features, some more obvious than others. In any case, I'm not going to spend any time on open-sourcing it if there are no devs who have serious interest in working on it.
Madshi, thank you for the update. Hope your current projects are doing well. Was there anything done to -minPlayListRuntime? I can't seem to use it anymore.
Curious what was done for gap handling in TrueHD. I know over at DGDemux (https://rationalqm.us/board/viewforum.php?f=16) they wrestled with it for a bit.
Once again thanks for the update.
manuelin
14th May 2022, 05:39
Which would be a good 1080p or UHD Blu-Ray to test that with? The bigger the subtitle sync issues the better. I can't promise a quick fix on that, though. If you find issues with TrueHD, that I might be able to fix more quickly, since I just worked on that, so I know the details. But subtitles would require me to deep dive into the related code, and that's not something I can do quickly.
Any disc with a playlist that is split into several m2ts files instead of just a single m2ts file should work for you.
This problem only occurs with UHD Blu-ray, in 1080p Blu-ray the PGS subtitles are perfectly demuxed.
If you need a concrete example, I can tell you for example the following film that I have at hand right now: Soul (2020).
If you try to demux the 1080p Blu-ray of this movie the PGS subtitles are perfect, but if you demux the UHD Blu-ray the PGS subtitles are out of sync. In this movie both discs (1080p and UHD) are synchronized, so both subtitles should have the same timings (not exactly identical, as sometimes some timings have 1ms differences, but it is correct as the original subtitles are like that).
For example, if you look at the last line (1855) of both PGS demuxed with eac3to, you will see that the 1080 Blu-ray times are Start: 01:40:28.856 / End: 01:40:30.233 but the UHD Blu-ray times are Start: 01:40:31.067 / End: 01:40:32.443.
UHD times should be the same as 1080. With possible differences of 1ms as I mentioned before, since the subtitle timings are really like that, slightly different (-/+ 1ms) in both PGS files.
Thank you very much in advance!
P.S. If you are interested I can tell you about other bugs:
- In the new version (v3.36) all UHD Blu-rays are broken (and at least in 3.34 it works), eac3to is now internally trying to perform some kind of conversion to video which causes it to always fail:
This video conversion is not supported. <ERROR>
- This has been a known problem for many years, so it must affect all versions of eac3to. The eac3 7.1 audios fail to demux if they have dialnorm, there is no problem if the audio does not have dialnorm. The error displayed is as follows:
Removing AC3 dialog normalization...
Applying (E-)AC3 delay failed. <ERROR>
Aborted at file position XXXXXXX. <ERROR>
I have verified that the failure is caused by trying to remove the dialog normalization, because if you try to set the parameter 'keepDialnorm' it works perfectly (although of course, the dialnorm is kept and not removed).
Although I don't understand why the log shows that it is applying delay, if there is no delay. Maybe this has something to do with this error?
So I understand that there are 2 options: the most advisable would be to try to fix eac3to so that it is also able to remove the dialnorm in this type of audios, or else the other option would be that eac3to applies internally the 'keepDialnorm' parameter only to this type of audios so that at least the process does not fail.
If you want to test with this bug, coincidentally the Blu-ray we discussed earlier (Soul) contains audio of this type.
As a note, I also have eac3 7.1 audios that are not from Blu-ray and on those audios the eac3to does not fail and correctly removes the dialnorm. I'm not sure what the difference is between an eac3 7.1 and another one, I only see these differences:
Audio that fails: eac3to shows that core is AC3 and MediaInfo reports this: Format profile: Blu-ray Disc.
Audio that does not fail: eac3to shows that core is E-AC3 and MediaInfo does not report anything (so the profile must be Standard).
So if you decide the option that eac3to applies internally the 'keepDialnorm' parameter, you should try to only do it for the audios that fail (Format profile: Blu-ray Disc), so that eac3to can continue to remove the dialnorm in the other audios that do not fail.
tormento
14th May 2022, 20:17
eac3to v3.36 released
Welcome back!
Would be possible to have a x64 build?
P.S: There are newer versions of the libraries you included:
LibFLAC 1.3.4 (https://www.rarewares.org/lossless.php)
AFTEN git-20091226 (https://github.com/wieslawsoltes/AftenWindowsBuilds/releases/tag/git-20091226)
DCADEC latest git (https://github.com/staxrip/staxrip/issues/32)
tebasuna51
15th May 2022, 03:34
libFLAC v1.3.4 for win32 (https://www.rarewares.org/files/lossless/flac_dll-1.3.4-x86.zip)
Rename the libflac_dynamic.dll to libflac.dll
AFTEN git-20091226 (https://github.com/wieslawsoltes/AftenWindowsBuilds/releases/tag/git-20091226)
Forget libAften (https://forum.doom9.org/showthread.php?p=1794293#post1794293), use ffmpeg to encode to AC3, EAC3, ...
DCADEC latest git (https://github.com/staxrip/staxrip/issues/32)
Last version already included in eac3to v3.36
tormento
15th May 2022, 07:21
use ffmpeg to encode to AC3, EAC3
Actually, I use ffmpeg to decode audio only and I use TotalStudio to encode to AC3/EAC3. :)
meemeemee
16th May 2022, 18:02
Thanks a lot @madshi for this updated release of eac3to. Two thumbs up!
I can confirm what Manuelin wrote: if you use -check or -demux on UHD blu-rays which are either HDR10 only or HDR10+ with DoVi, I get "This video conversion is not supported" error (regular blu-rays are OK). Working on 3.34
Question: is there some possibility to add function where you can omit with -demux function E-AC3 tracks? If you got at least one audio track in E-AC3, eac3to refuses to do -demux and stops with error. If you got a lot of streams to -demux, it needs to be done manually. Example:
3: E-AC3, English, 7.1 channels, 896kbps, 48kHz, dialnorm: -27dB
(core: AC3, 5.1 channels, 512kbps, 48kHz, dialnorm: -27dB)
4: AC3, Danish, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
5: AC3, Finnish, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
6: AC3, Norwegian, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
7: AC3, Swedish, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
8: Subtitle (PGS), English
9: Subtitle (PGS), Danish
10: Subtitle (PGS), Finnish
11: Subtitle (PGS), Norwegian
12: Subtitle (PGS), Swedish
13: Subtitle (PGS), Danish
14: Subtitle (PGS), Finnish
15: Subtitle (PGS), Norwegian
16: Subtitle (PGS), Swedish
Creating file "00983 - Chapters.txt"...
s15 Extracting subtitle track number 15...
a03 Extracting audio track number 3...
a05 Extracting audio track number 5...
a06 Extracting audio track number 6...
s14 Extracting subtitle track number 14...
s16 Extracting subtitle track number 16...
a07 Extracting audio track number 7...
s11 Extracting subtitle track number 11...
v02 Extracting video track number 2...
a03 Removing AC3 dialog normalization...
s08 Extracting subtitle track number 8...
a04 Extracting audio track number 4...
s10 Extracting subtitle track number 10...
a05 Removing AC3 dialog normalization...
s12 Extracting subtitle track number 12...
s13 Extracting subtitle track number 13...
a06 Removing AC3 dialog normalization...
s09 Extracting subtitle track number 9...
a07 Removing AC3 dialog normalization...
a03 Applying (E-)AC3 delay failed.
a04 Removing AC3 dialog normalization...
Aborted at file position 1048576.
Observation: I demuxed one problematic seamless-branched uhd blu-ray - F9 saga with both versions of eac3to and gaps in ms seems to be a little bit different. Timestamps are the same. Is this because of that new "Optimizing TrueHD steam" function?
Comparison of logs: https://slow.pics/c/55Reejzh
oniiz86
27th May 2022, 16:14
In the new version (v3.36) all UHD Blu-rays are broken (and at least in 3.34 it works), eac3to is now internally trying to perform some kind of conversion to video which causes it to always fail:
- This has been a known problem for many years, so it must affect all versions of eac3to. The eac3 7.1 audios fail to demux if they have dialnorm, there is no problem if the audio does not have dialnorm.
So since the latest 3.36 is effectively broken & should not be used, is it best to remain on 3.34?
I'm a bit confused because you say it's fine in 3.34 but than you say it has been a problem for many years so it must affect all versions of eac3to?
tormento
2nd June 2022, 08:21
Can someone update us about the situation on DTS and THD decoding by external libraries?
I'd like to try something "professional" instead of the usual eac3to libraries (or ffmpeg).
richardpl
2nd June 2022, 08:49
Here are no professional people at all. You can always use your hardware implementation by just passing compressed frames to it via some specified way.
Besides both THD and DTS are bitexact decoders in FFmpeg, so your blasphemy is uncalled for, unless you want to buy license for using those codec - then go ahead, buy it. I hope you will make some people more rich then they are right now.
tormento
2nd June 2022, 09:42
Besides both THD and DTS are bitexact decoders in FFmpeg
AFAIK ffmpeg decoders are reverse engineered, not the exact algorithm.
If the specifications are available, then the libav implementation is as exact as any other.
richardpl
3rd June 2022, 08:44
Even when you have arguments you are left with personal attacks from people that lacks knowledge.
Both DTS (all specifications are available) and THD (always lossless, no real specifications available) decodes bit by bit exact.
There is certain motion here and elsewhere that makes reverse engineering sounds bad, but if properly done it is not worse than original binary code, it can be even better if original binary have security issues with specially crafted files.
tebasuna51
3rd June 2022, 09:09
AFAIK ffmpeg decoders are reverse engineered, not the exact algorithm.
(Remember forum rule 4)
I make many test encoding sources to DTS-MA and the decoded output of ffmpeg are always bitexact with sources.
Even better than ArcSoft decoders, with supossed original algorithms, than show some rounding errors with last bit unexact.
nekrovski
8th June 2022, 21:04
Hi, sorry for kinda newbish question but is there a way to use eac3to.exe CLI without all the DLLs?
If it runs at all, it may offer only a rather basic set of features, like demultiplexing only, but no conversions.
rsotome
26th September 2022, 03:15
Trying to demux an h265/hevc track from an mkv container, but with 3.36, I get this error...
This video conversion is not supported.
with 3.34, it works just fine, any help would be appreciated.
Thank you.
tebasuna51
26th September 2022, 10:59
@rsotome
You are right, I obtain this error also. I tried .hevc, .h265 and .265 with the same problem.
eac3to is old and I can't recommend you for video management, use mkvextract or ffmpeg.
rsotome
26th September 2022, 20:28
Would love to, but as far as I know, eac3to is the only program that can add missing video framerate information & remove dialnorm from audio tracks, on the fly.
tebasuna51
27th September 2022, 10:41
... eac3to is the only program that can add missing video framerate information...
I only test it with h264, but if v3.34 works for you use it.
oniiz86
28th September 2022, 08:09
Is it most unlikely for @madshi to revert the change or fix this regression, what exactly has v3.36 fixed or improved over v3.34, is it some UHD seamless branching audio dropouts?
jpsdr
28th September 2022, 17:51
At one point madshi talked to eventualy make his code public (on repo ?), don't know if still in thoughts for him.
meemeemee
30th September 2022, 19:24
Trying to demux an h265/hevc track from an mkv container, but with 3.36, I get this error...
This video conversion is not supported.
with 3.34, it works just fine, any help would be appreciated.
Thank you.
Yep, the same here... mentioned this in my first post on this forum:
https://forum.doom9.org/showpost.php?p=1969157&postcount=15162
3.36 is un-usable then at this state and we need to wait for @madshi to fix it.
oniiz86
1st October 2022, 08:15
Yep, the same here... mentioned this in my first post on this forum:
https://forum.doom9.org/showpost.php?p=1969157&postcount=15162
3.36 is un-usable then at this state and we need to wait for @madshi to fix it.
It is a real shame @madshi didn't thoroughly test v3.36 before release as it is quite a glaring regression, breaking the ability to demux hevc streams, I don't see this being rectified anytime soon as v3.36 was released approx. 5 years after v3.34 so maybe another release may come another 5 years from now :D
Mango
1st October 2022, 19:28
My homemade rip of a BluRay had trouble with the audio cutting out using TrueHD audio. I fixed it by creating a FLAC version with this software, which was cool. But I am wondering if TrueHD bitstreaming issues are common, or just something with this file?
Thunderbolt8
5th October 2022, 16:53
is it possible to exchange the built-in flac file for the latest one of 1.4.1?
btw. would look forward to others taking over the project if madshi doesnt have time for it any more. still my favourite all/(most) in one tool.
Thunderbolt8
5th October 2022, 20:36
If I wanted to convert a 6.1 DTS-HD MA track to 5.1 channel format whats the most accurate way to do this? Do I have to specify -down6? or do some manual remapping of the channels?
tebasuna51
6th October 2022, 11:28
is it possible to exchange the built-in flac file for the latest one of 1.4.1?
Yes. Updated the first post.
If I wanted to convert a 6.1 DTS-HD MA track to 5.1 channel format whats the most accurate way to do this? Do I have to specify -down6? or do some manual remapping of the channels?
To downmix with eac3to you can use only -down6.
For some manual downmix you can use ffmpeg or sox.
Read 7.1 downmix function? (https://forum.doom9.org/showthread.php?t=181726)
From 6.1 instead 7.1 you need change:
pan=stereo|c0=0.5*c4+0.5*c6|c1=0.5*c5+0.5*c7,
to:
pan=stereo|c0=0.412*c4+0.588*c5|c1=0.412*c4+0.588*c6,
KSSW
7th October 2022, 05:31
Encoding the core file (ac3) of the THD file to Dolby Surround EX mode, but the default is no Dolby Surround EX
log
command line: "C:\Users\****\Desktop\eac3to334\eac3to.exe" D:\ATMOS.mlp D:\A.THD+AC3
TrueHD (Atmos), 7.1 channels, 48kHz
AC3 encoding doesn't support back channels. Will mix them into the surround.
Decoding with libav/ffmpeg...
Mixing surround channels...
Remapping channels...
Encoding AC3 <640kbps> with libAften...Convert Encoding AC3 EX<640kbps> with libAften...
The main thing is to turn on Dolby Surround EX mode
Maybe add the command line
tebasuna51
7th October 2022, 11:34
But the downmix 7.1 -> 5.1:
SL' = SL + BL
SR' = SR + BR
is not a AC3 EX mix 6.1->5.1:
SL' = SL + 0.7*BC
SR' = SR + 0.7*BC
when a AVR read the EX flag extract the common part from SL'-SR' to send it to BC speaker, that is usefull only in 6.1 AVR's, from a mix 7.1 -> 5.1 it is not exact.
KSSW
9th October 2022, 10:23
But the downmix 7.1 -> 5.1:
SL' = SL + BL
SR' = SR + BR
is not a AC3 EX mix 6.1->5.1:
SL' = SL + 0.7*BC
SR' = SR + 0.7*BC
when a AVR read the EX flag extract the common part from SL'-SR' to send it to BC speaker, that is usefull only in 6.1 AVR's, from a mix 7.1 -> 5.1 it is not exact.
How to integrate with thd audio
However, eac3to does not support the ex mode
tebasuna51
9th October 2022, 10:56
How to integrate with thd audio
I never see THD 6.1
However, eac3to does not support the ex mode
And can't recommend use libAften to AC3 encode, use ffmpeg instead.
KSSW
9th October 2022, 14:29
I never see THD 6.1
And can't recommend use libAften to AC3 encode, use ffmpeg instead.
This is Dolby atmos, not THD6.1.
How to use ffmpeg and Eac3To together to use THD+AC3
tebasuna51
9th October 2022, 15:37
You don't need eac3to, see the thread 7.1 downmix function? (https://forum.doom9.org/showthread.php?t=181726) to do a good downmix and recode to AC3, and after join the two tracks with thdmerge (https://forum.doom9.org/showthread.php?p=1976255#post1976255):
"ffmpeg.exe" -i "thd71.thd" -filter_complex "asplit [f][s]; [f] pan=3.1|c0=c0|c1=c1|c2=c2|c3=c3 [r]; [s] pan=stereo|c0=0.5*c4+0.5*c6|c1=0.5*c5+0.5*c7, compand=attacks=0:decays=0:points=-90/-84|-10/-4|-6/-2|-0/-0.3, aformat=channel_layouts=stereo [d]; [r][d] amerge [a]" -map "[a]" -acodec ac3 -center_mixlev 0.707 -dsurex_mode 2 -ab 640k "ac351.ac3"
"thdmerge.exe" "thd71.thd" "ac351.ac3" "thd_BD.thd+ac3"
with "-dsurex_mode 2" you set the EX flag.
KSSW
10th October 2022, 00:11
You don't need eac3to, see the thread 7.1 downmix function? (https://forum.doom9.org/showthread.php?t=181726) to do a good downmix and recode to AC3, and after join the two tracks with thdmerge (http://rationalqm.us/board/viewtopic.php?f=16&p=15406#p15406):
"ffmpeg.exe" -i "thd71.thd" -filter_complex "asplit [f][s]; [f] pan=3.1|c0=c0|c1=c1|c2=c2|c3=c3 [r]; [s] pan=stereo|c0=0.5*c4+0.5*c6|c1=0.5*c5+0.5*c7, compand=attacks=0:decays=0:points=-90/-84|-10/-4|-6/-2|-0/-0.3, aformat=channel_layouts=stereo [d]; [r][d] amerge [a]" -map "[a]" -acodec ac3 -center_mixlev 0.707 -dsurex_mode 2 -ab 640k "ac351.ac3"
"thdmerge.exe" "thd71.thd" "ac351.ac3" "thd_BD.thd+ac3"
with "-dsurex_mode 2" you set the EX flag.
I can't find thdmerge.exe,Request download link thank you.
filler56789
10th October 2022, 06:44
I can't find thdmerge.exe,Request download link thank you.
Attachment = thdmerge_1.1.zip.
tebasuna51
10th October 2022, 11:42
The last version included in DGDemux_1.0.0.62.zip (https://www.rationalqm.us/dgdemux/binaries/):
mattmarsden
11th October 2022, 12:45
Is there a way to stretch audio from 24fps to 23.976 maybe adding very small loops every so often?
tebasuna51
11th October 2022, 21:53
Of course we can add a sample every 1000 samples (23.976 is really 24000/1001), to obtain 48048 samples from 48000.
You can do it with a ffmpeg filter like:
-af "aresample=48048, asetrate=48000"
The same method than do eac3to with:
-24 -changeTo23.976
mattmarsden
13th October 2022, 14:33
Of course we can add a sample every 1000 samples (23.976 is really 24000/1001), to obtain 48048 samples from 48000.
You can do it with a ffmpeg filter like:
-af "aresample=48048, asetrate=48000"
The same method than do eac3to with:
-24 -changeTo23.976
Thanks, I'm trying to do it without re encoding. The eac3to command doesn't do anything unless its re encoding. I just want to add in a gap or a loop every 1000 samples.
filler56789
13th October 2022, 15:49
Thanks, I'm trying to do it without re encoding. The eac3to command doesn't do anything unless its re encoding. I just want to add in a gap or a loop every 1000 samples.
Not possible, A.F.A.I.K.
(and principally with lossy compression) :-/.
PERHAPS you could do that by using uncompressed audio AND creating+editing a "timecodes.txt" file for a Matroska container...:confused:
—but I think it really would not be worth the effort :-/
tebasuna51
13th October 2022, 21:16
Without recode you only can delete/duplicate frames (11 ms in dts, 32 ms in AC3,...) that can produce (not always but many times) audible clicks and the result is always worse than recode.
von Suppé
14th October 2022, 10:39
Is there a way to stretch audio from 24fps to 23.976...
Thanks, I'm trying to do it without re encoding.
Maybe in your case speeding up video to 24fps instead is a viable option? No recoding, just rewriting timestamps.
r0lZ
14th October 2022, 11:29
PERHAPS you could do that by using uncompressed audio AND creating+editing a "timecodes.txt" file for a Matroska container...:confused:
mattmarsden, I suppose the audio is for a movie. If you want to mux it to MKV, it is possible to stretch the audio track with a simple setting in mkvtoolnix-gui. Just select your audio track, and, in the left pane, add the stretch factor in the "Stretch by" field. Usually, that option gives good results, without re-encoding.
Of course, that doesn't work if you want to rebuild an ISO, or something similar.
tebasuna51
14th October 2022, 12:01
Delete/Duplicate frames or modify audio timestamps (Stretch by) can produce audio discontinuity (https://forum.doom9.org/showthread.php?p=1587184#post1587184) and can are listened as clicks.
Modify the video timestamps (or fps) between 24 and 23.976 is the best choice because by nature video is a succession of different images.
Of course if you want synconize two languages, modified to join video at different speed, the best option is recode one of them.
dts350z
16th October 2022, 19:56
eac3to Feature Request:
eac3to can create a thd+ac3 track by decoding thd and downmixing (same downmix scheme as Dolby) 7.1 to 5.1. However if I want my own downmixed version (creating my own ac3 with Dolby Media Encoder) there is no way to interleave the TrueHD mlp and the AC3 into the thd+ac3 format.
I would like to see that capability added, so as to be able to create BlueRay compatible audio tracks with both TrueHD and AC3 in the same track, from separate mlp and AC3 encodings.
tebasuna51
16th October 2022, 20:58
Please read https://forum.doom9.org/showthread.php?p=1976221#post1976221
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.