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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th February 2013, 18:39   #1  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
dcaenc and eac3to

Quote:
Originally Posted by b66pak View Post
use this:
Code:
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.

Code:
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.
mariner is offline   Reply With Quote
Old 1st March 2013, 19:18   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by mariner View Post
Can anyone help with the correct syntax when piping from eac3to? It's 6-channel 24/48 LPCM, >4G.

Code:
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 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?
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 1st March 2013 at 19:21.
LoRd_MuldeR is offline   Reply With Quote
Old 1st March 2013, 21:09   #3  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Try:

eac3to "E:\BDMV\STREAM\00003.m2ts" 3: stdout.wav +11000ms | dcaenc -i - -o a.dts -l -b 1509
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 2nd March 2013, 03:59   #4  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
Quote:
Originally Posted by LoRd_MuldeR View Post
Are you using my modified dcaenc 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 is offline   Reply With Quote
Old 2nd March 2013, 04:02   #5  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
Quote:
Originally Posted by tebasuna51 View Post
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.

Code:
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)!
Code:
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>
mariner is offline   Reply With Quote
Old 2nd March 2013, 09:21   #6  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,348
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?
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 2nd March 2013, 12:19   #7  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by mariner View Post
...
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
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 5th March 2013, 04:51   #8  |  Link
mariner
Registered User
 
Join Date: Nov 2005
Posts: 583
Quote:
Originally Posted by nevcairiel View Post
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?
Quote:
Originally Posted by tebasuna51 View Post
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.
mariner is offline   Reply With Quote
Old 5th March 2013, 05:18   #9  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Quote:
Originally Posted by mariner View Post
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.

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".
filler56789 is offline   Reply With Quote
Old 5th March 2013, 07:24   #10  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
about the calculation:
90min = 5400 seconds
54000 * 1509 000 bit = 8 148 600 000 bit


btw.: Could some mod move the whole eac3to stuff to another thread? It's kind of offtopic in a dcaenc thread,...
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 5th March 2013, 12:33   #11  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Selur View Post
...
btw.: Could some mod move the whole eac3to stuff to another thread? It's kind of offtopic in a dcaenc thread,...
Done.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 5th March 2013, 14:07   #12  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by mariner View Post
...
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.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Reply


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 07:10.


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