View Full Version : eac3to - audio conversion tool
Snowknight26
9th December 2016, 00:09
You aren't looking hard enough.
http://www.blu-ray.com/movies/Suicide-Squad-3D-Blu-ray/161265/
Note: BD Info: Eng TrueHD on Ext Cut only. 3D and Theatrical Disks have French TrueHD and Eng DD+ only.
http://www.blu-ray.com/movies/The-Secret-Life-of-Pets-3D-Blu-ray/169188/
Spanish: Dolby Digital Plus 5.1
http://www.blu-ray.com/movies/Brave-3D-Blu-ray/48045/
French: Dolby Digital Plus 7.1
etc.
73ChargerFan
10th December 2016, 08:03
IIRC, DD+ / BD is different than DD+ / HD-DVD
Music Fan
10th December 2016, 10:36
It's optional on BD but I believe that it's the only difference ;
https://en.wikipedia.org/wiki/Dolby_Digital_Plus#HD_DVD_and_Blu-ray_Disc
edit : I read too quickly, it's probably the same codec but used differently ; DD+ on BD only concerns rear channels as an extension to the ac3 core and is limited to 1.7 Mbit/s (3.0 Mbit/s on HD DVD).
But IIRC, some BD players accept the DD+ from HD DVD rips.
ismail0100
28th January 2017, 15:12
Sorry my english.
Can i convert 448kbps 23.976fps ac3 to 448kbps 24.000fps ac3 using nero?
LigH
28th January 2017, 15:39
I see no reason to do that. Which player is unable to handle NTSC-FILM correctly?
tebasuna51
28th January 2017, 22:31
@LigH
Sometimes we need convert a second language (from a 23.976 movie) to mix with main movie (24 fps).
@ismail0100
You need Nero only to AAC encode. To convert a AC3 to AC3 you can use the included libAften.dll:
eac3to input.ac3 output.ac3 -448 -23.976 -changeTo24.000
Or better, with ffmpeg:
eac3to input.ac3 stdout.w64 -23.976 -changeTo24.000 | ffmpeg -i - -c:a ac3 -b:a 448k -center_mixlev 0.707 output.ac3
ismail0100
28th January 2017, 23:02
@LigH
Sometimes we need convert a second language (from a 23.976 movie) to mix with main movie (24 fps).
@ismail0100
You need Nero only to AAC encode. To convert a AC3 to AC3 you can use the included libAften.dll:
eac3to input.ac3 output.ac3 -448 -23.976 -changeTo24.000
Or better, with ffmpeg:
eac3to input.ac3 stdout.w64 -23.976 -changeTo24.000 | ffmpeg -i - -c:a ac3 -b:a 448k -center_mixlev 0.707 output.ac3
Hello thank you for answering.
My internet friend say to me I am using nero 7 and it is don't change audio's wave but libaften change wave so sound damage quality.
khoahoc0508
29th January 2017, 18:04
@LigH
Sometimes we need convert a second language (from a 23.976 movie) to mix with main movie (24 fps).
@ismail0100
You need Nero only to AAC encode. To convert a AC3 to AC3 you can use the included libAften.dll:
eac3to input.ac3 output.ac3 -448 -23.976 -changeTo24.000
Or better, with ffmpeg:
eac3to input.ac3 stdout.w64 -23.976 -changeTo24.000 | ffmpeg -i - -c:a ac3 -b:a 448k -center_mixlev 0.707 output.ac3
Why need setting center_mixlev and it should be done for all ac3 audio?
If i want convert another audio format, it still require?
Thanks!
tebasuna51
30th January 2017, 02:57
Why need setting center_mixlev and it should be done for all ac3 audio?
If i want convert another audio format, it still require?
The default value is low and sometimes there are problems with dialog volume when is played by a stereo player (like TV's).
I recommend use it encoding to AC3 from any multichanel input.
tebasuna51
30th January 2017, 03:01
Hello thank you for answering.
My internet friend say to me I am using nero 7 and it is don't change audio's wave but libaften change wave so sound damage quality.
eac3to can't encode with nero 7, can use NeroAacEnc.exe to obtain AAC, not AC3.
Of course if you can play AAC multichannel is better option than AC3.
If you still want AC3 the best free encoder is ffmpeg.
ismail0100
30th January 2017, 10:54
eac3to can't encode with nero 7, can use NeroAacEnc.exe to obtain AAC, not AC3.
Of course if you can play AAC multichannel is better option than AC3.
If you still want AC3 the best free encoder is ffmpeg.
Okay I like aac more than ac3.
Now how can i convert 448kbps 23.976fps ac3 sound to x(how value it is losless)kbps 24fps aac sound.
If you know can u write code?
tebasuna51
30th January 2017, 15:15
You need NeroAacEnc.exe in same folder than eac3to (see first post for links).
eac3to input.ac3 output.m4a -23.976 -changeTo24.000
By default the quality is 0.5, more than enough for a input ac3 448 Kb/s
pcroland
4th February 2017, 13:22
Hi!
Is it possible to overwrite the first N second of an AC3 sound with another sound? I have a foreign language dub that fits a film but the beginning of that video has a 519 frame intro (24 fps -> 21.625s). If I apply a positive delay to the dub it will be totally fine for the video, but the intro will be silent. How do I keep the intro sound from the English dub?
I was able to get what I want with
ffmpeg -i film.mkv -c:a ac3 -b:a 192k -ac 2 -t 21.625 intro.ac3
ffmpeg -i "concat:intro.ac3|dub.ac3" -c:a copy dubwithintro.ac3
but I don't know whether it's a good solution or not.
tebasuna51
4th February 2017, 13:25
To concat two ac3 streams both must have the same: channels, samplerate and bitrate.
If both have the standard samplerate 48000, your first ffmpeg command line obtain a AC3 2.0 192 Kb/s 48000, like must be your dub.ac3, with a duration of 21.632 sec (duration must be a multiple of 32 ms). And yes, ffmpeg is the best option to obtain this intro.ac3.
After that to concat the two streams you can use ffmpeg (never tested by me) or eac3to:
eac3to intro.ac3+dub.ac3 dubwithintro.ac3
Or the simple msdos copy binary:
copy /B intro.ac3 + dub.ac3 dubwithintro.ac3
pcroland
4th February 2017, 13:33
The ~21s intro.ac2 has the same channels etc. The concat speed was really fast so I guess it was successful. Thanks for the eac3to and copy command :)
73ChargerFan
5th February 2017, 06:30
Can someone give an example of eac3to identifying and fixing errors in m2ts streams when it demuxes them? Something that makes it inherently superior to all other demuxers?
tebasuna51
5th February 2017, 11:16
Can someone give an example of eac3to identifying and fixing errors in m2ts streams when it demuxes them? Something that makes it inherently superior to all other demuxers?
Not sure about your question: "identifying and fixing errors"
If is related with audio demux, eac3to is superior to other demuxers because see the frames timestamps, and can detect gaps/overlaps to be corrected to mantain sync with video.
Other demuxers can extract the audio tracks as is, without check gaps/overlaps.
Nico8583
8th February 2017, 22:41
Hi, I have some MKV movies with 5.1 AC3 or 5.1 DTS audio track. I would like (for compatibility with some devices : smartphone, tablet, TV...) to add in each MKV an AAC stereo audio track so I need to convert AC3 or DTS to AAC-LC 2.0.
For AC3, is Nero still the best decoder ? For DTS, is Arcsoft still the best decoder ? For AAC encoding I'm using Nero ACC Encoder.
I have tried "eac3to.exe Movie.mkv 1:Audio.m4a -quality=0.35 -downStereo". Is it sufficient ? Or are there some parameters to add (normalize or other) ? I'm not sure for 0.35 quality for stereo, perhaps I'll go to 0.40 or 0.45.
Thank you !
tebasuna51
9th February 2017, 01:44
@Nico8583
You don't need Nero or ArcSoft to decode, lets work the decoders included in last eac3to version.
Your command line is ok..., if the desired audio is first track 1: , normally the first track is the video.
Maybe the first audio track is 2:
You can select the desired quality, 0.35 is the low LC quality, the default is 0.5.
Nico8583
9th February 2017, 08:18
Thank you :)
I'll adapt track number, it's not a problem, I'm going to try a method to convert and add an audio track to my MKV, perhaps I'll make a soft to do that, I don't know.
And to quality I'll let 0.5, I'll compare size between differents values
tebasuna51
9th February 2017, 12:11
... I'm going to try a method to convert and add an audio track to my MKV, perhaps I'll make a soft to do that...
You can try my GUI UsEac3to (read the readme.txt):
1) Extract the UsEac3to.7z in eac3to folder
2) Run UsEac3to.exe and inform 'Settings' -> 'Path to MkvMerge'
3) Load your mkv
4) In 'Track Input -> Output format' extract and/or convert the 2 audio than you want preserve.
5) 'Run and MkvMux' mux your original mkv without audios with the extracted/converted audios
Nico8583
9th February 2017, 13:35
Thank you for the tip, I'll try it but I would like to process about 1000 movies so I would like to make an automated process :)
For downmixing to stereo, there is no interest to use Normalize ? I would like to have a correct sound level without putting my TV level to 90%
tebasuna51
9th February 2017, 15:54
With -downStereo eac3to add center and surround channels to front channels, most the times the volume reach more than 0 dB and eac3to make a automatic Normalize to obtain peaks at 0 dB only.
You can force the Normalize but normally is not necesary, and don't solve the low dialog volume because this only can be corrected with a specific downmix for each movie.
Nico8583
9th February 2017, 23:21
I've tried manually to convert to AAC and mux to MKV. MediaInfo shows a 9ms delay for each AAC track, is it normal ?
sneaker_ger
9th February 2017, 23:26
Did you use eac3to to create the .m4a and mkvmerge to mux it? Then: yes, it's probably normal. Mkvmerge compensates for the aac encoder delay.
Nico8583
9th February 2017, 23:32
Yes I convert to .m4a with eac3to 3.31 and mux with mkvmerge 9.8.0. Why does the encoder add delay ?
sneaker_ger
9th February 2017, 23:37
https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html
https://en.wikipedia.org/wiki/Modified_discrete_cosine_transform
Nico8583
10th February 2017, 08:14
Thank you, I'll look at it :)
ndjamena
10th February 2017, 13:50
When a program reads the EAC3To output I'd like a sure way to match the track info to the output of other programs (MediaInfo/MKVMerge). Outputting the PIDs and Matroska Track Numbers would be the surest way of achieving that.
(Sorry, I had noticed there was no "feature request option" on the tracker and was going to post here instead, but I looked through the tickets and one of them was a request to use pre-encoded AC-3 to mux with TrueHD instead of making a new one, which is a feature request and was labeled a feature request and a bug as well.)
Nico8583
11th February 2017, 16:01
I've tried this command line "eac3to.exe Movie.mkv 1:Audio.m4a -downStereo" but the sound level is low. Is it possible to increase it ? Is it done by applying DRC (with NicAc3Source/NicDtssource) ?
LigH
11th February 2017, 16:40
eac3to does not use AviSynth audio source plugins.
Whether DRC can be applied, may depend on the format of the audio stream in the MKV. 2-pass normalization would always be possible during a complete conversion, but I don't know for sure if eac3to uses a 2-pass method. Probably not.
tebasuna51
11th February 2017, 17:04
... but the sound level is low
The whole volume or the dialog volume?
Please put the log.
eac3to never apply DRC when decode.
Nico8583
12th February 2017, 00:43
It seems to be the whole volume but mainly dialog volume.
Here is the log :
eac3to v3.31
command line: "D:\eac3to\eac3to.exe" "D:\Test\Test.mkv" 2:"D:\Test\Test.mkv_0.50.m4a" -downStereo
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 1:46:34, 24p /1.001
1: h264/AVC, 1080p24 /1.001
2: AC3 EX, French, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
[a02] Extracting audio track number 2...
[a02] Removing AC3 dialog normalization...
[a02] Decoding with libav/ffmpeg...
[a02] Downmixing multi channel audio to stereo...
[a02] Reducing depth from 64 to 32 bits...
[a02] Encoding AAC <0.50> with NeroAacEnc...
[a02] Clipping detected, a 2nd pass will be necessary. <WARNING>
[a02] Starting 2nd pass...
[a02] Extracting audio track number 2...
[a02] Removing AC3 dialog normalization...
[a02] Decoding with libav/ffmpeg...
[a02] Downmixing multi channel audio to stereo...
[a02] Reducing depth from 64 to 32 bits...
[a02] Encoding AAC <0.50> with NeroAacEnc...
[a02] Applying -2.24dB gain...
Video track 1 contains 153312 frames.
eac3to processing took 6 minutes, 34 seconds.
Done.
Thank you !
tebasuna51
12th February 2017, 00:51
The whole volume can't be bigger because eac3to detect clip:
[a02] Clipping detected, a 2nd pass will be necessary. <WARNING>
and need attenuate it:
[a02] Applying -2.24dB gain...
Then your movie maybe need other tool to downmix that audio. Try BeHappy.
Nico8583
12th February 2017, 01:14
All tests I've done allways report "Clipping detected"...
Do you have some advices about BeHappy or NicAudio in order to downmix to stereo ?
73ChargerFan
12th February 2017, 06:53
How about this:
[a02] Removing AC3 dialog normalization...
Perhaps that step can be disabled? I haven't tried it.
Music Fan
12th February 2017, 10:40
You don't need to keep the dialog normalization, it's a flag which actually concerns the level of all channels, not only the center channel. This flag is often used on stereo contents on TV programs, which is rather a nonsense when you think it only concerns the center channel, but it has though something to do with dialogs (when well used) ;
http://hometheaterhifi.com/volume_7_2/feature-article-dialog-normalization-6-2000.html
http://hometheaterhifi.com/volume_7_2/images/feature-article-dialog-normalization-fig-2.gif
http://hometheaterhifi.com/volume_7_2/images/feature-article-dialog-normalization-fig-3.gif
tebasuna51
12th February 2017, 15:30
About Dialogue Normalization (DN) and Dynamic Range Compression (DRC)
(That was explained in the first posts in this thread)
Like you can see in the arcticle linked by Music Fan both concepts, used by Dolby Digital (DD) in their encodes, are very ussefull.
What is the problem?
1) Only DD uses them, other sources don't have, or don't use, similar concepts (DTS, MP3, CDA, AAC, ...).
Normally the same source, encoded with DD, sound at low volume than encoded with other encoder, when played.
2) DN and DRC must be applied at play time, the tools (like eac3to) designed to recode between formats, can't apply DN/DRC when decode DD if we don't want lose quality.
If you want preserve DN/DRC you need use a DD certified encoder.
Free AC3 encoders don't claim make DD certified streams, only AC3 streams and, by default, don't use DN/DRC.
Of course DN/DRC can't be translated to other encoders.
Modern players (more powerfull than olds) have "Night mode" to solve the same problem than DRC at play time, and work over any format, not only DD streams.
Downmix problems
We can't send the same sound volume with 2 speakers than with 6 speakers, that is obvious. The -downStereo parameter try to preserve the balance between channels adding 5 input channels to only 2 (FL'-FR') with this method:
FL' = FL + 0.707*FC + SL
FR' = FR + 0.707*FC + SR
Is normal than adding volume like that produce volume sounds over 0 dB (than produce clip), for that the WARNING and the posterior:
Applying -2.24dB gain...
To output the max volume peaks without distort.
But sometimes the FC (many of dialogs) contribution is not enough to listen clearly the dialogs compared with F and S contributions.
There are workarounds to solve this problem, but not with eac3to than try always preserve the best quality.
With BeHappy (or BeLight) you can apply DRC, at decoder time, over DD streams (not with other formats).
Also you can apply Boost (BeLight) or many other options with AviSynth (BeHappy).
But explain them are OT in this thread.
Nico8583
12th February 2017, 22:04
Thank you for all your informations, it's very interesting :)
Is it the same "issue" if I convert to AAC multichannel ? Or is it specific at the downstereo and not at the format ?
tebasuna51
13th February 2017, 11:56
We don't need mix channels in a multichannel conversion, then don't exist the problem.
Each channel preserve their original volume.
gzuz
13th February 2017, 17:30
Hey folks! I apologize if this is the wrong thread for my post.
I have 2 Blu-ray releases of the same movie. They're different editions.
I used eac3to to extract the video track from the first disc, and the audio/subtitle tracks from the other, for the purpose of muxing them together into an .mkv.
Unfortunately, they don't share the same length. The video from disc #1 is 8 seconds longer than the video from disc #2. So the audio track and subtitles from disc #2 are running ahead of the picture.
I calculated the exact delay, and it's 7967 ms. I used mkvmergeGUI to apply the delay in question, but to my surprise the sync was still off for ~half a second. Finally, I set it to 7217 ms and I seem to have hit the spot.. but have I?
How can I be certain that I've achieved the perfect sync? Surely there must be a better way of doing this, rather than relying on my own two eyes and guessing/assuming. Is there a method for doing this with eac3to, or perhaps some other application?
Thanks in advance! :)
Music Fan
13th February 2017, 17:49
Is it the same cut and the same framerate for both versions ?
tebasuna51
13th February 2017, 18:04
I have 2 Blu-ray releases of the same movie. They're different editions.
Then, probably, have different initial credits (~7217 ms) and maybe the end until 7967 ms.
Don't exist a easy tool to determine the exact amount of delay.
You need found the same video frame (after credits) and the time diference is the exact delay than you need.
gzuz
13th February 2017, 18:04
Is it the same cut and the same framerate for both versions ?
Yes, they're the same. There's a Warner Brothers intro that lasts for ~8 seconds in the beginning of my video source. That's what's causing the delay.
@tebasuna51 - You're on point. How do I find the exact video frame, and thus the time difference? Thank you!
Okay (2.5hrs later),
So I managed to find a frame match in both sources:
https://postimg.org/image/lh6y3e68h/
I found the beginning and the ending of this "scene". But I'm confused:
7010 - 7024 - > 6839 - 6852
14 frames - > 13 frames
So this still shot from the movie runs for 14 frames on the first source, while on the second one it does so for 13 frames. Do I pick the first frame of each video source and subtract, or?
For example - 7010 minus 6839? What am I supposed to do? Thanks!
tebasuna51
13th February 2017, 22:17
You have already the time (seems the same frame), the delay is:
4:52.375 - 4:45.243 = 7132 ms
You can verify if the delay is the same at end of movie, because if there are differences (14 frames - > 13 frames) along the movie you have a serious problem.
gzuz
13th February 2017, 22:54
You have already the time (seems the same frame), the delay is:
4:52.375 - 4:45.243 = 7132 ms
You can verify if the delay is the same at end of movie, because if there are differences (14 frames - > 13 frames) along the movie you have a serious problem.
Thanks. I just tested with another frame and it's way off. Well, I tried.
Thanks for helping me out guys, it's appreciated!
MeteorRain
18th February 2017, 19:52
Let me bump this up a little bit:
Any plan to support HEVC so that we can demux the audio with the correct delay?
Thunderbolt8
18th February 2017, 22:19
support HEVCyes please
LigH
19th February 2017, 10:17
HEVC is a format of video content streams. It has no audio in itself. It may have audio streams in parallel when multiplexed in containers like TS, MP4, MKV. In this case, it should not be very different from AVC video streams. The only difference I would imagine is a decoder delay, due to the higher complexity of the GOP structure and the video encoding algorithms. Would eac3to be able to consider that?
tebasuna51
19th February 2017, 13:11
Any plan to support HEVC so that we can demux the audio with the correct delay?
Of course eac3to can't extract HEVC video or manage Ultra HD Blu-ray, and is a desired feature.
BTW extract, and delay, the audio from a mkv can work even with HEVC video. At least with a simple test:
eac3to v3.31
command line: "D:\Programa\eac3to\eac3to.exe" "D:\Temp\t\Test.mkv" 2: "D:\Temp\t\Test.mkv_2spa.ac3"
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 0:00:37, 24p /1.001
1: MPEGH/ISO/HEVC, English, 3840x1568p (120:49)
2: AC3, Spanish, 5.1 channels, 448kbps, 48kHz, 12000ms
Bitstream parsing for track 1 failed. <WARNING>
Demuxing this track may still produce correct results - or not. <WARNING>
[a02] Extracting audio track number 2...
[a02] Applying (E-)AC3 delay...
[a02] Creating file "D:\Temp\t\Test.mkv_2spa.ac3"...
eac3to processing took 1 second.
Done.
The extracted ac3 is OK for me.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.