Git Product home page Git Product logo

Comments (23)

starchivore avatar starchivore commented on June 9, 2024 1

If I weren't mistaken, @mitzsch should have mentioned some like that?

#13794

In other words, not sure if his fork were considered a workaround or not?

https://github.com/mitzsch/mpv-winbuild/releases
https://forums.plex.tv/t/dolby-truehd-passthrough-modified-mpv-build/802742

BTW, supposedly Dolby TrueHD should have multiple flavors and therefore just wondering if only object-based Atmos tracks were affected?

https://www.reddit.com/r/hometheater/comments/zh8ufk/512_setup_dolby_truehd_vs_dolby_atmos_which_one/

Or more like both channel-based and object-based formats are actually behaving the same way?

from mpv.

ruihe774 avatar ruihe774 commented on June 9, 2024 1

https://forum.doom9.org/showthread.php?p=1817199#post1817199

Is it possible to make your version of mpv-support video/audio directshow filters?

https://forum.doom9.org/showthread.php?p=1817207#post1817207

mpv probably won't support dshow, for some time I thought about having two playback engines, like dshow and libmpv, it could be done and might make sense but only if you have a lot time and interest, in StaxRip normally I try to support different encoders, it supports both avisynth and vapoursynth equally well and I'm very happy with the decision to support vapoursynth. Doing a player with two playback engines is much more difficult I think and most players don't get it right even with only one. I don't have enough time and interest for both so I decided to focus on one and make the best out of it.

LAV filters are obviously directshow filters and therefore we could only borrow the implementation, pretty much like what Kodi was doing to deal with TrueHD (i.e. Metadata-enhanced Audio Transmission or MAT) passthrough:

Metadata-enhanced Audio Transmission https://avproedge.com/blogs/news/a-deep-dive-into-dolby-mat

Possible new Seamless branching Issues https://forum.makemkv.com/forum/viewtopic.php?f=6&t=33890

TrueHD Atmos Dropouts/Cutouts on Kodi 20.5 (assuming only seamless branched sources) #24944 xbmc/xbmc#24944

[Audio] TrueHD rework - totally new MAT packer implementation #24984 xbmc/xbmc#24984

Based on LAVFilters: https://github.com/Nevcairiel/LAVFilters/blob/master/decoder/LAVAudio/BitstreamMAT.cpp
with some optimizations.

Release Audio Passthrough IEC - TrueHD fix/workaround - Testing build https://forum.kodi.tv/showthread.php?tid=371292

Bug TrueHD Atmos Dropouts/Cutouts on Kodi 20.5 (assuming only seamless branched sources) https://forum.kodi.tv/showthread.php?tid=376726

TrueHD passthrough Test Builds - New MAT Packer implementation https://forum.kodi.tv/showthread.php?tid=377117

While current MAT packer for TrueHD works really very well, I have found some rare cases (0.1%) that may produce non-compliant bitstream, especially related to seamless branching Blu-Ray sources (or resultant MKVs remuxes).
The new implementation is based on LAVFilters implementation with some optimizations and small changes. Then is totally different from current FFmpeg based implementation...

Hopefully we'll find a way to get that implemented and see how it goes, many thanks.

Thank you for listing relevant materials. They really cast light on THD Atmos passthru.

Nevertheless, mpv depend solely on ffmpeg for audio stream parsing and demuxing. If the upstream does not have support on it, there is little we can do in mpv at this time. In theory, it is possible to implement a specialized parser & demuxer in audio/decode/ for these proprietary codecs; but it requires considerable effort.

from mpv.

jeeb avatar jeeb commented on June 9, 2024

Short answer: no

It'd help to know how LAV supposedly would be handling this better in technical manner given that passthrough would be actual bit stream instead of decoded results, it sounds really weird if stereo channels can get flipped. LAV is also based on its own fork of FFmpeg for reading the content, not sure if it has its own SPDIF writer or it utilizes the one from its FFmpeg.

from mpv.

ruihe774 avatar ruihe774 commented on June 9, 2024

Can ffmpeg decodes Dolby Atmos? I don't think so. IIRC ffmpeg can only decode Dolby Digital Plus. Dolby Atmos can be decoded by Dolby Digital Plus compatible decoders but some info will be lost (e.g. 7.1 -> 5.1). If you need to play Dolby Atmos as is you may need SPDIF passthru.

If there is issue decoding Dolby Atmos with ffmpeg's Dolby Digital Plus decoder you may report it to ffmpeg, IMO.

from mpv.

netExtra avatar netExtra commented on June 9, 2024

Can ffmpeg decodes Dolby Atmos?

I'm talking about passthrough. Which as @jeeb pointed out is why this is a weird issue. But it is very repeatable.

from mpv.

kasper93 avatar kasper93 commented on June 9, 2024

There might be multiple reasons for flaky behavior like that and at the same time impossible for us to diagnose remotely. You need to compare stream parameters and possibly data that goes out of mpv and LAV. Both project are opensource so it should be easy to debug.

from mpv.

ruihe774 avatar ruihe774 commented on June 9, 2024

BTW can you provide your log file?

from mpv.

netExtra avatar netExtra commented on June 9, 2024

BTW can you provide your log file?

I didn't bother because I know this is likely to be more of an ffmpeg issue. Also logs are set to debug mode but I didn't see anything about individual channels. Just stuff about the stream opening, pausing, resetting and eventually closing.

from mpv.

ruihe774 avatar ruihe774 commented on June 9, 2024

BTW can you provide your log file?

I didn't bother because I know this is likely to be more of an ffmpeg issue. Also logs are set to debug mode but I didn't see anything about individual channels. Just stuff about the stream opening, pausing, resetting and eventually closing.

I want to know whether WASAPI SPDIF passthru is working properly. If you are assured that it is a issue of ffmpeg, you can report it to the upstream.

from mpv.

netExtra avatar netExtra commented on June 9, 2024

BTW can you provide your log file?

I didn't bother because I know this is likely to be more of an ffmpeg issue. Also logs are set to debug mode but I didn't see anything about individual channels. Just stuff about the stream opening, pausing, resetting and eventually closing.

I want to know whether WASAPI SPDIF passthru is working properly. If you are assured that it is a issue of ffmpeg, you can report it to the upstream.

Hi
@ruihe774
It's not the right channel that goes to the left. It's the surround rear channels end up in the surround left.
The logs attached below record me playing the file and rewinding. After the error occurs I stop the file.

mpv.log

Thanks

from mpv.

ruihe774 avatar ruihe774 commented on June 9, 2024

The logs attached below record me playing the file and rewinding. After the error occurs I stop the file.
mpv.log

SPDIF activated properly. Looks like an issue of ffmpeg.

BTW it'd better say "Dolby Atmos with TrueHD". It's quite different from Dolby Atmos with E-AC-3.

LAV Filters have special handling with TrueHD. (You can find it in its changelog.) Maybe this is the cause of different behaviors.

from mpv.

netExtra avatar netExtra commented on June 9, 2024

The logs attached below record me playing the file and rewinding. After the error occurs I stop the file.
mpv.log

SPDIF activated properly. Looks like an issue of ffmpeg.

BTW it'd better say "Dolby Atmos with TrueHD". It's quite different from Dolby Atmos with E-AC-3.

LAV Filters have special handling with TrueHD. (You can find it in its changelog.) Maybe this is the cause of different behaviors.

I'm using a version of ffmpeg with a fix which fixes a previous "fix" which actually broke THD Atmos. I had the same issue with the previous broken ffmpeg version as well. Since the the broken ffmpeg hasn't been fixed for some time I don't hold out much hope for an issue as flakey as this. But thanks anyway :)

from mpv.

netExtra avatar netExtra commented on June 9, 2024

If I weren't mistaken, @mitzsch should have mentioned some like that?

#13794

In other words, not sure if his fork were considered a workaround or not?

https://github.com/mitzsch/mpv-winbuild/releases https://forums.plex.tv/t/dolby-truehd-passthrough-modified-mpv-build/802742

BTW, supposedly Dolby TrueHD should have multiple flavors and therefore just wondering if only object-based Atmos tracks were affected?

https://www.reddit.com/r/hometheater/comments/zh8ufk/512_setup_dolby_truehd_vs_dolby_atmos_which_one/

Or more like both channel-based and object-based formats are actually behaving the same way?

Atmos is by definition object based. There's are two types of Atmos. When I stated Atmos in the heading I was asked to clarify which type of Atmos. This is about THD Atmos but thinking about it, it probably also applies to THD. The @mitzsch fork fixes the broken THD ffmpeg code and I am already using it. But this is a different issue which I think has been around since before the fix. But it might be worth confirming.

from mpv.

starchivore avatar starchivore commented on June 9, 2024

https://forum.doom9.org/showthread.php?p=1817199#post1817199

Is it possible to make your version of mpv-support video/audio directshow filters?

https://forum.doom9.org/showthread.php?p=1817207#post1817207

mpv probably won't support dshow, for some time I thought about having two playback engines, like dshow and libmpv, it could be done and might make sense but only if you have a lot time and interest, in StaxRip normally I try to support different encoders, it supports both avisynth and vapoursynth equally well and I'm very happy with the decision to support vapoursynth. Doing a player with two playback engines is much more difficult I think and most players don't get it right even with only one. I don't have enough time and interest for both so I decided to focus on one and make the best out of it.

LAV filters are obviously directshow filters and therefore we could only borrow the implementation, pretty much like what Kodi was doing to deal with TrueHD (i.e. Metadata-enhanced Audio Transmission or MAT) passthrough:

Metadata-enhanced Audio Transmission
https://avproedge.com/blogs/news/a-deep-dive-into-dolby-mat

Possible new Seamless branching Issues
https://forum.makemkv.com/forum/viewtopic.php?f=6&t=33890

TrueHD Atmos Dropouts/Cutouts on Kodi 20.5 (assuming only seamless branched sources) #24944
xbmc/xbmc#24944

[Audio] TrueHD rework - totally new MAT packer implementation #24984
xbmc/xbmc#24984

Based on LAVFilters: https://github.com/Nevcairiel/LAVFilters/blob/master/decoder/LAVAudio/BitstreamMAT.cpp
with some optimizations.

Release Audio Passthrough IEC - TrueHD fix/workaround - Testing build
https://forum.kodi.tv/showthread.php?tid=371292

Bug TrueHD Atmos Dropouts/Cutouts on Kodi 20.5 (assuming only seamless branched sources)
https://forum.kodi.tv/showthread.php?tid=376726

TrueHD passthrough Test Builds - New MAT Packer implementation
https://forum.kodi.tv/showthread.php?tid=377117

While current MAT packer for TrueHD works really very well, I have found some rare cases (0.1%) that may produce non-compliant bitstream, especially related to seamless branching Blu-Ray sources (or resultant MKVs remuxes).

The new implementation is based on LAVFilters implementation with some optimizations and small changes. Then is totally different from current FFmpeg based implementation...

Hopefully we'll find a way to get that implemented and see how it goes, many thanks.

from mpv.

netExtra avatar netExtra commented on June 9, 2024

Well there is already a fix that works > 99% of the time for THD passthrough cutouts. I do not know why it has never been incorporated into the main ffmpeg code base. The New MAT Packer implementation reminds me of the ffmpeg "fix" which broke THD which is weird.

from mpv.

netExtra avatar netExtra commented on June 9, 2024

As for my issue, after some additional testing, it seems to be much harder to replicated in exclusive mode. I tend not to use E mode because can cause sound config issues with other non exclusive devices. But I understand a little more than I did the last time I tried it so it should be OK.

from mpv.

zhouxinghong avatar zhouxinghong commented on June 9, 2024

👍

from mpv.

Related Issues (20)

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.