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

Reply
 
Thread Tools Search this Thread Display Modes
Old 31st July 2014, 06:04   #21  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Quote:
Originally Posted by filler56789 View Post
Very-well, I suppose (and hope ) I have found the way to make ffdcaenc *NIX-friendly...
To whom would like to try to compile the cleaned-up source-code, here is the URL:

http://www.mediafire.com/download/76.../LUNIX-test.7z

INSTRUCTIONS:

autoreconf -f -i -v

./configure --disable-alsa --disable-shared --enable-static

make
Just tried it. Compiles fine and ffdcaenc works fine
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 31st July 2014, 06:08   #22  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Great!

Thanks for testing and confirming =^.^=
filler56789 is offline   Reply With Quote
Old 31st July 2014, 06:23   #23  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,843
Quote:
Originally Posted by filler56789 View Post
Great!

Thanks for testing and confirming =^.^=
Have a question, though. Are you planning to maintain/further develop ffdcaenc in some form, maybe on github or so?

If that's the case, I may include it in my scripts
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 31st July 2014, 07:30   #24  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Nope, because I am not a programmer since the days that the 96-column punch cards were still used ^.^;

All I wanted was just make the improvements created by Lord_Mulder (and now, by Alexei Andropov too) available to the *NIX users, so that their better builds of (ff)dcaenc don't depend on WINE anymore

But if I just could, I certainly would fix the issues with the "uncommon" channel-layouts and
would add the back-center channel to the mono inputs option =^_^=

FWIW, these were the steps of the RE-Linuxization:

1) internal renaming from dcaenc to ffdcaenc

2) add _T(__GNUC_PATCHLEVEL__) to compiler_info.h

3) drop the Windows-specific Unicode support

4) replace all the occurrences of __int8 and __int32 with int8_t and int32_t , plus

5) replace "unsigned __int8" and "unsigned __int32" with "uint8_t" and "uint32_t"

6) remove the MSVC stuff from (ff)dcaenc.h

7) replace %d and %02d with %u and %02u in the file main.c, in order to eliminate the warning messages

Last edited by filler56789; 1st August 2014 at 16:44. Reason: additional info
filler56789 is offline   Reply With Quote
Old 7th August 2014, 05:24   #25  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Well, certainly not because of some good-intention ^.^; ,
but I have changed my mind

https://github.com/filler56789/ffdcaenc-2
filler56789 is offline   Reply With Quote
Old 31st August 2014, 05:50   #26  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
I managed to get one DVD going.
HCenc + AC3 + DTS (754.5 kbps for DVD authoring).
It built propery with Muxman and managed to get it into an ISO with ImgBurn.
I still have to test if it works on my devices though. That's another ballpark.

For testing, I took a 24bit audio track and made 3 versions: 16bit (eac3to -down16), 24bit (original), s32 (ffmpeg)
Ran them all though ffdcaenc and the file size was the same for all.
I decoded all three to WAV with eac3to+arcsoft then eac3to+libav and ram them through Foobar2000's "bit comparator", only mild audio differnces were found between all of them.

Not sure if upscaling 24->32 did anything, since there's no new data and I didn't apply any filtering.

I do like it supports 24bit, since 16 & 24 are the common bit depths for blu-ray audio formats, so i don't needlessly have to upscale to s32.

However, it seems no matter the source, it writes the DTS with 24bit, which is unusable in AVStoDVD (since AVS to accept only 16/20 bit DTS streams for maximum compatibility wtih Muxman).
Using Muxman manually (without AVStoDVD), I was able to get the 24bit DTS stream to mux.

This is still incredibly fun to play with.
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 31st August 2014, 09:26   #27  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
@Sparktank
Please read the last pages in eac3to thread.

- The standard dts don't have bitdepth, the size is always the same no matter the bitdepth of source wav because the bitrate is the same.

- The 32 bits float have, more or less, the same precission than 24 bits int, because 32 float have 24 bits for mantissa (significand digits). It's usefull only when you need operate with the values to prevent int overflow.

- If AVStoDVD don't accept a DTS marked with a source PCM of 24 bits is only a bug in the program. The DTS header field about Source PCM Resolution must be ignored.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 31st August 2014, 16:23   #28  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 940
Quote:
Originally Posted by tebasuna51 View Post
@Sparktank
Please read the last pages in eac3to thread.

- The standard dts don't have bitdepth, the size is always the same no matter the bitdepth of source wav because the bitrate is the same.
Thanks for adding a lot of input.

I did spend some time reading eac3to thread lately and had wondered if this was mostly just A2D concern about its bit-depth and DTS formats.

Quote:
Originally Posted by tebasuna51 View Post
- The 32 bits float have, more or less, the same precission than 24 bits int, because 32 float have 24 bits for mantissa (significand digits). It's usefull only when you need operate with the values to prevent int overflow.
32 float, that reminds me, I don't believe this program uses float. I think it prefers 32 integer instead.
The documentation says there's a known bug about floating-point:

Quote:
Known bug: wav files with floating-point samples are misinterpreted as
containing 32-bit integer samples.

Quote:
Originally Posted by tebasuna51 View Post
- If AVStoDVD don't accept a DTS marked with a source PCM of 24 bits is only a bug in the program. The DTS header field about Source PCM Resolution must be ignored.
I should visit the A2D thread, but after some extensive testing and samples done for evidence.
It would be nice to see something like this implemented into A2D, since I use most of what it uses.

----------

All this FF play, and I still haven't gotten around to actually trying Mulder's version (of which this is a fork of).
I'll have to set up a day for all this.
__________________
Win10 (x64) build 19041
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
Sparktank is offline   Reply With Quote
Old 13th September 2014, 20:21   #29  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Quote:
Originally Posted by tebasuna51 View Post
- If AVStoDVD don't accept a DTS marked with a source PCM of 24 bits is only a bug in the program. The DTS header field about Source PCM Resolution must be ignored.
That was a decision of mine of some times ago: most 16/20bit DTS streams are accepted by Muxman and more than few 24bit DTS streams are rejected by Muxman.

I have tried to search what is the real culprit to know if a DTS stream is DVD compliant (aka accepted by Muxman), without success. That's why I have implemented in AVStoDVD the 16/20 vs 24 bit approximate rationale.

I would happily change the rationale, if anyone can suggest how to define in advance (i.e. thru Mediainfo) if a DTS stream is DVD compliant (accepted by Muxman).

Thanks guys!



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 13th September 2014, 20:54   #30  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally Posted by MrC View Post
I have tried to search what is the real culprit to know if a DTS stream is DVD compliant (aka accepted by Muxman), without success. That's why I have implemented in AVStoDVD the 16/20 vs 24 bit approximate rationale.
The most likely culprit is that the DVD specification requires an elementary DTS stream to be encoded with 2012 primary (2013 bytes) per frame
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |

Last edited by SeeMoreDigital; 14th September 2014 at 19:50.
SeeMoreDigital is offline   Reply With Quote
Old 13th September 2014, 21:55   #31  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Quote:
Originally Posted by SeeMoreDigital View Post
The most likely culprit is that the DVD specification requires an elementary DTS stream to be encoded with 2013 bytes per frame
That's interesting, many thanks for the quick reply. Any docs to support that spec? How can I extract this info from an audio stream? AFAIK bytes/frame is not part of MediaInfo output...



Bye

P.S. If we are going OT, we can continue on the AVStoDVD thread.
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 13th September 2014, 22:35   #32  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally Posted by MrC View Post
How can I extract this info from an audio stream? AFAIK bytes/frame is not part of MediaInfo output...
Personally, I use an application called DTSParser.

I discovered this issue only recently myself a few months, ago here...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 14th September 2014, 00:01   #33  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
The tool I use in the post linked by SeeMoreDigital is LeeAudbi

Maybe you can use the LeeDtsBi.exe, out of the GUI, than output the file AudioBi.log:
Code:
==========================================================
File ........: D:\tmp\test 4\321.dts
Size ........: 1886250 bytes

----------------------------------------- First Frame Info
CRC present .................: 0 (Not)
Number of PCM Sample Blocks .: 15 ( 512 samples/frame)
Primary Frame Byte Size .....: 1005 ( 1006 bytes/frame)
Audio Channel Arrangement ...: 9 (5 C + L + R + SL + SR)
Core Audio Samp. Frequency ..: 13 (48 kHz)
Transmission Bit Rate .......: 15 (768 Kb/s)
Embedded Down Mix Enabled ...: 0 (Not)
Embedded Dynamic Range Flag .: 0 (Not)
Embedded Time Stamp Flag ....: 0 (Not)
Auxiliary Data Flag .........: 0 (Not)
Mastered in HDCD format .....: 0 (Not)
Extension Audio Descr. Flag .: 0 (Channel Extension XCh)
Extended Coding Flag ........: 0 (Not)
Audio Sync Word Insert. Flag : 1 (Sub-sub-frame)
Low Frequency Effects Flag ..: 2 (Present, interpolation factor 64)
Predictor History Flag Switch: 1 (Yes)
Multirate Interpolator Switch: 0 (Non-perfect Reconstruction)
Encoder Software Revision ...: 7 (Current)
Copy History ................: 1 (Definition deliberately omitted)
Source PCM Resolution .......: 6 (24 bits)
Front Sum/Difference Flag ...: 0 (Not)
Surrounds Sum/Difference Flag: 0 (Not)
Dialog Normalization Param. .: - 0 dB
------------------------------------------- Estimated Info
Total Frames ......: 1875
Duration ..........: 20 seconds. ( 0 h. 0 m. 20 s.)
------------------------------------------------- End Info
Here you can see a valid DTS with Transmission Bit Rate 768 Kb/s.
I don't know the Muxman requirements, but I don't think is related with the value of the field Source PCM Resolution that can be changed without modify the audio itself.
Attached Files
File Type: 7z LeeDtsbi.7z (7.4 KB, 145 views)
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 14th September 2014 at 00:07.
tebasuna51 is offline   Reply With Quote
Old 14th September 2014, 17:58   #34  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
@tebasuna51

thanks for the info about LeeDtsBi, nice tool

Actually some years ago I had already contacted mpucoder who pointed me to this page for DTS compliance to DVD:
http://mpucoder.com/DVD/dtshdr.html

At that time it was quite obscure to me. Now it should be more clear thank to your explanations and achievable with LeeDtsBi.

Requirements (other than bitrate and samplerate):

Number of PCM Sample Blocks = 15
Primary Frame Byte Size = 1005 for 768 Kbps streams or 2012 for 1536 Kbps streams



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum

Last edited by MrC; 14th September 2014 at 18:19. Reason: Deepening more
MrC is offline   Reply With Quote
Old 14th September 2014, 18:50   #35  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
I think I've found one of those "problematic 24-bit files" mentioned by MrC

http://forum.videohelp.com/threads/3...=1#post2345872
filler56789 is offline   Reply With Quote
Old 15th September 2014, 20:30   #36  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
@tebasuna51

I have seen that LeeDtsbi accepts only DTS files as input (well, it is designed for that, I assume .... ). Would it be possible to expand the scope by feeding also containers of DTS tracks, such as avi, vob, mkv?

Thanks in advance



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum

Last edited by MrC; 15th September 2014 at 20:33.
MrC is offline   Reply With Quote
Old 15th September 2014, 21:12   #37  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Sorry, but I don't know how parse containers.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 15th September 2014, 23:57   #38  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
^
^ MrC, I presume you can use a recent build of MediaInfo for that purpose. My copy is version 0.7.67, and until now, it deals fine (bitrate-wise) with all the "generic DTSs" that I have created with dcaenc Example:

Code:
General
Unique ID                                : 253922954119774177664030532708049754484 (0xBF07C83717D52580B6BF63AA47561974)
Complete name                            : D:\SomeDirectory\filename.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 171 MiB
Duration                                 : 10mn 13s
Overall bit rate                         : 2 333 Kbps
Encoded date                             : UTC 2010-02-22 21:41:31
Writing application                      : mkvmerge v5.8.0 ('No Sleep / Pillow') built on Sep 30 2012 10:57:14
Writing library                          : libebml v1.3.0 + libmatroska v1.4.0

Video
ID                                       : 1
Format                                   : VC-1
Codec ID                                 : V_MS/VFW/FOURCC / WMV3
Codec ID/Info                            : Windows Media Video 9
Codec ID/Hint                            : WMV3
Duration                                 : 10mn 13s
Bit rate                                 : 1 994 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Bit depth                                : 8 bits
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.087
Stream size                              : 146 MiB (85%)
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Mode                                     : 16
Format settings, Endianness              : Big
Codec ID                                 : A_DTS
Duration                                 : 10mn 13s
Bit rate mode                            : Constant
Bit rate                                 : 292 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 21.4 MiB (13%)
Language                                 : English
Default                                  : Yes
Forced                                   : No
If MediaInfo was wrong in this case, then it would keep "thinking" that Ğactual_bitrate == transmission_bitrateğ

Last edited by filler56789; 16th September 2014 at 00:02.
filler56789 is offline   Reply With Quote
Old 16th September 2014, 10:00   #39  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
@filler56789

thanks for looking into this. Actually I already use MediaInfo to scan video and audio properties. Unfortunately samplerate and bitrate are not sufficient to define if a DTS stream is DVD compliant. There are streams having 768/1536 Kbps and 48 KHz but are not DVD compliant. As mentioned before we need to check also:

Number of PCM Sample Blocks = 15
Primary Frame Byte Size = 1005 for 768 Kbps streams or 2012 for 1536 Kbps streams

as LeeDtsBi from tebasuna51 does.

I have already sent a feat request to Zenitram (MediaInfo author) to include the above properties. Let's wait for his reply.



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 16th September 2014, 14:46   #40  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Quote:
Originally Posted by MrC View Post
@filler56789

thanks for looking into this. Actually I already use MediaInfo to scan video and audio properties. Unfortunately samplerate and bitrate are not sufficient to define if a DTS stream is DVD compliant.
Actually, they are sufficient, IF/WHEN reported correctly. At 48kHz, and with 512 samples per frame,

1006 bytes per frame = 754.500kbps
1024 bytes per frame = 768.000kbps

2013 bytes per frame = 1509.750kbps
2048 bytes per frame = 1536.000kbps

Last edited by filler56789; 16th September 2014 at 14:49. Reason: clarity
filler56789 is offline   Reply With Quote
Reply

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 20:06.


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