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 26th June 2016, 11:29   #13981  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,743
Quote:
Originally Posted by manolito View Post
Sorry this will not do it for me...
I use this audio conversion in StaxRip, everything should be automatic without any user intervention.

Mostly I will convert AAC audio to AC3 audio. When converting to a lossy compressed format it is never a good idea to normalize to 0dB, I mostly leave a headroom of 2dB.

The problem is that StaxRip cannot use BeSweet for AC3 audio as the target format (this would enable normalizing to arbitrary values), it only can use eac3to.
You can do it with a free audio editor as Adobe Audition (that was earlier Cool Edit Pro).
Music Fan is offline  
Old 26th June 2016, 12:38   #13982  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by tebasuna51 View Post
Nobody can help you because the forum rule 6
HDTracks is a legitimate site for music downloads.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 26th June 2016, 13:45   #13983  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 77
Quote:
Originally Posted by tebasuna51 View Post
Nobody can help you because the forum rule 6 :

6) No warez, cracks, serials or illegally obtained copyrighted content! Links to content of a questionable nature (e.g. anything you don't own and/or have downloaded), asking for, offering, or asking for help/helping to process such content in any way or form is not tolerated.

Please read the forum rules.
HDtracks.com is a legitimate commercial site for hi-Rez downloads.

Anyway, they have about 80 or so new releases that are 352.8khz, and I'm trying to figure out if I can down sample these. I'll post a mediainfo report when I get in a little later.
Ripman is offline  
Old 26th June 2016, 15:02   #13984  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 77
Quote:
Originally Posted by Ripman View Post
I downloaded 352.8khz wav files from HDtracks. I wanted to convert the wavs to 176400 so I can listen on my laptop also.

HDtracks uses a custom field in their wav files to store artwork. This field can sometimes contain many MBs of data.

I used the following command line. It all seems to work nicely. But each converted track has some pretty evil static at the very end.

Eac3to 352.wav 176.wav -resampleTo176400 -0.1dB

What should I change on the command line to get my down sampling to work properly?
As my op describes, I used the following command line with a 352khz wav file as input:
Eac3to 352.wav 176.wav -resampleTo176400 -0.1dB

The mediainfo report seemed normal for the down sampled wav, but vlc reported it as a 32bit file.

So I used the following command line:
Eac3to 352.wav 176.wav -little -24 -resampleTo176400 -0.1dB

This also resulted in a down sampled file with static at the very end. Tbh, it seems to occur only with files that have a gain applied via the "#dB" command line option.

I appreciate any ideas on this one. Thanks.
Ripman is offline  
Old 26th June 2016, 15:10   #13985  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Ripman View Post
As my op describes, I used the following command line with a 352khz wav file as input:
Eac3to 352.wav 176.wav -resampleTo176400 -0.1dB
Use SoX for re-sampling.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 26th June 2016, 17:20   #13986  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Ripman View Post
HDtracks.com is a legitimate commercial site for hi-Rez downloads.
Sorry.

Quote:
Eac3to 352.wav 176.wav -little -24 -resampleTo176400 -0.1dB
Please post the log file to see how eac3to recognize this wav.

Quote:
But each converted track has some pretty evil static at the very end.
Maybe the wav's have extrachunks at end of files not recognized by eac3to, maybe some metadata not compliant with wav spec.

EDIT: without problems in my test:
Quote:
command line: eac3to.exe 352.wav 176.wav -resampleTo176400 -0.1dB
------------------------------------------------------------------------------
WAV, 2.0 channels, 0:00:20, 16 bits, 11290kbps, 352.8kHz
Reading WAV...
Resampling to 176.4kHz...
Reducing depth from 64 to 24 bits...
Writing WAV...
Applying -0.1dB gain...
Creating file "176.wav"...
The original audio track has a constant bit depth of 16 bits.
The processed audio track has a constant bit depth of 24 bits.
eac3to processing took 2 seconds.
Done.
The resampling process is done at 64 bits, even the source is 16 bits, but by default the output is 24 bits.
Without static at end of file.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 26th June 2016 at 17:36. Reason: Add info
tebasuna51 is offline  
Old 26th June 2016, 20:41   #13987  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Originally Posted by manolito View Post
Sorry this will not do it for me...
I use this audio conversion in StaxRip, everything should be automatic without any user intervention.

Mostly I will convert AAC audio to AC3 audio. When converting to a lossy compressed format it is never a good idea to normalize to 0dB, I mostly leave a headroom of 2dB.

The problem is that StaxRip cannot use BeSweet for AC3 audio as the target format (this would enable normalizing to arbitrary values), it only can use eac3to.
What can be done is creating an audio profile based on the batch audio encoder instead of the GUI audio encoder.

it's created like so:

audio profiles menu > edit profiles > add > command line

and could look like so:

stax76 is offline  
Old 26th June 2016, 22:01   #13988  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 77
Quote:
Originally Posted by tebasuna51 View Post
Sorry.



Please post the log file to see how eac3to recognize this wav.



Maybe the wav's have extrachunks at end of files not recognized by eac3to, maybe some metadata not compliant with wav spec.

EDIT: without problems in my test:


The resampling process is done at 64 bits, even the source is 16 bits, but by default the output is 24 bits.
Without static at end of file.
Thanks for your response buddy. Here is a log that I generated. I definitely looks like there is 24bit of audio data. Are you suggesting that I should forgo 24bit processing in favor of 16bit? (As I mentioned above, it seems like I get the "static" issue when I apply a gain.) I'm going to try SoX also.

Code:
eac3to v3.29
command line: eac3to  "04-Violin Concerto, _The Red Violin__ III. Andante flautando.wav" "..\24-176.4-2\04-Violin Concerto, _The Red Violin__ III. Andante flautando.wav" -little -24 -resampleTo176400 -3.45dB
------------------------------------------------------------------------------
WAV, 2.0 channels, 0:06:29, 24 bits, 16934kbps, 352.8kHz
Reading WAV...
Resampling to 176.4kHz...
Reducing depth from 64 to 24 bits...
Writing WAV...
Applying -3.45dB gain...
Creating file "..\24-176.4-2\04-Violin Concerto, _The Red Violin__ III. Andante flautando.wav"...
The original audio track has a constant bit depth of 24 bits.
The processed audio track has a constant bit depth of 24 bits.
eac3to processing took 1 minute, 11 seconds.
Done.
Here is a mediainfo -f report for these files. (I removed the custom artwork tag.)
Code:
General
Count                                    : 325
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Count of audio streams                   : 1
Audio_Format_List                        : PCM
Audio_Format_WithHint_List               : PCM
Audio codecs                             : PCM
Complete name                            : C:\52\24-352.8-2\01-Phantasmagoria - Suite from The Ghosts of Versailles.wav
Folder name                              : C:\52\24-352.8-2
File name                                : 01-Phantasmagoria - Suite from The Ghosts of Versailles
File extension                           : wav
Format                                   : Wave
Format                                   : Wave
Format/Extensions usually used           : wav
Commercial name                          : Wave
Internet media type                      : audio/vnd.wave
Codec                                    : Wave
Codec                                    : Wave
Codec/Extensions usually used            : wav
File size                                : 2814506312
File size                                : 2.62 GiB
File size                                : 3 GiB
File size                                : 2.6 GiB
File size                                : 2.62 GiB
File size                                : 2.621 GiB
Duration                                 : 1329205
Duration                                 : 22mn 9s
Duration                                 : 22mn 9s 205ms
Duration                                 : 22mn 9s
Duration                                 : 00:22:09.205
Duration                                 : 00:22:09.205
Overall bit rate mode                    : CBR
Overall bit rate mode                    : Constant
Overall bit rate                         : 16939486
Overall bit rate                         : 16.9 Mbps
Stream size                              : 844934
Stream size                              : 825 KiB (0%)
Stream size                              : 825 KiB
Stream size                              : 825 KiB
Stream size                              : 825 KiB
Stream size                              : 825.1 KiB
Stream size                              : 825 KiB (0%)
Proportion of this stream                : 0.00030
Title                                    : Phantasmagoria - Suite from The Ghosts of Versailles
Album                                    : Corigliano: Violin Concerto, "The Red Violin" - Phantasmagoria
Album/Performer                          : JoAnn Falletta
Track name                               : Phantasmagoria - Suite from The Ghosts of Versailles
Track name/Position                      : 01
Performer                                : Buffalo Philharmonic Orchestra
Composer                                 : John Corigliano, Jr.
Genre                                    : Classical Music, Orchestral
Recorded date                            : 2015
File creation date                       : UTC 2016-05-31 07:39:40.980
File creation date (local)               : 2016-05-31 03:39:40.980
File last modification date              : UTC 2016-05-31 07:42:47.380
File last modification date (local)      : 2016-05-31 03:42:47.380
Cover                                    : Yes
Cover description                        : Picture
Cover type                               : Cover (front)
Cover MIME                               : image/jpeg
Album Artist                             : JoAnn Falletta
Tool Name                                : HDtracks Downloader
Tool Version                             : 20.0.32

Audio
Count                                    : 272
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
Format                                   : PCM
Commercial name                          : PCM
Format settings                          : Little / Signed
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Codec ID/Url                             : http://www.microsoft.com/windows/
Codec                                    : PCM
Codec                                    : PCM
Codec/Family                             : PCM
Codec/Info                               : Microsoft PCM
Codec/Url                                : http://www.microsoft.com/windows/
Codec/CC                                 : 1
Codec settings                           : Little / Signed
Codec settings, Endianness               : Little
Codec settings, Sign                     : Signed
Duration                                 : 1329205
Duration                                 : 22mn 9s
Duration                                 : 22mn 9s 205ms
Duration                                 : 22mn 9s
Duration                                 : 00:22:09.205
Duration                                 : 00:22:09.205
Bit rate mode                            : CBR
Bit rate mode                            : Constant
Bit rate                                 : 16934400
Bit rate                                 : 16.9 Mbps
Channel(s)                               : 2
Channel(s)                               : 2 channels
Sampling rate                            : 352800
Sampling rate                            : 352.8 KHz
Samples count                            : 468943520
Resolution                               : 24
Resolution                               : 24 bits
Bit depth                                : 24
Bit depth                                : 24 bits
Stream size                              : 2813661378
Stream size                              : 2.62 GiB (100%)
Stream size                              : 3 GiB
Stream size                              : 2.6 GiB
Stream size                              : 2.62 GiB
Stream size                              : 2.620 GiB
Stream size                              : 2.62 GiB (100%)
Proportion of this stream                : 0.99970
Here is an audacity screen shot of the "noise" at the end of an eac3to 352-176 down sampled wav -- it's about 1/2 second. Again, the issue occurs when applying a gain. The source 352 wav is clean in audacity.
https://www.dropbox.com/s/ob7781uqvd...nshot.jpg?dl=0

Last edited by Ripman; 27th June 2016 at 17:13. Reason: added graphic
Ripman is offline  
Old 26th June 2016, 22:54   #13989  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by stax76 View Post
What can be done is creating an audio profile based on the batch audio encoder instead of the GUI audio encoder.
Thanks Stax,
I already did exactly this...

Obviously there is no way in StaxRip to use BeSweet for AC3 audio (except using the commandline profile). This is too bad because I think that for AC3 target format BeSweet is superior to eac3to. If you use the latest bsn.dll and aften.exe by KurtNoise BeSweet is much more versatile than eac3to.

Thanks and cheers
manolito
manolito is offline  
Old 26th June 2016, 23:57   #13990  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Originally Posted by manolito View Post
Obviously there is no way in StaxRip to use BeSweet for AC3 audio (except using the commandline profile). This is too bad because I think that for AC3 target format BeSweet is superior to eac3to. If you use the latest bsn.dll and aften.exe by KurtNoise BeSweet is much more versatile than eac3to.
do you have a link to the latest bsn.dll and aften.exe?
stax76 is offline  
Old 27th June 2016, 01:11   #13991  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
The original Kurtnoise free.fr site seems to be down. I uploaded the two files here:
http://www13.zippyshare.com/v/SkBAb6Av/file.html

For Aften I believe that the latest Wisodev builds also work, but the safest bet is to use the latest Kurtnoise builds.


Cheers
manolito
manolito is offline  
Old 27th June 2016, 02:25   #13992  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 77
Quote:
Originally Posted by Groucho2004 View Post
Use SoX for re-sampling.
Thanks. I tried SoX 14.4.2 and it works just fine. Here is the sox command line I used to replicate the one I used with eac3to.

sox -V4 352.wav --rate 176400 176.wav gain -3.5 2>sox_log.txt

Last edited by Ripman; 27th June 2016 at 02:27.
Ripman is offline  
Old 27th June 2016, 11:16   #13993  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by manolito View Post
Obviously there is no way in StaxRip to use BeSweet for AC3 audio (except using the commandline profile). This is too bad because I think that for AC3 target format BeSweet is superior to eac3to. If you use the latest bsn.dll and aften.exe by KurtNoise BeSweet is much more versatile than eac3to.
No way to use BeSweet for that job.

1) BeSweet can't decode AAC audio

2) BeSweet can't manage wav's (the decoded AAC) bigger than 2GB.
A track 5.1 from a movie is always bigger than 2 GB.

3) The encoded AC3 is the same, not superior, to eac3to output because both use Aften.exe like encoder (using the last bsn.dll in BeSweet).

The solution proposed by Stax76 must work.

I know than eac3to can be improved with this behaviour because if you try directly:

eac3to input.aac output.ac3 -normalize -2dB

first do the -2dB gain an after normalize, then the first operation is useless.
If first normalize and after apply -2dB, or better if take the value -2dB to limit to normalize, the process can be solved with only one pass.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 27th June 2016, 13:31   #13994  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Ripman View Post
Are you suggesting that I should forgo 24bit processing in favor of 16bit?
Nope, was just a sample than show how eac3to manage the resampling.

Here:
Quote:
Code:
...
WAV, 2.0 channels, 0:06:29, 24 bits, 16934kbps, 352.8kHz
Reading WAV...
Resampling to 176.4kHz...
Reducing depth from 64 to 24 bits...
Writing WAV...
Applying -3.45dB gain...
Here is a mediainfo -f report for these files.
Code:
...
Cover                                    : Yes
Cover description                        : Picture
Cover type                               : Cover (front)
Cover MIME                               : image/jpeg
Album Artist                             : JoAnn Falletta
Tool Name                                : HDtracks Downloader
Tool Version                             : 20.0.32

Audio
Duration                                 : 1329205 ms
Channel(s)                               : 2 channels
Sampling rate                            : 352800
Bit depth                                : 24 bits
Stream size                              : 2813661378
Here is an audacity screen shot of the "noise" at the end -- it's about 1/2 second.
The included Artwork tag seems the problem, the WAV structure is not designed to support that metadata. Without a sample I can't know if is a violation of WAV specs or a eac3to bug.

At least eac3to don't support that (incorrect duration calculated) and artwork data considered like audio data (last noise).

Audacity show noise from original file or from the eac3to converted?
Check if Audacity support the Artwork metadata or show also noise from original wav.

Quote:
I tried SoX 14.4.2 and it works just fine.
Then problem solved.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 27th June 2016, 13:39   #13995  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
I am curious about such a WAV file too, I wrote a RIFF header analyzing tool long ago (originally MS-DOS based, rebuilt for Win32 with Lazarus) and wonder which RIFF chunks it would report (the "data" chunk is not always "the whole rest of the file after the header")... Downloading Gigabytes to obtain a sample is insane, though. Possibly.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 27th June 2016, 14:23   #13996  |  Link
Ripman
Registered User
 
Join Date: May 2015
Posts: 77
Thanks for he responses. I don't think the custom artwork field is the problem - the source 352 wav files play fine through my gear, and there is no static at the end that can be heard or seen with audacity. (I put a Dropbox link to a screen shot from audacity in my prior post.) I have previously processed wavs with embedded artwork from hdt in the 44khz-192khz range without issue using eac3to and a gain command line argument.

The problem only occurs when a gain is applied via the #dB command line option. I wonder if it isn't caused by expanding to 32bits to apply gain.

I have a 352khz file that's about 650mb. I'll upload the whole thing when I get in later so people can experiment.

Last edited by Ripman; 27th June 2016 at 17:18.
Ripman is offline  
Old 27th June 2016, 17:22   #13997  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by tebasuna51 View Post
eac3to input.aac output.ac3 -normalize -2dB

first do the -2dB gain an after normalize, then the first operation is useless.
If first normalize and after apply -2dB, or better if take the value -2dB to limit to normalize, the process can be solved with only one pass.
Sorry I am not sure if I understand you correctly...

I did try your command line with "-normalize -2dB", and the result is that eac3to first applies a -2db gain decrease and afterwards normalizes to 0dB again. Here is the log:
Quote:
eac3to v3.31
command line: "E:\Programme\StaxRip\Applications\eac3to\eac3to.exe" "I:\test temp files\test ID1 - iv-Undetermined 18ms.wav" "I:\test temp files\test ID1 - iv-Undetermined 18ms_Output.ac3" -448 -normalize -2dB -down16 -progressnumbers

------------------------------------------------------------------------------
WAV, 5.1 channels, 0:05:00, 16 bits, 4608kbps, 48kHz
Reading WAV...
Reducing depth from 64 to 16 bits...
Writing WAV...
Applying -2dB gain...
Creating file "I:\test temp files\test ID1 - iv-Undetermined 18ms_Output.ac3.pass1.wav"...
The original audio track has a constant bit depth of 16 bits.
The processed audio track has a constant bit depth of 16 bits.
Starting 2nd pass...
Reading WAV...
Reducing depth from 64 to 16 bits...
Remapping channels...
Encoding AC3 <448kbps> with libAften...
Applying 3.8dB gain...
Creating file "I:\test temp files\test ID1 - iv-Undetermined 18ms_Output.ac3"...
The processed audio track has a constant bit depth of 16 bits.
eac3to processing took 2 minutes, 2 seconds.
Done.
I want to limit the normalize gain to a max peak value of -2dB, how can I achieve this with eac3to?

Another question about the command line generated by StaxRip:
Is the "down16" parameter meaningful? Does libaften cause problems with an input which has a higher bit depth?


Cheers
manolito
manolito is offline  
Old 27th June 2016, 18:20   #13998  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by LigH View Post
I am curious about such a WAV file too, I wrote a RIFF header analyzing tool long ago (originally MS-DOS based, rebuilt for Win32 with Lazarus) and wonder which RIFF chunks it would report (the "data" chunk is not always "the whole rest of the file after the header")...
I test, with eac3to, wav files with extra chunks after the data chunk without problems. For instance cue points created with GoldWave editor.

But, maybe, the eac3to behaviour can change with wav files greater than 2 GB, like here. Is know than there are soft than don't support this limit.

I can't understand how eac3to show a duration of 0:06:29 when seems (by size, channels, bitdepth and samplerate) the correct duration is 00:22:09.205 like show MediaInfo.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 27th June 2016 at 18:52. Reason: typo
tebasuna51 is offline  
Old 27th June 2016, 18:48   #13999  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by manolito View Post
Sorry I am not sure if I understand you correctly...

I want to limit the normalize gain to a max peak value of -2dB, how can I achieve this with eac3to?
Yes, you need two pass, don't work with only one pass.

For that stax76 solution:

eac3to "%input%" "%output%.flac" -normalize -progressnumbers
eac3to "%output%.flac" "%output%" -2dB -progressnumbers

(the bitrate is not needed, 640 Kb/s for 5.1, 448 Kb/s for 2.0)

Quote:
Another question about the command line generated by StaxRip:
Is the "down16" parameter meaningful? Does libaften cause problems with an input which has a higher bit depth?
I don't see when "down16" is used. Is not needed for libaften, like in previous solution than use the default bitdepth 24.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 27th June 2016, 19:38   #14000  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by tebasuna51 View Post
eac3to "%input%" "%output%.flac" -normalize -progressnumbers
eac3to "%output%.flac" "%output%" -2dB -progressnumbers
Thanks, but would this intermediate flac file not have clipping? Isn't it necessary to use a 32-bit float wav file as the intermediate file?


Cheers
manolito

Last edited by manolito; 27th June 2016 at 23:19.
manolito 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 12:33.


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