Log in

View Full Version : eac3to - audio conversion tool


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 [259] 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308

Hitesh12
2nd January 2015, 13:49
You can call the same track twice in the command line so eac3to file.mkv 1: audio.dts 1: audio.flac should do (replace 1: by whatever the reported track is). I don't recall if you need to specify the playlist with mkv files.

Thanks will try that and report back

Hitesh12
2nd January 2015, 13:51
Nope.
You don't need extract the dts to convert to flac, but you need mux the flac to the mkv with MkvMerge.



The output file cannot be in .mkv container ?

Boulder
2nd January 2015, 18:05
eac3to cannot mux different files to one container.

Hitesh12
2nd January 2015, 18:16
eac3to cannot mux different files to one container.

Thanks. It makes sense now

Another query -
Is using Nero 7 AAC codec to convert DTS audio into stereo AAC the most efficient way ?
I mean Nero 7 is old, it might be using old version of AAC ?

Boulder
2nd January 2015, 18:20
It's not the most efficient way (if you mean quality-wise). I personally use Apple's AAC codec for all my stuff, you can search for 'qaac' if you're interested. There's a big thread at hydrogenaud.io but probably something here as well.

Hitesh12
2nd January 2015, 18:23
It's not the most efficient way (if you mean quality-wise). I personally use Apple's AAC codec for all my stuff, you can search for 'qaac' if you're interested. There's a big thread at hydrogenaud.io but probably something here as well.

So how do I use qaac with eac3to ?
EDIT : Also is there a list of AAC encodes with their comparisions ? nvm got it

Music Fan
2nd January 2015, 18:27
eac3to cannot mux different files to one container.
Strange, because I guess it can be used to mux to mkv audio and video coming from the same file (m2ts for example), and that's what Hitesh12 wanna do.

Boulder
2nd January 2015, 18:28
So how do I use qaac with eac3to ?
You need to use piping. The search should help you with that.

Boulder
2nd January 2015, 18:29
Strange, because I guess it can be used to mux to mkv audio and video coming from the same file (m2ts for example), and that's what Hitesh12 wanna do.I think it can only work if you remux the whole Blu-ray folder and thus cannot choose what you mux or re-encode and then mux. At least that's what the example in the first post by madshi shows.

Hitesh12
2nd January 2015, 18:31
Strange, because I guess it can be used to mux to mkv audio and video coming from the same file (m2ts for example), and that's what Hitesh12 wanna do.

As mentioned by boulder, I'm using this currently -

eac3to input.mkv 2: audio.dts 2: audio.flac

Is there some other command to mux these ?

Hitesh12
2nd January 2015, 18:38
You need to use piping. The search should help you with that.

Thanks !

Another query (:p) -

AFAIK there are different DTS codecs (DTS, DTS-HD I think)
So when I select .dts as output format, which DTS is it referring to ?

Also how do I check which DTS codec does the file has ? I don't think mediainfo differentiates between different DTS codecs

Boulder
2nd January 2015, 18:41
If you don't have a DTS encoder installed and you don't specify -core, you get DTS-HD if the original track is such. Otherwise you get a regular DTS track. I don't know if there is a simple way to determine which is which other than using eac3to ;)

Hitesh12
2nd January 2015, 18:48
If you don't have a DTS encoder installed and you don't specify -core, you get DTS-HD if the original track is such. Otherwise you get a regular DTS track. I don't know if there is a simple way to determine which is which other than using eac3to ;)


Thanks for all the help :)

Hitesh12
2nd January 2015, 19:05
This is a very odd question but how do I access file in some other directory ?
Currently I'm moving files which I want to encode in the eac3to directory (Only then this works - eac3to input.mkv output.whatever) , which is not the correct way :p

Hitesh12
2nd January 2015, 19:16
I tried/searched but couldn't understand this piping along with all those commands.

Is there any guide (like this (http://en.wikibooks.org/wiki/Eac3to/How_to_Use) for eac3to) ?

Boulder
2nd January 2015, 19:22
It seems you first need to learn the basics of command line stuff. You might be better off using some GUI for eac3to such as the one here: http://forum.doom9.org/showthread.php?t=145574

Music Fan
2nd January 2015, 19:43
This is a very odd question but how do I access file in some other directory ?
Currently I'm moving files which I want to encode in the eac3to directory (Only then this works - eac3to input.mkv output.whatever) , which is not the correct way :p
Type the complete path between quotation marks if there are spaces in the path, for example ;
"C:\Program Files (x86)\eac3to\eac3to.exe" "H:\my video.m2ts" 2: "P:\my video sound.ac3"

Music Fan
2nd January 2015, 19:56
I tried/searched but couldn't understand this piping along with all those commands.

Is there any guide (like this (http://en.wikibooks.org/wiki/Eac3to/How_to_Use) for eac3to) ?
This works (always type stdout.wav without path) ;
"C:\Program Files (x86)\eac3to\eac3to.exe" "H:\my audio.ac3" stdout.wav | "C:\Program Files (x86)\neroAacEnc\neroAacEnc.exe" -q 0.4 -if - -of "P:\my audio.mp4"
You will get aac in mp4 container.
-q is for quality, 1 is the maximum.

Other example with extraction from m2ts and downmix ;
"C:\Program Files (x86)\eac3to\eac3to.exe" "H:\my file ac3 5.1.m2ts" 2: stdout.wav -downStereo | "C:\Program Files (x86)\neroAacEnc\neroAacEnc.exe" -q 0.65 -if - -of "P:\my file (only sound) aac 2.0.mp4"

agogley
5th January 2015, 04:24
I'm having a problem with eac3to. I can't seem to extract the DTS-HD master audio from a BD. I can rip the BD then make an MKV then extract the audio but I can't seem to do it from my original source. I keep getting an error that says eac3to can't open the source file. eac3to gets to the end of it's 3rd Pass before giving me this error in the log.

What are some things I can do to troubleshoot? I've been using eac3to successfully for many years until recently. Recent rips of Stargate and Divergent are giving me trouble. Before that, no problems.

Music Fan
5th January 2015, 18:20
Did you try to extract first the DTS-HD track with TSMuxer, then to open it in eac3to ? But it's only useful if you wanna re-encode the sound, otherwise use MKVMerge.

agogley
6th January 2015, 03:51
Did you try to extract first the DTS-HD track with TSMuxer, then to open it in eac3to ? But it's only useful if you wanna re-encode the sound, otherwise use MKVMerge.

Once I know the proper playlist, I was able to extract the DTS-HD track (aqnd video) with TSMuxer. I am also able to use MakeMKV to make an MKV, then Clown_BD or tsMuxeR to build BD structure again (or ISO).

For whatever reason, eac3to will not read the source file but everything else seems to work fine.

How would I "open it" with eac3to?

I get a message saying that "Sony Screenpass, use mpls 00267?" I choose now, but I wonder if that has something to do with it?

Arm3nian
6th January 2015, 09:20
I'm trying to extract an aac audio file from an mp4. I don't think eac3to supports mp4 input so I used mkvmerge to extract only the audio as an mka. I'm guessing that process does no encoding. Then I used eac3to to extract the aac from the mka, but the bitrate observed by foobar and mpcbe (lav) was a bit higher, no pun intended :)
I only have the Nero aac encoder installed, not the decoder so I'm not sure why it works to begin with. Why is the bitrate slightly higher when coming out of eac3to using just input and output commands? The reported bitrate of the mp4 audio source file is 126kbps, the bitrate of the mka is 127kbps, and the bitrate of the aac is 128kbps... but the real time bitrate of the source and the mka is the same, the aac out of eac3to is 2kbps higher at some times.
Just for experimental purposes, I want a bit perfect adts aac file.

Music Fan
6th January 2015, 10:03
To demux aac from mp4, you can also try YAMB (gui for MP4Box.exe).

Music Fan
6th January 2015, 10:06
How would I "open it" with eac3to?
You can try this (open the folder, not a file) ;
http://en.wikibooks.org/wiki/Eac3to/How_to_Use#Using_complete_disc_structure_as_input

tebasuna51
6th January 2015, 13:37
...Why is the bitrate slightly higher when coming out of eac3to using just input and output commands? The reported bitrate of the mp4 audio source file is 126kbps, the bitrate of the mka is 127kbps, and the bitrate of the aac is 128kbps...
I encode a WAV (44.1 KHz, 165.000 seconds) to .M4A with NeroAacEnc.
With MkvMerge I obtained a .MKA.
I extracted the ADTS .AAC (the same with eac3to or MkvExtract).
You can be sure than the audio samples are the same in the 3 files, but if you include the headers to calculate the bitrate (Filesize*8/Duration):

FileSize Bitrate Foobar2000
-------- ------- ----------
M4A 3120294 151.287 150 Kb/s
MKA 3113283 150.947 151 Kb/s
AAC 3138214 152.156 ?

Some containers, like MP4 (M4A) can include, in header, the size of RAW AAC without headers.
Then MediaInfo show for the AAC stream in M4A the bitrate 149.680

Like you can see the little differences between bitrates is only the method to calculate (with/without headers).
BTW the standard method in audio files is include the headers overload (Filesize*8/Duration).

agogley
9th January 2015, 16:10
My eac3to logs are a mess. I don't understand why I'm getting all these messages. I'm going to post some logs to see if I can't get somebody to help me out.

The ones that I named - failed are from a process where eac3to will not finish the job. It simply fails. The three logs named normally completed the job. But there is still a bunch of errors, etc.

agogley
9th January 2015, 16:11
Here are the last two.

Asmodian
10th January 2015, 02:56
I don't see anything out of the ordinary in the non-fail logs, which message is worrying you?

agogley
10th January 2015, 03:09
I don't see anything out of the ordinary in the non-fail logs, which message is worrying you?

a03] The ArcSoft and Sonic decoders don't seem to work, will use libav instead.
[a03] The libav DTS decoder doesn't decode the full DTS-HD information. <WARNING>
[a03] The ArcSoft and Sonic decoders don't seem to work, will use libav instead.
[a03] The libav DTS decoder doesn't decode the full DTS-HD information. <WARNING>

a03] The original audio track has a constant bit depth of 64 bits.
[a03] The processed audio track has a constant bit depth of 24 bits.

Music Fan
10th January 2015, 10:12
Are you sure you installed correctly the ArcSoft decoder ?
Look at this post, you have to register ASAudioHD.ax ;
http://forum.videohelp.com/threads/352153-DTS-HD-MA-7-1-to-WAVS-%288-channels%29?p=2210419&viewfull=1#post2210419

agogley
10th January 2015, 20:25
Are you sure you installed correctly the ArcSoft decoder ?
Look at this post, you have to register ASAudioHD.ax ;
http://forum.videohelp.com/threads/352153-DTS-HD-MA-7-1-to-WAVS-%288-channels%29?p=2210419&viewfull=1#post2210419

I tried the regsvr fix. I tried to do regSvr32 but I get an error message that the DLL was loaded but the entry point DLLRegisterServer was not found.

I also tried to uninstall and reinstall Arcsoft TMT 5.whatever and that didn't clear it up any.

Asmodian
11th January 2015, 01:49
a03] The ArcSoft and Sonic decoders don't seem to work, will use libav instead.
[a03] The libav DTS decoder doesn't decode the full DTS-HD information. <WARNING>
[a03] The ArcSoft and Sonic decoders don't seem to work, will use libav instead.
[a03] The libav DTS decoder doesn't decode the full DTS-HD information. <WARNING>

a03] The original audio track has a constant bit depth of 64 bits.
[a03] The processed audio track has a constant bit depth of 24 bits.

Oh, I assumed that was expected as that simply means you don't have the ArcSoft decoder installed.

Edit: Also converting the 64 bit to 24 bit will not result in a quality loss, that is normal and how it is supposed to work.

I tried the regsvr fix. I tried to do regSvr32 but I get an error message that the DLL was loaded but the entry point DLLRegisterServer was not found.

I also tried to uninstall and reinstall Arcsoft TMT 5.whatever and that didn't clear it up any.

You do regsvr32 on the .ax file. You shouldn't get any messages about DLLs. Simply follow the instructions given in Music Fan's link.

Music Fan
11th January 2015, 10:00
I tried to do regSvr32 but I get an error message that the DLL was loaded but the entry point DLLRegisterServer was not found.
Re-try eac3to anyway because sometimes there are error messages about dll while they actually work.

Boulder
11th January 2015, 11:27
Does TMT5 files even work with eac3to? I thought that v2 is the only one that works.

JohnTucker
13th January 2015, 09:10
I want to use eac3to to batch demuxing multiple m2ts files. Those m2ts files have multiple audio and subtitle streams but I am interested only in the English ones (the first ones). Problem is that some of them have the first pgs (sup) file as number 5, others as number 8.

So how can I tell eac3to to demux the first h264, ac3 and pgs streams that it finds?

bmcelvan
15th January 2015, 15:45
Is there a way to set the compression value when outputting FLAC with eac3to? I've looked at all the options in cmd line with eac3to and haven't seen any.

Does it output the "most" compression by default (which would render my question moot)?

Lastly, eac3to uses libFLAC for it's decoding/encoding, correct? Is there a way to update this to the newest version 1.3.1 or is it even necessary?

Thanks

Music Fan
15th January 2015, 16:55
Is there a way to update this to the newest version 1.3.1
Yes ;
http://forum.doom9.org/showthread.php?p=1701272#post1701272

bmcelvan
15th January 2015, 21:27
Yes ;
http://forum.doom9.org/showthread.php?p=1701272#post1701272

Thank you

r0lZ
18th January 2015, 12:55
When eac3to cannot process a command, it outputs an error message somehow. For example, typing eac3to test.dts test.ac3 when test.dts doesn't exist produces this in the command prompt window: Source file "test.dts" not found. So far so good.
But I need to grab the output of eac3to to process it. Therefore, I need to redirect the error message to a file. If I redirect stdout to a file with eac3to test.dts test.ac3 > log.txt, the error message is still visible in the command prompt window, and is not present in the log file. Therefore, I must assume that the error message is printed to stderr, as it should.
But if I redirect stderr to a file with eac3to test.dts test.ac3 2> err.txt, the error message is not printed in the console any more, but the err.txt file is empty! :confused:
Redirecting stdout and stderr in two different files with eac3to test.dts test.ac3 > log.txt 2> err.txt or to the same file with eac3to test.dts test.ac3 1>log.txt 2>&1 doesn't work either.
In all cases, I can't get the error message. It seems to be destroyed as soon as it is redirected to a file!
I know that eac3to uses sequences of backspace and space characters to format its output, but I suppose that these characters should not destroy the messages when they are redirected to a file. I don't understand what's happening.

Is it possible to redirect the error messages to a file handle?
Is it an undocumented option similar to -progressnumbers to force eac3to to NOT use its sequences of control characters to format its output?

Thanks in advance for any pointer.

Overdrive80
18th January 2015, 14:25
Have you tried eac3to test.dts test.ac3 2>&1 >log.txt??

r0lZ
18th January 2015, 14:39
Yes. If you use that syntax, the error message is still printed in the command prompt window, and the log file contains only backspace and space characters.

The syntax I've described above eac3to test.dts test.ac3 1>log.txt 2>&1 is the way recommended by M$ to redirect stderr and stdout to the same file, and it works somewhat better: nothing is printed to the command prompt window. But the content of the log file is exactly identical than with your syntax. The message is lost in the two cases, and only the control characters are kept in the log.

AYColumbia
18th January 2015, 16:44
Why don't you just use the -log switch?

r0lZ
18th January 2015, 17:59
Why don't you just use the -log switch?

E:\>eac3to test.dts test.ac3 -log
Command line parameter "log" is unknown.

LigH
18th January 2015, 19:58
Maybe try LoRd_MuldeR's Logging Utility (https://sourceforge.net/projects/muldersoft/files/Logging%20Utility/), it can log both stdout and stderr to the same file (and also does *not* confuse text editors with a bunch of "delete" characters = ^H, like the normal eac3to help output does).

r0lZ
18th January 2015, 20:39
Thanks for the suggestion, but that doesn't work. Again, the error message is not in the output of LoggingUtil.exe, regardless of the syntax and parameters used.

It seems that eac3to "knows" that its output is captured, and it modifies its formatting accordingly. I guess it suppress the error message by mistake (bug).

LigH
18th January 2015, 20:46
So, for example, which command line did you use with the logger?

There is a third method to output text: Manipulating the console output in the "graphic memory". Whatever that is in Windows NT... But that's quite unusual if a programmer once decides to use file output methods.

heerschop
18th January 2015, 21:01
E:\>eac3to test.dts test.ac3 -log
Command line parameter "log" is unknown.


Try this command line:

e:\>eac3to test.dts test.ac3 -log="test.txt"

This writes the error in the log file:

eac3to v3.27
command line: C:\Tools\eac3to\eac3to.exe test.dts test.ac3 -log="test.txt"
------------------------------------------------------------------------------
Source file "test.dts" not found. <ERROR>

greetz

r0lZ
19th January 2015, 01:13
Yeah, -log works with the syntax above. Thanks heerschop.
Why that option and -progressnumbers are not documented is a mystery. But at least they exist.
Now, I would like to redirect the log to STDOUT instead of to a physical file, so that I can parse the output while eac3to is running. How can I do that with the -log option? I've tried -log=STDOUT and -log=-, but each time, a file is written to disc.

LigH
19th January 2015, 06:21
I wonder if -log="CON:" (with or without colon) may work. The "CON"sole was the combined device for stdin and stdout in good old MS-DOS times.

r0lZ
19th January 2015, 12:00
Well, indeed, you are right. Using CON: (with and without the quotes, and with and without the colon) seems to work. Indeed, no file is written to disc, and the message appears on screen. But... the original behaviour is back! The error message appears again with a red background, there are again a lot of BS and Space characters printed to STDOUT. More importantly, the error message disappears again if STDERR is redirected. In fact, it seems that the -log argument is totally ignored when CON: is used.

I think now that there is absolutely NO WAY to grab the error messages when eac3to is launched from another program. It's a very serious bug, and I suppose that we have to live with it. Pity!

@LigH: I'm sure that the error message is not simply hidden because a text editor is confused by the BS characters. I have used an hex editor to examine the outputs. Also, I can already parse the output of eac3to when it prints the stream information, for example. It is theoretically sufficient to remove all BS and tailing spaces to get a "normal" output. It's only the STDERR output that is wrong and cannot be processed properly.

Thanks to all of you.