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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 20th January 2016, 14:13   #13801  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by torturesauce View Post
Yes, that's it. It had serious issues with DTS CDs.
Then use before BeSplit.
Quote:
And there is an old foobar plugin for DTS-HD.
I tested already this old plugin:
foo_input_dtshd-0.1.3.zip 2011-03-19

known_issues.txt from this page:
Quote:
All the mentioned below is related to current version only.

1. Decoder adds 2048 zero samples before track.
2. Decoder cuts 1-2 seconds at the end of the track.
3. Surround channels are -3dB of what is encoded.
4. Decoder doesn't play DTS9624 streams.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 20th January 2016, 14:26   #13802  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,344
Quote:
Originally Posted by tebasuna51 View Post
That's don't affect at all to DTS movie trakcs, and the problem can be solved with a data parser to restore the standard 16 bits/word DTS format.
The old BeSplit can do the job without problems.
libdcadec even has a parser for such a conversion, sounds to me like the developer of this foobar plugin just gave up without checking too much.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline  
Old 20th January 2016, 15:28   #13803  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Yoshi View Post
Now I wonder: is that particular clipping already contained in the mix...?
I think so. Is not the first time than similar clip are in source tracks (even with DTS-MA encodes).
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 20th January 2016, 19:21   #13804  |  Link
osso123
Registered User
 
Join Date: Sep 2014
Location: Europa
Posts: 5
DTS->AC3 conversion weirdness

Hello everybody, i noticed that a converted AC3 subwoofer/LFE track sounds different to the original DTS track. The conversion by eac3to (aften) adds harmonics (?) to the track it seems. I attached a audacity screenshot to this post, please have a look yourself; maybe someone can explain what is going on.

Thank you


Picture shows:
Bottom track is the original DTS track with a very deep & clear bass; the top track is the convertion result in ac3 format which has frequencies (harmonics?) added.
Attached Images
 
osso123 is offline  
Old 20th January 2016, 20:50   #13805  |  Link
torturesauce
Registered User
 
Join Date: Jul 2011
Posts: 19
Quote:
Originally Posted by tebasuna51 View Post
Then use before BeSplit
Yeah, I would, but it doesn't matter anymore. I lost the version of the plugin that used dcadec, since the developer forced it to be deprecated. Anyway, thank you for all the info! Let's hope that foobar supports dcadec again in the future.
torturesauce is offline  
Old 20th January 2016, 22:04   #13806  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Quote:
Originally Posted by torturesauce View Post
Let's hope that foobar supports dcadec again in the future.
OR you can pester Maxim Anisiutkin and try to make things happen faster
filler56789 is offline  
Old 21st January 2016, 03:43   #13807  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
Osso, which bitrate for DTS and which bitrate for AC-3 ? Number of Channels for the complete encode ?
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline  
Old 21st January 2016, 16:27   #13808  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by nevcairiel View Post
libdcadec even has a parser for such a conversion,...
There are 4 valid formats for DTS:

16_BE: data with 16 valid bits/word and Big Endian order
14_LE: data with 14 valid bits/word and Little Endian order
14_BE: data with 14 valid bits/word and Big Endian order
16_LE: data with 16 valid bits/word and Little Endian order

We can use ffdcaenc to obtain samples of 4 formats using some encoder parameters.
I tested the 4 samples and try to decode with eac3to and ffmpeg -acodec libdcadec:

Code:
 DTS   first 4 bytes  ffdcaenc  eac3to   ffmpeg     where is?
-----  -------------  --------  -------  ------  ---------------
16_BE    7FFE8001     default     OK       OK    standard BD/DVD
14_LE    FF1F00E8     -e -r       (1)      OK    standard DTS-CD
14_BE    1FFFE800     -r        Invalid    OK    I don't know
16_LE    FE7F0180     -e        Invalid    (2)   I don't know
(1) Like DTS is not recognized (Invalid), but with a WAV header show DTSWAV and is decoded fine with LibDcaDec.
But some DTSWAV from DTS-CD have garbage before the first valid DTS header in DATA chunk of WAV, and is not recognized by eac3to.
I don't know if this garbage is a requirement for SPDIF output of DTS-CD.
A workaound for eac3to can be force read DATA WAV, with a new parameter -dts, until found the header FF1F00E8.

(2) I found some problems decoding 16_LE, but still I'm not sure if is a ffdcaenc or libdcadec problem.
EDIT: seems than ffmpeg -acodec libdcadec have problems (lose frames) with odd DTS Framesize (typical 2013 for instance).
Like a never see a real 16_LE I think that is not important.

Then libdcadec seems work fine with 14 bits/word DTS formats.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 21st January 2016 at 21:25. Reason: Add info
tebasuna51 is offline  
Old 22nd January 2016, 05:32   #13809  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Quote:
Originally Posted by tebasuna51 View Post
There are 4 valid formats for DTS:

16_BE: data with 16 valid bits/word and Big Endian order
14_LE: data with 14 valid bits/word and Little Endian order
14_BE: data with 14 valid bits/word and Big Endian order
16_LE: data with 16 valid bits/word and Little Endian order

We can use ffdcaenc to obtain samples of 4 formats using some encoder parameters.
One can also use bsconvert.exe:

Code:
=>bsconvert
Bitstream converter
===================
This utility conversts files between numerous MPA/AC3/DTS stream types:
SPDIF padded, 8/14/16bit big/low endian. By default, it converts any
stream type to the most common byte stream.

This utility is a part of AC3Filter project (http://ac3filter.net)
Copyright (c) 2007-2013 by Alexander Vigovsky

Usage:
  Detect file type and print file information:
  > bsconvert input_file

  Convert a file:
  > bsconvert input_file output_file [format]

Options:
  input_file  - file to convert
  output_file - file to write result to
  format      - output file format:
    8     - byte stream (default)
    16le  - 16bit low endian
    14be  - 14bit big endian (DTS only)
    14le  - 14bit low endian (DTS only)
NOTICE: regarding the 14-bit formats — 'ideally' at least, the "apparent" bitrate must be an integer multiple of 8, so that the `effective´ bitrate is exactly

(7/8) × |apparent_bitrate|

Examples:

1234.8kbps ÷ (7/8) = 1411.2kbps

1344kbps ÷ (7/8) = 1536kbps

and so on.
filler56789 is offline  
Old 22nd January 2016, 10:51   #13810  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by filler56789 View Post
One can also use bsconvert.exe...
Yep, I mentioned BeSplit to show than is a issue well know longtime ago.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 22nd January 2016, 11:18   #13811  |  Link
an3k
Registered User
 
an3k's Avatar
 
Join Date: Oct 2006
Location: Omicron Persei 8
Posts: 180
Thanks for that great tool. I really helps a lot!

I have this file:
Code:
eac3to.exe "E:\S01E01_a_eng.dts"
DTS Master Audio, 5.1 channels, 16 bits, 48kHz
(core: DTS, 5.1 channels, 1509kbps, 48kHz)
eac3to.exe "E:\S01E01_a_eng.dts" "E:\S01E01_a_eng.ac3" -640
Code:
DTS Master Audio, 5.1 channels, 16 bits, 48kHz
(core: DTS, 5.1 channels, 1509kbps, 48kHz)
Decoding with libDcaDec DTS Decoder...
libDcaDec reported the warning "XLL output not lossless".
Remapping channels...
Encoding AC3 <640kbps> with libAften...
Creating file "E:\S01E01_a_eng.ac3"...
The original audio track has a constant bit depth of 16 bits.
eac3to processing took 2 minutes, 26 seconds.
Done.
eac3to.exe "E:\S01E01_a_eng.dts" "E:\S01E01_a_engcore.ac3" -640 -core
Code:
DTS Master Audio, 5.1 channels, 16 bits, 48kHz
(core: DTS, 5.1 channels, 1509kbps, 48kHz)
Extracting DTS core...
Decoding with libDcaDec DTS Decoder...
Patching bitdepth to 24 bits...
Remapping channels...
Encoding AC3 <640kbps> with libAften...
Creating file "E:\S01E01_a_engcore.ac3"...
The original audio track has a constant bit depth of 24 bits.
eac3to processing took 1 minute, 46 seconds.
Done.
I also ran the second command again but with -core -640 (I thought there may be a difference). All three files are exactly the same regarding size (278.924.800 Bytes) and format (MediaInfo and GSpot). Why are the files identical when the second command shows "Patching bitdepth to 24 bits..." while the first command doesn't? Are the resulting files actually 24 bits or 16 bits or something else? Is the first command re-encoding the DTS-HD to AC3 while the second just uses DTS to AC3? If so, how come the resulting files are identical?

Please enlighten me
an3k is offline  
Old 22nd January 2016, 11:28   #13812  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,344
Decoding the lossy core only will always result in 24-bit audio, while decoding the lossless part will results in the specified bitdepth.
So yes, the first command encodes the DTS-HD lossless part into AC3, and the second only encodes the DTS lossy core into AC3. However, due to the lossy AC3 encoding, its not entirely unlikely that the result would be largely identical.

Note that AC3 doesn't have a "bitdepth" as such, so feeding it 24-bit data in contrast to 16-bit data won't actually change much how the AC3 file turns out.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 22nd January 2016 at 11:30.
nevcairiel is offline  
Old 22nd January 2016, 11:51   #13813  |  Link
an3k
Registered User
 
an3k's Avatar
 
Join Date: Oct 2006
Location: Omicron Persei 8
Posts: 180
So if AC3 doesn't have a bitdepth why does eac3to makes a difference here? The first command created a 16-Bit AC3 and the second created a 24-Bit AC3 but both resulting files are identical.

In other words: When in doubt always encode the DTS-HD stream (instead of the DTS core) to AC3 and don't care about the given bitdepth info at all?

Last edited by an3k; 22nd January 2016 at 12:51.
an3k is offline  
Old 22nd January 2016, 12:15   #13814  |  Link
osso123
Registered User
 
Join Date: Sep 2014
Location: Europa
Posts: 5
Quote:
Originally Posted by Emulgator View Post
Osso, which bitrate for DTS and which bitrate for AC-3 ? Number of Channels for the complete encode ?
I attach an audio test file in wav format to this post, please have a look. It is mono, 48Hz.

This resulting output file has no harmonics (?) added:
eac3to test.wav out320.ac3 -320

But this version (and all below increasingly heavy) has - it seems to be depending on bitrate:
eac3to test.wav out192.ac3 -192


I used different codecs to replicate, but ogg/mp3 show no frequency "overshoot" down to very low bitrates (f.i. 32kb).
So, is this normal for AC3 codec to introduce massive noise/overshoot/harmonics even at midrange bitrates? This happens too when I used Audacityc export feature as well by the way.
Attached Files
File Type: rar test.rar (132.8 KB, 54 views)
osso123 is offline  
Old 22nd January 2016, 15:04   #13815  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by an3k View Post
So if AC3 doesn't have a bitdepth why does eac3to makes a difference here? The first command created a 16-Bit AC3 and the second created a 24-Bit AC3 but both resulting files are identical.

In other words: When in doubt always encode the DTS-HD stream (instead of the DTS core) to AC3 and don't care about the given bitdepth info at all?
Lossy audio doesn't have a fixed bitdepth.
Bitrate = the number of samples per second. For lossless audio bitdepth = the range of values that can be assigned to any one of those samples. For 8 bit it's 256, for 16 bit it's 65,536 and for 24 bit it's 16,777,216.

I'd assume because the DTS-HD audio is lossless the bitdepth is known. For your example it was originally 16 bit, it was encoded at 16 bit, and eac3to decoded it as 16 bit and fed that to the AC3 encoder. DTS-HD supports 24 bit lossless, but it appears you have 16 bit DTS-HD.
It's kind of like converting a 16 bit wave file to a 16 bit flac file and then back to a 16 bit wave file again. Nothing is lost, and in your first example you've effectively converted that second wave file to AC3.

Lossy audio can be decoded to any fixed bitdepth. The greater the bitdepth, the more accurately it can be decoded. eac3to decodes the lossy DTS core, which has no fixed bitdepth, to a fixed bitdepth of 24 bits.
It's kind of like converting a 16 bit wave file to an MP3 and then decoding the MP3 to a 24 bit wave file. What was lost during the MP3 conversion is gone forever despite the output bitdepth being greater.

The size of a file doesn't tell you much. Encoding five minutes of silence at 640kbps will give you the same file size as encoding music at 640kbps. The bitrate is the same. 640kbps is 640kbps.

Last edited by hello_hello; 22nd January 2016 at 15:27.
hello_hello is offline  
Old 22nd January 2016, 22:54   #13816  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by osso123 View Post
So, is this normal for AC3 codec to introduce massive noise/overshoot/harmonics even at midrange bitrates?
Sorry but I can't replicate your test, the differences between your Test.wav and the AC3 192 Kb/s are below than -61 dB (0.09 %).

That is not massive noise/overshoot/harmonics, is the expected difference between source and a lossy encode.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 22nd January 2016, 23:08   #13817  |  Link
osso123
Registered User
 
Join Date: Sep 2014
Location: Europa
Posts: 5
Quote:
Originally Posted by tebasuna51 View Post
Sorry but I can't replicate your test, the differences between your Test.wav and the AC3 192 Kb/s are below than -61 dB (0.09 %).

That is not massive noise/overshoot/harmonics, is the expected difference between source and a lossy encode.
Please look at the resulting ac3 files spectrum via audacity. It shows harmonic frequencies added that werent there before. In this example there are only few new frequencies added (even more if you reduce the conversion bitrate), but if you run this test with a real life file, for example of a movie, you will see extreme differences, you can even *hear* them by ear, which i think is unacceptable.


P.S. these reply-submission-captchas are ... overpowered :/
osso123 is offline  
Old 22nd January 2016, 23:22   #13818  |  Link
osso123
Registered User
 
Join Date: Sep 2014
Location: Europa
Posts: 5
I uploaded a better example of a 5.1 DTS real-life file and the converted ac3 file.

Load those files into your audio editor and just listen only to the bass tracks (solo). You will hear those new frequencies instantly, they are distorting the bass channel.

http://www98.zippyshare.com/v/6ViEaKpO/file.html
osso123 is offline  
Old 23rd January 2016, 13:10   #13819  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by osso123 View Post
I uploaded a better example of a 5.1 DTS real-life file and the converted ac3 file.
Seems there are something wrong in your real-life DTS.
I don't know the encoder used to create this DTS, but is it than have high frequency harmonics and not the AC3. See attached image.

Maybe sound better for you, but the AC3 encoder do the job like expected:
filtering high frecuencies before encode.
Attached Images
 
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 23rd January 2016, 14:37   #13820  |  Link
osso123
Registered User
 
Join Date: Sep 2014
Location: Europa
Posts: 5
Quote:
Originally Posted by tebasuna51 View Post
Seems there are something wrong in your real-life DTS.
Or maybe you named the files wrong? Please look at this video capture I just did:
https://youtu.be/2gHP_SOZS6Y

If you have a mediaplayer that can remap/mute audio inputchannels separately - like MPC (mediaplayerclassic) - you could also just have it mute all but the LFE channel and listen to it that way. The high pitch frequencies in the ac3 are hearable from far away. So its no visual bug in Audacity or something of that sort.

P.S. btw, my spectrogram windows-size in audacity is set to 4096.

Last edited by osso123; 23rd January 2016 at 14:44.
osso123 is offline  
Closed Thread

Tags
eac3to

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:01.


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