Giter Site home page Giter Site logo

voidxh / cavern Goto Github PK

View Code? Open in Web Editor NEW
274.0 274.0 12.0 3.01 MB

Object-based audio engine and codec pack with Dolby Atmos rendering, room correction, HRTF, one-click Unity audio takeover, and much more.

Home Page: http://cavern.sbence.hu

License: Other

C# 98.36% C++ 1.15% C 0.31% Batchfile 0.07% JavaScript 0.10%
audio audio-engine cinema dolby-atmos room-correction sound spatial-audio surround-sound unity

cavern's People

Contributors

threedeejay avatar voidxh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cavern's Issues

macOS port?

I would like to do advanced playback and decoding of Dolby Atmos e-ac-3 on macOS, and it seems like this is the only software that supports it. However, it seems like this only runs on Windows and does not work under wine. Is porting this to macOS an easy job or should I plan on purchasing Parallels Desktop to run this inside a Windows VM?

E-AC-3 JOC file decode problem

I tried to convert a few E-AC-3 JOC files (downloaded from Tidal) to ADM BWF wav, and I do not get the expected results.

Test track 1: Ado's Usseewa from Kyougen (jpop?)
Expected: one channel contains drums, another contains vocals, another contains piano, another bass, etc, etc.
Actual: every channel contains a different mix of all instruments (slightly different ratio). Some does only contain part of the instruments but it changes (i.e. for 30 seconds it's backing vocals + drums, then for 30 seconds it's backing vocals + synths, etc) The majority of channels are very quiet and when turned up sounds heavily distorted. Spectrogram shows holes and uneven lowpass.

Test track 2: Joe Hisaishi's Links from Minima Rhythm (orchestra, minimalism)
Expected: one channel for violin 1, one channel for violin 2, one channel for cello, etc.
Actual: every channel contains a different mix of all instruments (slightly different ratio). They all sound very similar. The majority of channels are very quiet and when turned up sounds heavily distorted. Spectrogram shows holes and uneven lowpass.

Don't apply environment changes when process is running

As per report. Cavernize can break when the render target changes mid-conversion. Make it so that will only apply to the next conversion. For CLI, display an error message when this command is called after the render start (output) command.

DD+ "Atmos" encoding

DD+ can contain channel-based data up to 9.1.6, should be just bitstream-copied with a modified channel order from an FFmpeg encode.

Add support for DBMD

Requested by @ValZapod. Dolby Atmos Metadata, needed for DME imports. Should be a manual selection as "ADM BWF + DBMD". If all else fails, loading a donor file's DBMD will work.

kUbuntu 22.04 wine Crash

When i run in kUbuntu 22.04 everything runs fine for about 6sec to 15sec then crashes with output -> Segmentation fault (core dumped)

Terminal EXE -> ~/Downloads/cavern64$ wine Cavern.exe
[UnityMemory] Configuration Parameters - Can be set up in boot.config
"memorysetup-bucket-allocator-granularity=16"
"memorysetup-bucket-allocator-bucket-count=8"
"memorysetup-bucket-allocator-block-size=4194304"
"memorysetup-bucket-allocator-block-count=1"
"memorysetup-main-allocator-block-size=16777216"
"memorysetup-thread-allocator-block-size=16777216"
"memorysetup-gfx-main-allocator-block-size=16777216"
"memorysetup-gfx-thread-allocator-block-size=16777216"
"memorysetup-cache-allocator-block-size=4194304"
"memorysetup-typetree-allocator-block-size=2097152"
"memorysetup-profiler-bucket-allocator-granularity=16"
"memorysetup-profiler-bucket-allocator-bucket-count=8"
"memorysetup-profiler-bucket-allocator-block-size=4194304"
"memorysetup-profiler-bucket-allocator-block-count=1"
"memorysetup-profiler-allocator-block-size=16777216"
"memorysetup-profiler-editor-allocator-block-size=1048576"
"memorysetup-temp-allocator-size-main=4194304"
"memorysetup-job-temp-allocator-block-size=2097152"
"memorysetup-job-temp-allocator-block-size-background=1048576"
"memorysetup-job-temp-allocator-reduction-small-platforms=262144"
"memorysetup-temp-allocator-size-background-worker=32768"
"memorysetup-temp-allocator-size-job-worker=262144"
"memorysetup-temp-allocator-size-preload-manager=262144"
"memorysetup-temp-allocator-size-nav-mesh-worker=65536"
"memorysetup-temp-allocator-size-audio-worker=65536"
"memorysetup-temp-allocator-size-cloud-worker=32768"
"memorysetup-temp-allocator-size-gfx=262144"
Mono path[0] = 'Z:/home/donno/Downloads/cavern64/Cavern_Data/Managed'
Mono config path = 'Z:/home/donno/Downloads/cavern64/MonoBleedingEdge/etc'
Initialize engine version: 2021.2.5f1 (4ec9a5e799f5)
[Subsystems] Discovering subsystems at path Z:/home/donno/Downloads/cavern64/Cavern_Data/UnitySubsystems
GfxDevice: creating device client; threaded=1; jobified=0
Direct3D:
Version: Direct3D 11.0 [level 11.1]
Renderer: Radeon (TM) RX 480 Graphics (ID=0x67df)
Vendor: ATI
VRAM: 4096 MB
Driver: 1.0
Begin MonoManager ReloadAssembly

  • Completed reload, in 0.184 seconds
    Initializing input.
    Input initialized.
    Touch support initialization failed: Call not implemented.
    .
    UnloadTime: 0.817600 ms
    Setting up 4 worker threads for Enlighten.
    Segmentation fault (core dumped)

AXML writing feedback

As per request. AXML takes time to write, and nothing indicates this on the GUI. Progress should be displayed.

Cavern for Unity build under macOS

  1. Installed Unity.
  2. Replaced reference in .csproj with /Applications/Unity/Unity.app/Contents/Managed/UnityEngine.dll and /Applications/Unity/Unity.app/Contents/Managed/UnityEditor.dll
  3. Run

Result

/Users/jin/cavern1/CavernUnity DLL/AudioListener3D.cs(31,31): Error CS1501: No overload for method 'Normalize' takes 4 arguments (CS1501) (CavernUnity DLL)

I have no experience with C# or Unity so I have no idea if I'm doing anything wrong.

AC-3 bed crosstalk

For Dolby's 7.1.4 web demo, the decoded AC-3 track has noise on all channels. Discussed in #56.

Cavernize GUI compatibility issue on Windows 11 22H2.

Cavernize GUI is not compatible with Windows 11 22H2 version. The ADM BWF conversion process always behaves erratically and does not result in desirable interactions with respect to any software that inserts the Dolby Atmos Master.

Support ASIO

Is it possible to add support for ASIO drivers?
This would allow to support the 7.1.4 format.
Thanks

E-AC-3 JOC file decode produces distorted output

Version 1.5

Decoding E-AC-3 JOC music files (commercial and self encoded) to riff produces distorted results. I am comparing to the reference player.

7.1.4 layout to integer RIFF.

Also RIFF float settings produce 16bit results

Feature Request : Import Dolby PHRTF to Headphone Virtualizer.

https://games.dolby.com/phrtf/games-instructions/

Dolby currently provides an app to generate PHRTF files via smartphones. This file is applicable to the binaural renderer of the Dolby Atmos Production Suite or the binaural renderer of Dolby Atmos for Headphones and start a personalized binaural rendering process.

If can apply PHRTF files to Cavern Driver or Cavernize's headphone virtualizer, it will be a more powerful program!

P.S. I can provide you with my Dolby PHRTF file if you'd like to check it out. Or you can generate a PHRTF file through the link I posted.

[Feature request] Support for AC4 and TrueHD?

I can't find a player for AC4 or TrueHD*. I'm still in the process of requesting a trial to the Dolby Reference Player but I haven't heard back for a while (2+ weeks) so it's probably ignored.

Or will this project be for eac3 only?

*Full object support (?): I'm told that TrueHD stores the clustered objects separately (so lossy clustering->lossless (no JOC) ->lossless encode), unlike EAC3 where it's combined into 5.1/7.1 channels using JOC (so lossy clustering->lossy JOC->lossy encode), but mediainfo and ffmpeg all give me 7.1 channels for TrueHD, so I'm not sure what's happening. Maybe TrueHD is already fully supported by FFmpeg (and therefore most of the players).

ADM BWF timing issues

The ramps are read incorrectly, transitions should happen at the end of the timeslots, not at their beginning.

X.X.2 front layout handling

5.1.2, 7.1.2, and 9.1.2 front render targets should be rendered as such that only front objects are elevated. This can be achieved by rendering 4 overheads and mixing the rear channels of both sides together.

Incorrect Channel Mapping

When decoding some files like the Dolby Nature's Fury trailer, the output channels are incorrectly mapped.
e.x. the dialogue comes out of the left speaker.

On other files the output is correct i.e channels are in the correct order (L R C LFE SL SR...)

  • master branch

Problem with the reference levels of the Dolby tests

Hello,
Thanks for your application.

When decoding the Dolby reference file :
https://download.dolby.com/us/en/test-tones/dolby-test-tones_7_1_4.mp4
with Cavernize GUI to PCM interger with 7.1.4 Render target, the level of the 12 channels is not identical.
We obtain with an RMS measurement :
-21,34 dB; -21,35 dB; -21,35 dB; -16,47 dB; -23,91 dB; -23,92 dB; -24,03 dB; -24,04 dB; -18,25 dB; -18,25 dB; -18,26 dB; -18,25 dB

With the ADM conversion, we obtain identical reference levels, except for the LFE which is normal :
-16,21 dB; -21,35 dB; -21,35 dB; -21,35 dB; -21,26 dB; -21,26 dB;-21,02 dB;-21,03 dB;-21,28 dB;-21,27 dB;-21,28 dB;-21,32 dB

The difference in level is for the surround and top channels, the front channels have the right levels.

Thanks

Cavern Driver 1.5 no sound when playing E-AC-3 JOC file

I just discovered this project and got curious, so I rummaged through my content and found an E-AC-3 JOC file to use as a quick test. Here's a 10-second sample of the file: E-AC-3 JOC test.zip

Cavern Driver 1.5 successfully opens the file and seems to show the objects as well as player controls:

image

But there is no sound, and all the levels read zero as shown in the screenshot.

The file plays fine in various other players (although to be clear, the other players I tried it with only support the base E-AC-3 layer).

Is this expected? I was under the impression that Cavern Driver could be used to play such files?

Here's what MediaInfo has to say about the file:

General
Complete name             : Y:\tmp\E-AC-3 JOC test.mkv
Format                    : Matroska
Format version            : Version 4
File size                 : 942 KiB
Duration                  : 10 s 27 ms
Overall bit rate mode     : Constant
Overall bit rate          : 770 kb/s
Writing application       : Lavf59.27.100
Writing library           : Lavf59.27.100
ErrorDetectionType        : Per level 1

Audio
ID                        : 1
Format                    : E-AC-3 JOC
Format/Info               : Enhanced AC-3 with Joint Object Coding
Commercial name           : Dolby Digital Plus with Dolby Atmos
Format settings           : Big
Codec ID                  : A_EAC3
Duration                  : 10 s 27 ms
Bit rate mode             : Constant
Bit rate                  : 768 kb/s
Channel(s)                : 6 channels
Channel layout            : L R C LFE Ls Rs
Sampling rate             : 48.0 kHz
Frame rate                : 31.250 FPS (1536 SPF)
Bit depth                 : 32 bits
Compression mode          : Lossy
Stream size               : 454 MiB
Language                  : English
Default                   : Yes
Forced                    : No
Complexity index          : 16
Number of dynamic objects : 15
Bed channel count         : 1 channel
Bed channel configuration : LFE

Buffered reading

Keep a larger buffer in memory for each stream - maybe with a descendant of BlockBuffer.

Streaming instead of converting?

Hello, thank you for your hard work to make such a brilliant application. To be able to decode/render dolby atmos video and output to PCM channel using exists 7.1 audio card is great, but i wonder would it be better if we can make this as a codec or something and use it for streaming atmos audio/video without having to convert it or passthrough an avr to be able to have height channels? Im very interested in making it happens, but i dont know how to do it.

always output 16bit wav

Is it possible to output 24bit wav or 32bit wav by the following modify?
writer = new RIFFWaveWriter(exportName, activeRenderTarget.Channels,
target.Length, listener.SampleRate, BitDepth.Int24);//wj2 Int16);
} else {
writer = AudioWriter.Create(exportName, activeRenderTarget.Channels.Length,
target.Length, listener.SampleRate, BitDepth.Int24);//wj2 Int16);
图片

Output filters

Allow filtering of individual output channels, like burning QuickEQ results into files for AVR playback. Should be optimized by caching output samples up to the FFT size which also helps with write performance.

Surround upmixing for Cavernize GUI

Add the Cavernize filter to Cavernize GUI as an option and remove the legacy Cavernize for FFmpeg source code as it's both deprecated and deceptive. Should be an option in the Rendering menu when content up to 7.1 is loaded without objects. Needs a complete rewrite of SurroundUpmixer - maybe include the heights created by the Cavernize filter.

Support binaural for Cavernize's Render target

With an ADM BWF file, it is possible to output binaural audio through DaVinci Resolve.
For the EAC3-JOC demo content provided directly by Dolby, the ADM BWF file works successfully. On the other hand I've tried creating ADM BWF files for several streaming Atmos content that provides EAC3-JOC, but all of them don't work for DaVinci Resolve.
failed

So I am writing this post. Can I expect something like this?
feature requeset

and it would be nice if .eac3 was added to the supported extension.
feature requeset2

Cavern Driver App won't stop rotating the room

Hi there,

I found about this project today and I find it very interesting.
I've been looking for some sort of PC based Dolby Atmos decoder as such was giving it a try.

However, while trying to explore the Cavern app, I found it very difficult to do so, as the room won't freaking stop rotating, making it almost impossible to place any object.

Would it be possible to add an option to stop the room rotating or is it a bug?

Thanks.

The sound of activating and listening to the headphone virtualizer sounds very strange.

Hello, I am an end user who loves Spatial Audio. I enjoy listening to Dolby Atmos or Sony 360 reality audio with my headphones.

I used the very interesting tool you made for the first time today. In your demonstration video, Core Universe's Dolby Atmos sound was fantastic to hear on headphones : https://youtu.be/sZCfmISQdHU

So I've been following you. I downloaded Core Universe(https://thedigitaltheater.com/dolby-trailers/), converted it to mkv using mkvtoolnix, and played it through Cavern.

However, it was very different from the sound I heard through your video. This is the sound I heard through Cavern. (I recorded the output using Audacity.)
https://drive.google.com/file/d/1bJ3tBC3CFs7hgcpd0ROdNI3x9Tpx5WXr/view?usp=sharing

So I was able to activate an option called Headphone Virtualizer, which sounds a lot more strange.
https://drive.google.com/file/d/1dwxo11LPJjwAGxcO0P8ezT_v1kAVf0Iy/view?usp=sharing

How did you set this video when you demonstrated it?

Implement AHT for AC-3

Streaming content started using AHT, which is not yet supported in Cavern. An example is Werewolf by Night.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.