Log in

View Full Version : dcaenc and eac3to


mariner
26th February 2013, 18:39
use this:

eac3to audio.w64 stdout.wav -down16 | dcaenc -i - -o audio.dts -l -b 1509

_


Can anyone help with the correct syntax when piping from eac3to? It's 6-channel 24/48 LPCM, >4G.


eac3to "E:\BDMV\STREAM\00003.m2ts" 3: A.11.wav +11000ms | dcaenc -i - -o a.dts -l -b 1510

dcaenc-2 [Apr 19 2012]
Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License <http://www.gnu.org/>.
Note that this program is distributed with ABSOLUTELY NO WARRANTY.

Source: -
Output: a.dts
KBit/s: 1510.000

Could not open or parse "-".
Error: RIFF header not found!



Many thanks and best regards.

LoRd_MuldeR
1st March 2013, 19:18
Can anyone help with the correct syntax when piping from eac3to? It's 6-channel 24/48 LPCM, >4G.


eac3to "E:\BDMV\STREAM\00003.m2ts" 3: A.11.wav +11000ms | dcaenc -i - -o a.dts -l -b 1510

dcaenc-2 [Apr 19 2012]
Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License <http://www.gnu.org/>.
Note that this program is distributed with ABSOLUTELY NO WARRANTY.

Source: -
Output: a.dts
KBit/s: 1510.000

Could not open or parse "-".
Error: RIFF header not found!



Many thanks and best regards.

Are you using my modified dcaenc (http://gitorious.org/~mulder/dtsenc/mulders-dtsenc) or the "original" one?

Support for reading/writing from/to the stdin/stdout is only added in my version (unless it got backported in the meantime).

Also: Are you sure that eac3to is actually writing WAVE/PCM data to its stdout?

tebasuna51
1st March 2013, 21:09
Try:

eac3to "E:\BDMV\STREAM\00003.m2ts" 3: stdout.wav +11000ms | dcaenc -i - -o a.dts -l -b 1509

mariner
2nd March 2013, 03:59
Are you using my modified dcaenc (http://gitorious.org/~mulder/dtsenc/mulders-dtsenc) or the "original" one?

Support for reading/writing from/to the stdin/stdout is only added in my version (unless it got backported in the meantime).

Also: Are you sure that eac3to is actually writing WAVE/PCM data to its stdout?

Greetings LoRd_MuldeR. Thanks for the kind reply.

1. I use your 2012-04-19 build posted above.
2. I presume the command line instruction posted by b66pak worked for him?
3. Are you suggesting if A.11.wav used in my command line is replaced by stdout.wav, it should work?
4. Is it necessary to include -down16, as suggested by b66pak?
5. eac3to failed to write to stdout.wav (see next post). How do I get it to work?

Many thanks and best regards.

mariner
2nd March 2013, 04:02
Try:

eac3to "E:\BDMV\STREAM\00003.m2ts" 3: stdout.wav +11000ms | dcaenc -i - -o a.dts -l -b 1509

Thanks for the kind reply, tebasuna51.

Seems to be a problem with eac3to writing to stdout.wav.

F:\dcaenc>eac3to "E:\BDMV\STREAM\00003.m2ts" 3: stdout.wav +11000ms | dcaenc -i - -o a.dts -l -b 1509
dcaenc-2 [Apr 19 2012]
Copyright (c) 2008-2012 Alexander E. Patrakov <patrakov@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License <http://www.gnu.org/>.
Note that this program is distributed with ABSOLUTELY NO WARRANTY.

Source: -
Output: a.dts
KBit/s: 1509.000

Could not open or parse "-".
Error: Unsupported bits per sample (only 16 and 32 for now)!

eac3to v3.27
command line: eac3to "E:\BDMV\STREAM\00003.m2ts" 3: stdout.wav +11000ms
------------------------------------------------------------------------------
M2TS, 1 video track, 1 audio track, 1:34:04, 60i /1.001
1: Chapters, 12 chapters
2: h264/AVC, 1080i60 /1.001 (16:9)
3: RAW/PCM, English, 5.1 channels, 24 bits, 48kHz
[a03] Extracting audio track number 3...
[a03] Reading RAW/PCM...
[a03] Swapping endian...
[a03] Applying RAW/PCM delay...
[a03] Remapping channels...
[a03] Writing WAV...
[a03] Creating file "stdout.wav"...
[a03] Writing the destination file failed. <ERROR>

Aborted at file position 1048576. <ERROR>

nevcairiel
2nd March 2013, 09:21
Sounds like its writing 24-bit PCM, which dcaenc doesn't support, so -down16 could help. Not sure if there is an option to upsample to 32 instead?

tebasuna51
2nd March 2013, 12:19
...
4. Is it necessary to include -down16, as suggested by b66pak?

Yes seems is necessary because eac3to default output is 24 bits and:
"Error: Unsupported bits per sample (only 16 and 32 for now)!"

Then:

eac3to "E:\BDMV\STREAM\00003.m2ts" 3: stdout.wav -down16 +11000ms | dcaenc -i - -o a.dts -l -b 1509

mariner
5th March 2013, 04:51
Sounds like its writing 24-bit PCM, which dcaenc doesn't support, so -down16 could help. Not sure if there is an option to upsample to 32 instead?

Yes seems is necessary because eac3to default output is 24 bits and:
"Error: Unsupported bits per sample (only 16 and 32 for now)!"

Then:

eac3to "E:\BDMV\STREAM\00003.m2ts" 3: stdout.wav -down16 +11000ms | dcaenc -i - -o a.dts -l -b 1509

Once again, it's tebasuna51 to the rescue. Thanks also to nevcairiel for the input.

1. The 94min dts output is about 1GB, twice the size mentioned by Selur. Is this correct?

2. Is there a reason not to use the 1510 bit rate recommended by Selur?

3. Is there a significant improvement of quality over AC3, which is about 450MB in size, and probably has better compression ratio?

Many thanks and best regards.

filler56789
5th March 2013, 05:18
1. The 94min dts output is about 1GB, twice the size mentioned by Selur. Is this correct?

2. Is there a reason not to use the 1510 bit rate recommended by Selur?

3. Is there a significant improvement of quality over AC3, which is about 450MB in size, and probably has better compression ratio?

1) Yes, because his calculations were wrong. :p

2) IF your SAP's firmware is *fully* DCA-compliant and is not artificially-limited to certain bitrate values only, then you can go up to 1536kbps, or you can try lower values (1344, 1280, whatever). Software decoders don't care about bitrates at all.

3) Lossy compression never means "improvement" quality-wise. And "DTS Coherent Acoustics" always requires more bitrate than AC3 for the same level of "perceived (loss of) quality".

Selur
5th March 2013, 07:24
about the calculation:
90min = 5400 seconds
54000 * 1509 000 bit = 8 148 600 000 bit
:D

btw.: Could some mod move the whole eac3to stuff to another thread? It's kind of offtopic in a dcaenc thread,...

tebasuna51
5th March 2013, 12:33
...
btw.: Could some mod move the whole eac3to stuff to another thread? It's kind of offtopic in a dcaenc thread,...

Done.

tebasuna51
5th March 2013, 14:07
...
2. Is there a reason not to use the 1510 bit rate recommended by Selur?

When you use commercial encoders, like Surcode or DTS Master Audio Suite, you can select between Transmission Bit Rate 1536 or 768. If you select 1536 these encoders can make a compact DTS (.cpt) with a Frame Length of 2013 bytes and 512 samples per frame (talking always with samplerate 48000).

Then the exact bitrate (less than Transmission Bit Rate) is:

(2013 x 8 x 48000) / 512 = 2013 x 750 = 1509750 b/s = 1509.75 Kb/s
rounded by some info soft to 1510 Kb/s

When you use dcaenc and select 1509 Kb/s the Frame Length obtained is 2012, then the bitrate is:

2012 x 750 = 1509000 b/s = 1509 Kb/s (exact)

When you use dcaenc and select bitrates between 1510 Kb/s and 1512, the Frame Length obtained is always 2016, then the bitrate is always:

2016 x 750 = 1512000 b/s = 1512 Kb/s

With dcaenc you can obtain bitrates:
...,1509,1512,1515,1518,1521,1524,1527,...

My receiver play fine until 1524, but I don't know if this bitrate can be supported always.
I use 1509 because is near to the commercial encoders.