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 19th October 2023, 09:40   #61  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
A w64 file is not Atmos despite the initial source.

BTW to do a Slowdown you can use 'tempo' (preserve pitch also) or 'rate' (modify tempo and pitch) but if you use 'pitch' the duration is not changed.

I test it with a wav with 12 channels and work fine.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 19th October 2023 at 09:51.
tebasuna51 is offline   Reply With Quote
Old 19th October 2023, 19:54   #62  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
Lol, mistake in the script. Pitch was false, thx^^ Works fine with "tempo" and Multichannel W64.
-QfG- is offline   Reply With Quote
Old 16th February 2024, 23:36   #63  |  Link
DeafYakuza
Registered User
 
Join Date: Mar 2016
Posts: 34
I have a problem with command. What is to do here?

Code:
Microsoft Windows [Version 10.0.19045.4046]
(c) Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\DeafYakuza-PC>python "C:\Users\DeafYakuza-PC\Downloads\Python Atmos\MY.ATMOS.py"
  File "C:\Users\DeafYakuza-PC\Downloads\Python Atmos\MY.ATMOS.py", line 1
    atmos_decode.py -i "MY.ATMOS.thd" -c 9.1.6
                       ^
SyntaxError: invalid syntax

C:\Users\DeafYakuza-PC>
DeafYakuza is offline   Reply With Quote
Old 16th February 2024, 23:44   #64  |  Link
DeafYakuza
Registered User
 
Join Date: Mar 2016
Posts: 34
I tried with CMD with using python location.

C:\Users\DeafYakuza-PC\Downloads\Python Atmos>python atmos_decode.py -i MY.ATMOS.thd -c 9.1.6
Traceback (most recent call last):
File "C:\Users\DeafYakuza-PC\Downloads\Python Atmos\atmos_decode.py", line 70, in <module>
class AtmosDecode:
File "C:\Users\DeafYakuza-PC\Downloads\Python Atmos\atmos_decode.py", line 76, in AtmosDecode
def decode(self, input_file: pathlib.Path, out_file: pathlib.Path | None = None):
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

C:\Users\DeafYakuza-PC\Downloads\Python Atmos>
DeafYakuza is offline   Reply With Quote
Old 17th February 2024, 09:23   #65  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
I have created a little CLI based Audio decoder (supports Atmos, too). You can download here:
https://mega.nz/folder/hwF1SJyC#UajU9fy_QAiPJCpYwE2KNQ

For Atmos decoding you need installed Dolby Reference Player, for speed / amplify manipulation you need installed Avisynth+

DRC will be erased by default if you decode THD Atmos files. The Dolby Reference Player cannot erase DRC for eac3 JOC files. Simply use Cavernize for DRC Free encoding of eac3 JOC files.
Fun fact, Cavernize can demux the original Atmos masterfile including the original 3D metadata, for encoding a real OBI Atmos file. Works only with eac3 JOC, no THD support.

Last edited by -QfG-; 17th February 2024 at 09:28.
-QfG- is offline   Reply With Quote
Old 17th February 2024, 11:55   #66  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 1,003
Quote:
Originally Posted by -QfG- View Post
I have created a little CLI based Audio decoder (supports Atmos, too). You can download here:
https://mega.nz/folder/hwF1SJyC#UajU9fy_QAiPJCpYwE2KNQ

For Atmos decoding you need installed Dolby Reference Player, for speed / amplify manipulation you need installed Avisynth+

DRC will be erased by default if you decode THD Atmos files. The Dolby Reference Player cannot erase DRC for eac3 JOC files. Simply use Cavernize for DRC Free encoding of eac3 JOC files.
Fun fact, Cavernize can demux the original Atmos masterfile including the original 3D metadata, for encoding a real OBI Atmos file. Works only with eac3 JOC, no THD support.
What a great set of tools

Just one question, atm I can only encode to eac3, (which is what I wanted anyway), but how to change the option to the other types available ??
__________________
Long term RipBot264 user.

RipBot264 modded builds..

Last edited by TDS; 17th February 2024 at 12:21.
TDS is offline   Reply With Quote
Old 17th February 2024, 14:23   #67  |  Link
DeafYakuza
Registered User
 
Join Date: Mar 2016
Posts: 34
I don't understand anything but I try to encourage him, though. Can you make some steps for beginner? :-)
DeafYakuza is offline   Reply With Quote
Old 18th February 2024, 02:59   #68  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
Simply drag&drop the audio file (or supported container) over the script (Don't start the script and drop now).
After Analysing you have a little menu for changes. In the archive is a readme.txt what the options do.
-QfG- is offline   Reply With Quote
Old 18th February 2024, 10:12   #69  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by -QfG- View Post
...
DRC will be erased by default if you decode THD Atmos files. The Dolby Reference Player cannot erase DRC for eac3 JOC files. Simply use Cavernize for DRC Free encoding of eac3 JOC files.
Maybe you want say decoding?

Then you recommend use Cavernize to decode eac3 JOC files?
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 18th February 2024, 10:48   #70  |  Link
-QfG-
QfG Group Germany
 
-QfG-'s Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 245
Yes. Cavernize Gui can decode EAC3-JOC files without DRC. Download is for freee here: https://cavern.sbence.hu/cavern/downloads.php
-QfG- is offline   Reply With Quote
Old 18th February 2024, 14:47   #71  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by -QfG- View Post
I have created a little CLI based Audio decoder (supports Atmos, too). You can download here:
https://mega.nz/folder/hwF1SJyC#UajU9fy_QAiPJCpYwE2KNQ
1) With the option Logfile = [ENABLED], it is not created and always I get:
El sistema no puede encontrar la ruta especificada. (The system can't found the path...)

2) With thd source I try some layouts without succes:
Demuxing Dolby TrueHD with Atmos [5.1.2] to WAV or;
Quote:
Demuxing Dolby TrueHD with Atmos [7.1.2] to WAV ...
ERROR: from element /GstPipelineipeline0/DlbAudioDecBin:dlbaudiodecbin0/DlbTruehdDec:adb_decoder: Selected Dolby TrueHD presentation is not available
Additional debug info:
../subprojects/gst-plugins-dlb/plugins/truehd/dlbtruehddec.c(1075): decode_oamdi (): /GstPipelineipeline0/DlbAudioDecBin:dlbaudiodecbin0/DlbTruehdDec:adb_decoder
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipelineipeline0/DlbTruehdParse:dlbtruehdparse0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbaseparse.c(3696): gst_base_parse_loop (): /GstPipelineipeline0/DlbTruehdParse:dlbtruehdparse0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
3) Without log and eac3 source work fine.
And yes, apply DRC, the Cavernize output seems don't apply it with high volume.
I use the 5.1.2 front in Cavernize [FL][FR][FC][LFE][SL][SR][TFL][TFR]
but with your soft can't use that layout, only [FL][FR][FC][LFE][SL][SR][TSL][TSR] and I found differences between [SL][SR][TFL][TFR] and [SL][SR][TSL][TSR] channels.
It is possible use that channel layout (like my audio system is) with your soft.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 19th February 2024, 13:17   #72  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
I test some samples comparing the eac3 Atmos output of Dolby Reference Player 5.1.2 and the Cavernize output 5.1.2 (front).

The wav output of Dolby Reference Player:
Code:
File: C:\tmp\atmos\DolbyRefD.wav    Size:  4951819344 bytes
---------------------------------------------- Header Info
ChunkID .....: RIFF
RiffLength ..:  656852040 (ERROR: Must be Size - 8 = 4951819336)
Container ...:  WAVE
SubchunkID ..: fmt  (Length: 40)
AudioFormat .:  65534 (WAVE_FORMAT_EXTENSIBLE)
NumChannels .:  8
SampleRate ..:  48000
ByteRate ....:  1536000
BlockAlign ..:  32
BitsPerSample:  32
ValidBitsPS .:  32
MaskChannels :  0 (ERROR: Invalid ChannelMask)
SubType .....:  1 (Integer)
SubchunkID ..: fact (Length: 4)
SampleLength :  154744352 (fact Duration: 3223.84067 sec.)
SubchunkID ..: data (Length: 656851968)
Offset data .:  80 (WARNING: Assumed DataLength = 4951819264)
Duration ....:  3223.84067 sec., (0h. 53m. 43.84067s.)
------------------------------------------------- End Info
[Parsed_volumedetect_0 @ 0000019e6e5e4900] mean_volume: -43.2 dB
[Parsed_volumedetect_0 @ 0000019e6e5e4900] max_volume: -12.8 dB
1) Wrong wav header for > 4 Gb (RIFF with only 16 bits for the sizes)
2) Invalid ChannelMask
3) Unexact size, the source eac3 is 53 m. 43.872 s.
4) Applied DRC until obtain a max_volume: -12.8 dB
Anyway can be used after Normalize to have a correct volume.

The Cavernize output:
Code:
File: C:\tmp\atmos\Cavernize.wav   Size:  4955308192 bytes
---------------------------------------------- Header Info
ChunkID .....: RF64
RiffLength ..:  4294967295
Container ...:  WAVE
SubchunkID ..: ds64 (Length: 28)
RiffSize ....:  4955308184
DataSize ....:  4951867392
SampleCount .:  154745856
SubchunkID ..: fmt  (Length: 40)
AudioFormat .:  65534 (WAVE_FORMAT_EXTENSIBLE)
NumChannels .:  8
SampleRate ..:  48000
ByteRate ....:  1536000
BlockAlign ..:  32
BitsPerSample:  32
ValidBitsPS .:  32
MaskChannels :  22031 (FL FR FC LF SL SR TFL TFR)
SubType .....:  3 (Float)
SubchunkID ..: data (Length: 4294967295)
Offset data .:  104 (WARNING: Extrachunks at end of file: 3440696 bytes)
Duration ....:  3223.872 sec., (0h. 53m. 43.872s.)
------------------------------------------------- End Info
[Parsed_volumedetect_0 @ 0000015d81065640] mean_volume: -29.5 dB
[Parsed_volumedetect_0 @ 0000015d81065640] max_volume: 0.0 dB
The unique problem is the Extrachunks at end of file but can be ignored because using the RF64 header the valid data are correct ad also the duration.
Correct MaskChannels and with float samples without clipping and max_volume: 0.0 dB then DRC is not applied.

Comparing the channels content seems equivalents, maybe in other samples there are little differences between SL SR TFL TFR from Cavernize and the last 4 channels from DolbyRP maybe because are SL SR TSL TSR.

Like my system is 5.1.2(front) (SL SR TFL TFR) I'll use and recommend Cavernize and let Dolby Reference Player for TrueHD only.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 19th February 2024, 14:02   #73  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 1,003
@tebasuna51,

Have you had any experience using Dolby Media Encoder ?
__________________
Long term RipBot264 user.

RipBot264 modded builds..
TDS is offline   Reply With Quote
Old 19th February 2024, 14:34   #74  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Nope, only with Dolby Encoder Engine.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 23rd February 2024, 10:25   #75  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 541
Quote:
Originally Posted by tebasuna51 View Post
1) Wrong wav header for > 4 Gb (RIFF with only 16 bits for the sizes)
2) Invalid ChannelMask
3) Unexact size, the source eac3 is 53 m. 43.872 s.
4) Applied DRC until obtain a max_volume: -12.8 dB
Anyway can be used after Normalize to have a correct volume.

1) Does not really matter. Not everyone supports W64.

3) Wrong. The source EAC3 does not have 53 m. 43.872 s., because all EAC3 have priming of at least 256 samples in the start AND may have some in the end. DRP removes them correctly.

4) It is likely it is impossible to decode Dolby EAC3 (at least with Atmos) without applied DRC. Because of artefacts if not applied and in some peaks

Last edited by Balling; 24th February 2024 at 06:33.
Balling is offline   Reply With Quote
Old 23rd February 2024, 13:26   #76  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Balling View Post
1) Does not really matter. Not everyone supports W64.
The Cavernize output is not W64 but RF64
And Audition 2017 read it directly without problems > 4GB files.
With the Dolby wrong simple wav output I need convert it to W64 or RF64 to be read correctly.

Quote:
3) Wrong. The source EAC3 does not have 53 m. 43.872 s., because all EAC3 have priming of at least 256 samples in the start AND may have some in the end. DRP removes them correctly.
Maybe, is know than all encoders add some silent samples at the begining to initialize the encoder. With AC3 encoders add the 256 samples (5.33 ms at 48000 samples/s).

I'll make some test about this.

Quote:
4) It is possible it is impossible to decode Dolby EAC3 at least with Atmos without DRC. Because of artefacts if not DRc is applies and signal is same audio peaks
possible or impossible?

I don't think so, for what not apply DRC implies artifacts?
Cavernize do this and output float samples without clip in all my tests.

DRC can be a help for old weak players but must be a user option apply it when decode.
Apply it forced is a wrong option.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 23rd February 2024 at 13:38.
tebasuna51 is offline   Reply With Quote
Old 23rd February 2024, 20:42   #77  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Balling View Post
3) Wrong. The source EAC3 does not have 53 m. 43.872 s., because all EAC3 have priming of at least 256 samples in the start AND may have some in the end. DRP removes them correctly.
Not at all. Like decoder Dolby Reference Player don't work as you say.

1) Wav source of exactly 12.000000 seconds encoded to eac3 with Dolby Encoder Engine I obtain exactly 375 frames (32 ms/frame at 48000 Hz)
Decoded with ffmpeg I recover exactly the same 12.000 sec. without delay.
Decoded with DRP I recover also 12.000 sec but delayed 32 samples 0.667 ms.

2) Wav source of exactly 12.010000 seconds encoded to eac3 with Dolby Encoder Engine I obtain 376 frames (32 ms/frame at 48000 Hz=12.032 sec.)
Decoded with ffmpeg I recover 12.032 sec. without delay and filled at end with 22 ms of silence
Decoded with DRP I recover also 12.032 sec but delayed 32 samples 0.667 ms. and filled at end with 21.333 ms of silence.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 24th February 2024, 06:35   #78  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 541
" Decoded with ffmpeg I recover 12.032 sec. without delay and filled at end with 22 ms of silence "

FFmpeg does not support removing remainder, even on aac. And you want EAC3??

"Decoded with DRP I recover also 12.000 sec but delayed 32 samples 0.667 ms."

That is indeed bad then


I would love your source two files and 2 files encoded by Dolby EE
Balling is offline   Reply With Quote
Old 24th February 2024, 10:15   #79  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
Quote:
Originally Posted by Balling View Post
FFmpeg does not support removing remainder, even on aac. And you want EAC3??
Off course not, but you claim than Dolby Reference Player do it and it is not true.
And DRP delay and cut the last 0.667 ms of the 12000 ms wav.

Quote:
I would love your source two files and 2 files encoded by Dolby EE

Link
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 24th February 2024 at 10:18.
tebasuna51 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 15:50.


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