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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > General > Audio encoding
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 11th January 2012, 01:38   #201  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,223
Do I get this right? You try to pipe a 'w64' file into dcaenc? I don't think its Wave parser will be able to deal with that. It was written with plain RIFF/Wave files in mind and nothing else.

(The only thing that the "-l" option does is ignoring the length field of the "data" chunk, as that field may not contain a valid value, e.g. in case of reading from STDIN)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 11th January 2012 at 01:40.
LoRd_MuldeR is offline   Reply With Quote
Old 11th January 2012, 02:51   #202  |  Link
geminigod
Registered User
 
Join Date: Mar 2011
Posts: 34
Quote:
Originally Posted by LoRd_MuldeR View Post
Do I get this right? You try to pipe a 'w64' file into dcaenc? I don't think its Wave parser will be able to deal with that. It was written with plain RIFF/Wave files in mind and nothing else.

(The only thing that the "-l" option does is ignoring the length field of the "data" chunk, as that field may not contain a valid value, e.g. in case of reading from STDIN)

Well the command line I posted was attempting to have sox convert the w64 to wav and then pipe that into dcaenc and thereby hopefully get around the 4GB limit of doing two separate steps by first converting to wav. So dcaenc is reading from the STDIN.

It seemed like it worked except for the fact that sox has issues in general with w64. The resulting DTS was the same length as what sox thinks the w64 is.
[code]
> soxi "large file test.w64"

Input File : 'large file test.w64'
Channels : 6
Sample Rate : 48000
Precision : 16-bit
Duration : 01:09:32.54 = 200281709 samples ~ 312940 CDDA sectors
File Size : 6.70G
Bit Rate : 12.8M
Sample Encoding: 16-bit Signed Integer PCM
[code]

Actual length 3:13. This is a known problem with sox and w64 that is currently being worked on.

Thoughts? Recommendations for getting this huge w64 file to dts?

I know this is getting slightly off topic, but it is very relevant to dcaenc because many audio tracks will exceed the wav size limit.

Last edited by geminigod; 11th January 2012 at 02:56.
geminigod is offline   Reply With Quote
Old 11th January 2012, 04:44   #203  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
^
Quote:
Recommendations for getting this huge w64 file to dts?
If you're looking for a "one-line" solution, I'm afraid you won't find it anytime soon. So if I were you, I'd split that .W64 file into several mono .WAVs through eac3to, and then write an appropriate audio-only && multichannel Avisynth script, so that

Quote:
.AVS -> wavi.exe -> dcaenc.exe
Hope this helps

P.S.: LAV Splitter supports the W64 container, thus maybe you don't need eac3to in this case ^.^ ;

Last edited by Midzuki; 11th January 2012 at 04:47.
Midzuki is offline   Reply With Quote
Old 11th January 2012, 04:49   #204  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
or you can pipe using eac3to....
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 11th January 2012, 04:56   #205  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
^

But of course

Last edited by Midzuki; 11th January 2012 at 05:38.
Midzuki is offline   Reply With Quote
Old 11th January 2012, 05:07   #206  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
Back on the topic =^.^=

Oh well, that's what I get for not paying attention to the damn code and/or documentation -.-

Quote:
Originally posted by wavfile.c

/* 7*/ "Unsupported number of channels (only 1, 2, 4, 5 and 6)",
Besides, as the Back-Center channel "does not exist" for dcaenc,

even a "3/1" input.wav will result in a "2/2" output.dts

Last edited by Midzuki; 11th January 2012 at 06:48.
Midzuki is offline   Reply With Quote
Old 11th January 2012, 14:47   #207  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
One less misunderstanding

This is semi-OT and somewhat "late" , but also probably useful

( or interesting at least )

Lord Mulder apparently thought I had used a "git clone" of Patrakov's original code. Actually, I had used the tarball available on Patrakov's web site; that tarball was!/¿still is? "ready for configure"

Besides, Lord Mulder did appear to ignore that his own gitorious folder is able to generate a tarball for the people who don't want to use the git application --- however in this case, the content of the tarball is not different from the git clone

Last edited by Midzuki; 11th January 2012 at 15:11.
Midzuki is offline   Reply With Quote
Old 11th January 2012, 21:29   #208  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,223
Quote:
Originally Posted by geminigod View Post
Well the command line I posted was attempting to have sox convert the w64 to wav and then pipe that into dcaenc and thereby hopefully get around the 4GB limit of doing two separate steps by first converting to wav. So dcaenc is reading from the STDIN.
I see. As long as SoX sends a valid Wave header (with valid "fmt" and "data" chunk) over the pipe this should work. You'll have to use the '-l' switch for dcaenc, of course.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 12th January 2012 at 02:58.
LoRd_MuldeR is offline   Reply With Quote
Old 12th January 2012, 03:02   #209  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,223
Quote:
Originally Posted by Midzuki View Post
Back on the topic =^.^=

Oh well, that's what I get for not paying attention to the damn code and/or documentation -.-



Besides, as the Back-Center channel "does not exist" for dcaenc,

even a "3/1" input.wav will result in a "2/2" output.dts
These are all channel configurations supported by dcaenc:
Code:
#define DCAENC_CHANNELS_MONO 0
#define DCAENC_CHANNELS_DUAL_MONO 1
#define DCAENC_CHANNELS_STEREO 2
#define DCAENC_CHANNELS_STEREO_SUMDIFF 3
#define DCAENC_CHANNELS_STEREO_TOTAL 4
#define DCAENC_CHANNELS_3FRONT 5
#define DCAENC_CHANNELS_2FRONT_1REAR 6
#define DCAENC_CHANNELS_3FRONT_1REAR 7
#define DCAENC_CHANNELS_2FRONT_2REAR 8
#define DCAENC_CHANNELS_3FRONT_2REAR 9
#define DCAENC_CHANNELS_4FRONT_2REAR 10
#define DCAENC_CHANNELS_3FRONT_2REAR_1OV 11
#define DCAENC_CHANNELS_3FRONT_3REAR 12
#define DCAENC_CHANNELS_5FRONT_2REAR 13
#define DCAENC_CHANNELS_4FRONT_4REAR 14
#define DCAENC_CHANNELS_5FRONT_3REAR 15
Though the CLI front-end currently uses a hardcoded "number of channels" to "channel configuration" mapping.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 12th January 2012, 04:21   #210  |  Link
nu774
Registered User
 
Join Date: Mar 2011
Posts: 16
Quote:
Originally Posted by geminigod View Post
Anyone care to compile a development version of SoX for me??
Here you are...
http://www.mediafire.com/file/keige47mr6mo8dh/SoX.zip
Built with Visual Studio 2010, commit 6257b1b873d24ff2192d86f6efa4817eb433480c (Jan 11, 2012)
Sorry for not being static linked. Tons of Dlls.
nu774 is offline   Reply With Quote
Old 12th January 2012, 05:00   #211  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
@nu774 thanks a lot...
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 12th January 2012, 11:57   #212  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
Quote:
Originally Posted by LoRd_MuldeR View Post
These are all channel configurations supported by dcaenc:
Code:
#define DCAENC_CHANNELS_MONO 0
#define DCAENC_CHANNELS_DUAL_MONO 1
#define DCAENC_CHANNELS_STEREO 2
#define DCAENC_CHANNELS_STEREO_SUMDIFF 3
#define DCAENC_CHANNELS_STEREO_TOTAL 4
#define DCAENC_CHANNELS_3FRONT 5
#define DCAENC_CHANNELS_2FRONT_1REAR 6
#define DCAENC_CHANNELS_3FRONT_1REAR 7
#define DCAENC_CHANNELS_2FRONT_2REAR 8
#define DCAENC_CHANNELS_3FRONT_2REAR 9
#define DCAENC_CHANNELS_4FRONT_2REAR 10
#define DCAENC_CHANNELS_3FRONT_2REAR_1OV 11
#define DCAENC_CHANNELS_3FRONT_3REAR 12
#define DCAENC_CHANNELS_5FRONT_2REAR 13
#define DCAENC_CHANNELS_4FRONT_4REAR 14
#define DCAENC_CHANNELS_5FRONT_3REAR 15
Though the CLI front-end currently uses a hardcoded "number of channels" to "channel configuration" mapping.
Very well... That's the reason why I have added this text to main.c:

Code:
only the following channel-layouts are accepted:
mono, stereo, quadro, 5.0, 5.1.
besides, ( regarding the "bitrate hell" ):

Code:
The *actual* bitrate can be any value between 32 and 6144, BUT
the minimum and maximum values vary according to the frequency and the channel-layout;
I also modified the error message about "insufficient bitrate", because
5400kbps cannot be "insufficient" for a mono input @ 44.1kHz

Last edited by Midzuki; 12th January 2012 at 11:59.
Midzuki is offline   Reply With Quote
Old 12th January 2012, 14:56   #213  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,223
Here is a new build that allows the user to overwrite the pre-selected channel configuration (see help for details). Updated DLL is included.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 14th January 2012 at 14:56.
LoRd_MuldeR is offline   Reply With Quote
Old 12th January 2012, 14:57   #214  |  Link
Selur
.
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,991
Nice,thanks !
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 12th January 2012, 16:16   #215  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,223
Build in previous post updated: Channel configuration will now be checked for compatibility with input Wave file. Also added switch to indicate presence of LFE channel.

If, for example, you want to create a typical "5.1" encode from a six channel Wave file, then use 3FRONT_2REAR ("-c 10") in conjunction with "-f" switch - this is the default for 6ch input.

You could even create a "Center-only with LFE" encode now from a two channel Wave file by using MONO ("-c 1") in conjunction with the "-f" switch, confirmed by MediaInfo.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 12th January 2012 at 16:23.
LoRd_MuldeR is offline   Reply With Quote
Old 12th January 2012, 19:51   #216  |  Link
b66pak
Registered User
 
b66pak's Avatar
 
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
for this wav:

Quote:
General
Complete name : audio.wav
Format : Wave
File size : 22.0 MiB
Duration : 40s 0ms
Overall bit rate mode : Constant
Overall bit rate : 4 608 Kbps

Audio
ID : 0
Format : PCM
Format settings, Endianness : Little
Codec ID : 1
Duration : 40s 0ms
Bit rate mode : Constant
Bit rate : 4 608 Kbps
Channel(s) : 6 channels
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Stream size : 22.0 MiB (100%)
with dcaenc.2012-01-12.R2:

Code:
dcaenc -i audio.wav -o audio.dts -b 1509

or

dcaenc -i audio.wav -o audio.dts -b 1509 -c 10 -f

i get:

Quote:
Invalid channel configuration for input audio!

with dcaenc.2012-01-02 is OK...
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note...
Visit The Land Of Dracula (Romania - EU)!
b66pak is offline   Reply With Quote
Old 12th January 2012, 20:42   #217  |  Link
Selur
.
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,991
I agree something seems to be broken:
Code:
ffmpeg -threads 8 -v -10 -y -i "D:\Encoding Output\test_20_39_06_59101.ac3" -ac 6 -acodec pcm_s16le -f wav - | dcaenc -i - -o "D:\Encoding Output\test_20_39_06_59102.dts" -b 754 -l
and
Code:
ffmpeg -threads 8 -v -10 -y -i "D:\Encoding Output\test_20_39_06_59101.ac3" -ac 6 -acodec pcm_s16le -f wav - | dcaenc -i - -o "D:\Encoding Output\test_20_39_06_59102.dts" -b 754 -c 10 -f -l
both give me:
Quote:
Invalid channel configuration for input audio!
Cu Selur

Ps.: works for stereo sources
__________________
Hybrid here in the forum, homepage, its own forum

Last edited by Selur; 12th January 2012 at 20:54.
Selur is offline   Reply With Quote
Old 12th January 2012, 21:48   #218  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,223
There was a little syntax error in my channel configuration checking code. Thus valid configurations could be rejected. Should be fixed now

[UPDATE] New build is available now [/UPDATE]
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 12th January 2012 at 22:16.
LoRd_MuldeR is offline   Reply With Quote
Old 12th January 2012, 23:31   #219  |  Link
Selur
.
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,991
New build seems to work.

Cu Selur
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 13th January 2012, 00:17   #220  |  Link
geminigod
Registered User
 
Join Date: Mar 2011
Posts: 34
Has anyone compared the surcode DTS codec to dcaenc to see what the actual differences are? Aside from Surcode costing $250 of course. Just curious...
geminigod 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 20:29.


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