mpv icon indicating copy to clipboard operation
mpv copied to clipboard

DolbyE Audio Decoding in MPV (FFMpeg supports it)

Open FranceBB opened this issue 3 years ago • 6 comments

It would be cool if MPV supported DolbyE audio decoding on the fly instead of hearing just noise.

Expected behavior of the wanted feature

Once playing an mxf file with DolbyE 5.1 tracks, MPV should be able to recognize them and decode them. The decoding is already supported in FFMpeg.

Actual behavior of MPV

Audio is decoded as noise which might damage hardware.

How to reproduce

Step 1: Download the sample file from here: https://we.tl/t-R8dRX8gIzT Step 2: Play it in MPV Step 3: Hear the noise on the first track and on the second track

Audio Layout of the Sample:

The sample has the following audio layout: Track 1: DolbyE 5.1 + 2.0 Stereo Downmix Italian Track 2: DolbyE 5.1 + 2.0 Stereo Downmix English Track 3: PCM S24LE 2.0 Stereo Downmix Italian (you can listen to this one just fine) Track 4: PCM S24LE 2.0 Stereo Downmix English (you can listen to this one just fine)

Mediainfo

General
Complete name                            : \\mibctvan000\Ingest\MEDIA\temp\DolbyE.mxf
Format                                   : MXF
Commercial name                          : XDCAM HD422
Format version                           : 1.3
Format profile                           : OP-1a
Format settings                          : Open / Incomplete
File size                                : 872 MiB
Duration                                 : 1 min 2 s
Overall bit rate                         : 116 Mb/s
Encoded date                             : 2021-10-25 12:27:15.452
Writing application                      : Omneon Inc. Omneon Media Subsystem 8.2.0.0.1
Writing library                          : Omneon Media Api (windows)

Video
ID                                       : 2
Format                                   : MPEG Video
Commercial name                          : XDCAM HD422
Format version                           : Version 2
Format profile                           : 4:2:2@High
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : M=3, N=12
Format settings, picture structure       : Frame
Format settings, wrapping mode           : Frame
Codec ID                                 : 0D01030102046101-0401020201040300
Duration                                 : 1 min 2 s
Bit rate mode                            : Constant
Bit rate                                 : 50.0 Mb/s
Width                                    : 1 920 pixels
Clean aperture width                     : 1 571 pixels / 1 571 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 FPS
Standard                                 : Component
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.965
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Closed
Stream size                              : 375 MiB (43%)
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio #1
ID                                       : 3-1
Format                                   : Dolby E
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Muxing mode                              : SMPTE ST 337
Codec ID                                 : 0D01030102060100-0402020203021C00
Duration                                 : 1 min 2 s
Bit rate mode                            : Constant
Bit rate                                 : 1 291 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L C Ls X R LFE Rs X
Sampling rate                            : 48.0 kHz
Frame rate                               : 25.000 FPS (1920 SPF)
Bit depth                                : 20 bits
Delay relative to video                  : -9 h 59 min
Stream size                              : 9.67 MiB (1%)
Title                                    : Program_1
Locked                                   : Yes

Audio #2
ID                                       : 3-2
Format                                   : Dolby E
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Muxing mode                              : SMPTE ST 337
Codec ID                                 : 0D01030102060100-0402020203021C00
Duration                                 : 1 min 2 s
Bit rate mode                            : Constant
Bit rate                                 : 505 kb/s
Channel(s)                               : 2 channels
Channel layout                           : X X X L X X X R
Sampling rate                            : 48.0 kHz
Frame rate                               : 25.000 FPS (1920 SPF)
Bit depth                                : 20 bits
Delay relative to video                  : -9 h 59 min
Stream size                              : 3.78 MiB (0%)
Title                                    : Program_2
Locked                                   : Yes

Audio #3
ID                                       : 5-1
Format                                   : Dolby E
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Muxing mode                              : SMPTE ST 337
Codec ID                                 : 0D01030102060100-0402020203021C00
Duration                                 : 1 min 2 s
Bit rate mode                            : Constant
Bit rate                                 : 1 291 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L C Ls X R LFE Rs X
Sampling rate                            : 48.0 kHz
Frame rate                               : 25.000 FPS (1920 SPF)
Bit depth                                : 20 bits
Delay relative to video                  : -9 h 59 min
Stream size                              : 9.67 MiB (1%)
Title                                    : Program_1
Locked                                   : Yes

Audio #4
ID                                       : 5-2
Format                                   : Dolby E
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Muxing mode                              : SMPTE ST 337
Codec ID                                 : 0D01030102060100-0402020203021C00
Duration                                 : 1 min 2 s
Bit rate mode                            : Constant
Bit rate                                 : 505 kb/s
Channel(s)                               : 2 channels
Channel layout                           : X X X L X X X R
Sampling rate                            : 48.0 kHz
Frame rate                               : 25.000 FPS (1920 SPF)
Bit depth                                : 20 bits
Delay relative to video                  : -9 h 59 min
Stream size                              : 3.78 MiB (0%)
Title                                    : Program_2
Locked                                   : Yes

Audio #5
ID                                       : 6
Format                                   : PCM
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Codec ID                                 : 0D01030102060100
Duration                                 : 1 min 2 s
Bit rate mode                            : Constant
Bit rate                                 : 2 304 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 25.000 FPS (1920 SPF)
Bit depth                                : 24 bits
Stream size                              : 17.3 MiB (2%)
Locked                                   : Yes

Audio #6
ID                                       : 7
Format                                   : PCM
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Codec ID                                 : 0D01030102060100
Duration                                 : 1 min 2 s
Bit rate mode                            : Constant
Bit rate                                 : 2 304 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 25.000 FPS (1920 SPF)
Bit depth                                : 24 bits
Stream size                              : 17.3 MiB (2%)
Locked                                   : Yes

Text
ID                                       : 8-777
Format                                   : Teletext Subtitle
Muxing mode                              : Ancillary data / OP-47 / SDP
Duration                                 : 1 min 2 s

Other #1
ID                                       : 1-Material
Type                                     : Time code
Format                                   : MXF TC
Frame rate                               : 25.000 FPS
Time code of first frame                 : 10:00:00:00
Time code settings                       : Material Package
Time code, striped                       : Yes

Other #2
ID                                       : 1-Source
Type                                     : Time code
Format                                   : MXF TC
Frame rate                               : 25.000 FPS
Time code of first frame                 : 10:00:00:00
Time code settings                       : Source Package
Time code, striped                       : Yes

Other #3
ID                                       : System scheme 1-1-0
Muxing mode                              : System scheme 1


How to decode DolbyE 5.1 with FFMpeg

@echo off 
setlocal EnableDelayedExpansion

cd /d %~dp0


for %%a in (%*) do  (
   call :inizia %%a
   shift
)
exit

:inizia

ffmpeg.exe  -i %1  -map 0:1 -acodec copy  -f u8 -y stream1.u8
ffmpeg.exe  -i %1  -map 0:2 -acodec copy  -f u8 -y stream2.u8
ffmpeg.exe  -i stream1.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.0:0.0.0 -y out1.wav
ffmpeg.exe  -i stream1.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.1:0.0.0 -y out2.wav
ffmpeg.exe  -i stream1.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.2:0.0.0 -y out3.wav
ffmpeg.exe  -i stream1.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.3:0.0.0 -y out4.wav
ffmpeg.exe  -i stream1.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.4:0.0.0 -y out5.wav
ffmpeg.exe  -i stream1.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.5:0.0.0 -y out6.wav
ffmpeg.exe  -i stream1.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.6:0.0.0 -y out7.wav
ffmpeg.exe  -i stream1.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.7:0.0.8 -y out8.wav
ffmpeg.exe  -i stream2.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.0:0.0.0 -y out9.wav
ffmpeg.exe  -i stream2.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.1:0.0.0 -y out10.wav
ffmpeg.exe  -i stream2.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.2:0.0.0 -y out11.wav
ffmpeg.exe  -i stream2.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.3:0.0.0 -y out12.wav
ffmpeg.exe  -i stream2.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.4:0.0.0 -y out13.wav
ffmpeg.exe  -i stream2.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.5:0.0.0 -y out14.wav
ffmpeg.exe  -i stream2.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.6:0.0.0 -y out15.wav
ffmpeg.exe  -i stream2.u8 -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.7:0.0.8 -y out16.wav



pause


:eof

FranceBB avatar Oct 25 '21 12:10 FranceBB

It's would be an awesome feauture to develop.

alojal61 avatar Oct 25 '21 13:10 alojal61

Here's another sample:

https://user-images.githubusercontent.com/18946343/140714716-a851a758-7057-4f45-b553-19d075f97d8c.mov

(unfortunately it's just 1 second 'cause GitHub is picky about 10 MB max file size)

FranceBB avatar Nov 08 '21 09:11 FranceBB

And another one

https://user-images.githubusercontent.com/18946343/140722468-0d7512fd-4163-4195-b01e-f72b897ad186.mov

FranceBB avatar Nov 08 '21 10:11 FranceBB

New additional sample

Link (Valid for 7 days): https://we.tl/t-yZtNeCjRSh

General
Complete name                            : \\mibctvan000.avid.mi.bc.sky.it\Ingest\MEDIA\temp\trim.mxf
Format                                   : MXF
Format version                           : 1.3
Format profile                           : OP-1a
Format settings                          : Closed / Complete
File size                                : 1.43 GiB
Duration                                 : 49 min 28 s
Overall bit rate                         : 4 145 kb/s
Encoded date                             : 2019-07-01 23:32:02.128
Writing application                      : Omneon Inc. Omneon Media Subsystem 8.3.0.0.1
Writing library                          : Omneon Media Api (windows)
IsTruncated                              : Yes

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:2:2 [email protected]
Format settings, CABAC                   : No
Format settings, GOP                     : N=1
Format settings, wrapping mode           : Frame
Codec ID                                 : 0D01030102106001-0401020201323001
Duration                                 : 49 min 28 s
Maximum bit rate                         : 500 Mb/s
Width                                    : 3 840 pixels
Clean aperture width                     : 148 423 pixels / 148 423 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 50.000 FPS
Standard                                 : Component
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 10 bits
Scan type                                : Progressive
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : HLG
Matrix coefficients                      : BT.2020 non-constant

Audio #1
ID                                       : 3-1
Format                                   : Dolby E
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Muxing mode                              : SMPTE ST 337
Codec ID                                 : 0D01030102060100-0402020203021C00
Duration                                 : 49 min 28 s
Bit rate mode                            : Constant
Bit rate                                 : 1 291 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L C Ls X R LFE Rs X
Sampling rate                            : 48.0 kHz
Frame rate                               : 50.000 FPS (960 SPF)
Bit depth                                : 20 bits
Delay relative to video                  : 40 ms
Stream size                              : 457 MiB (31%)
Original frame rate                      : 25.000
Locked                                   : Yes

Audio #2
ID                                       : 3-2
Format                                   : Dolby E
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Muxing mode                              : SMPTE ST 337
Codec ID                                 : 0D01030102060100-0402020203021C00
Duration                                 : 49 min 28 s
Bit rate mode                            : Constant
Bit rate                                 : 505 kb/s
Channel(s)                               : 2 channels
Channel layout                           : X X X L X X X R
Sampling rate                            : 48.0 kHz
Frame rate                               : 50.000 FPS (960 SPF)
Bit depth                                : 20 bits
Delay relative to video                  : 40 ms
Stream size                              : 179 MiB (12%)
Original frame rate                      : 25.000
Locked                                   : Yes

Audio #3
ID                                       : 4-1
Format                                   : Dolby E
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Muxing mode                              : SMPTE ST 337
Codec ID                                 : 0D01030102060100-0402020203021C00
Duration                                 : 49 min 28 s
Bit rate mode                            : Constant
Bit rate                                 : 1 291 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L C Ls X R LFE Rs X
Sampling rate                            : 48.0 kHz
Frame rate                               : 50.000 FPS (960 SPF)
Bit depth                                : 20 bits
Delay relative to video                  : 40 ms
Stream size                              : 457 MiB (31%)
Original frame rate                      : 25.000
Locked                                   : Yes

Audio #4
ID                                       : 4-2
Format                                   : Dolby E
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Muxing mode                              : SMPTE ST 337
Codec ID                                 : 0D01030102060100-0402020203021C00
Duration                                 : 49 min 28 s
Bit rate mode                            : Constant
Bit rate                                 : 505 kb/s
Channel(s)                               : 2 channels
Channel layout                           : X X X L X X X R
Sampling rate                            : 48.0 kHz
Frame rate                               : 50.000 FPS (960 SPF)
Bit depth                                : 20 bits
Delay relative to video                  : 40 ms
Stream size                              : 179 MiB (12%)
Original frame rate                      : 25.000
Locked                                   : Yes

Audio #5
ID                                       : 5
Format                                   : PCM
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Codec ID                                 : 0D01030102060100
Duration                                 : 49 min 28 s
Bit rate mode                            : Constant
Bit rate                                 : 2 304 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 50.000 FPS (960 SPF)
Bit depth                                : 24 bits
Stream size                              : 815 MiB (56%)
Locked                                   : Yes

Audio #6
ID                                       : 6
Format                                   : PCM
Format settings                          : Little
Format settings, wrapping mode           : Frame (BWF)
Codec ID                                 : 0D01030102060100
Duration                                 : 49 min 28 s
Bit rate mode                            : Constant
Bit rate                                 : 2 304 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 50.000 FPS (960 SPF)
Bit depth                                : 24 bits
Stream size                              : 815 MiB (56%)
Locked                                   : Yes

Text #1
ID                                       : 7-777
Format                                   : Teletext Subtitle
Muxing mode                              : Ancillary data / OP-47 / SDP
Duration                                 : 49 min 28 s

Text #2
ID                                       : 7-778
Format                                   : Teletext Subtitle
Muxing mode                              : Ancillary data / OP-47 / SDP
Duration                                 : 49 min 28 s

Other #1
ID                                       : 1-Material
Type                                     : Time code
Format                                   : MXF TC
Frame rate                               : 50.000 FPS
Time code of first frame                 : 10:00:00:00
Time code settings                       : Material Package
Time code, striped                       : Yes

Other #2
ID                                       : 1-Source
Type                                     : Time code
Format                                   : MXF TC
Frame rate                               : 50.000 FPS
Time code of first frame                 : 00:00:00:00
Time code settings                       : Source Package
Time code, striped                       : Yes

Other #3
Type                                     : Time code
Format                                   : SMPTE TC
Muxing mode                              : System scheme 1
Time code of first frame                 : 00:00:00:00

FranceBB avatar Dec 08 '21 13:12 FranceBB

I second this, cause incompatibility is weakness.

theassemblerguy avatar Feb 14 '22 22:02 theassemblerguy

I'm bumping this only to say that the actual layout of the attached sample.mov is: https://user-images.githubusercontent.com/18946343/140722468-0d7512fd-4163-4195-b01e-f72b897ad186.mov

Audio Layout of the Sample:

The sample has the following audio layout: Track 1: DolbyE 5.1 + 2.0 Stereo Downmix

Mediainfo

General
Complete name                            : /home/FranceBB/Downloads/DolbyE.mov
Format                                   : MPEG-4
Commercial name                          : XDCAM HD422
Format profile                           : QuickTime
Codec ID                                 : qt   0000.02 (qt  )
File size                                : 8.64 MiB
Duration                                 : 2 s 80 ms
Overall bit rate                         : 34.9 Mb/s
Writing application                      : Lavf59.5.100

Video
ID                                       : 1
Format                                   : MPEG Video
Commercial name                          : XDCAM HD422
Format version                           : Version 2
Format profile                           : 4:2:2@High
Format settings                          : BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Default
Format settings, GOP                     : M=3, N=12
Format settings, picture structure       : Frame
Codec ID                                 : xd5c
Duration                                 : 2 s 80 ms
Source duration                          : 2 s 40 ms
Bit rate mode                            : Constant
Bit rate                                 : 31.2 Mb/s
Maximum bit rate                         : 50.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan type, store method                  : Separated fields (2 fields per block)
Scan order                               : Top Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.601
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Closed
Stream size                              : 7.73 MiB (89%)
Source stream size                       : 8.09 MiB (94%)
mdhd_Duration                            : 2080
Codec configuration box                  : glbl

Audio #1
ID                                       : 2-1
Format                                   : Dolby E
Format settings                          : Little
Muxing mode                              : SMPTE ST 337
Codec ID                                 : in24
Duration                                 : 2 s 0 ms
Bit rate mode                            : Constant
Bit rate                                 : 1 291 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L C Ls X R LFE Rs X
Sampling rate                            : 48.0 kHz
Frame rate                               : 25.000 FPS (1920 SPF)
Bit depth                                : 20 bits
Stream size                              : 315 KiB (4%)
Title                                    : Sky_Italia_Program_1
Default                                  : Yes
Alternate group                          : 1

Audio #2
ID                                       : 2-2
Format                                   : Dolby E
Format settings                          : Little
Muxing mode                              : SMPTE ST 337
Codec ID                                 : in24
Duration                                 : 2 s 0 ms
Bit rate mode                            : Constant
Bit rate                                 : 505 kb/s
Channel(s)                               : 2 channels
Channel layout                           : X X X L X X X R
Sampling rate                            : 48.0 kHz
Frame rate                               : 25.000 FPS (1920 SPF)
Bit depth                                : 20 bits
Delay relative to video                  : -9 h 59 min
Stream size                              : 123 KiB (1%)
Title                                    : Sky_Italia_Program_2
Default                                  : Yes
Alternate group                          : 1

Other
ID                                       : 3
Type                                     : Time code
Format                                   : QuickTime TC
Duration                                 : 2 s 80 ms
Frame rate                               : 25.000 FPS
Time code of first frame                 : 10:00:00:00
Time code of last frame                  : 10:00:02:01
Time code, striped                       : Yes
Language                                 : English
Default                                  : No
mdhd_Duration                            : 2080




And obviously it's possible to create a 5.1 PCM as track 1 and a 2.0 Stereo as Track 2 like so:

    #Extract DolbyE track 1
    ffmpeg  -i "DolbyE.mov"  -map 0:1 -acodec copy -f u8 -y "stream1.u8"
    #Extract each channel of DolbyE 5.1
    ffmpeg  -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.0:0.0.0 -y "FL.wav"
    ffmpeg  -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.1:0.0.0 -y "FR.wav"
    ffmpeg  -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.2:0.0.0 -y "CC.wav"
    ffmpeg  -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.3:0.0.0 -y "LFE.wav"
    ffmpeg  -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.4:0.0.0 -y "SL.wav"
    ffmpeg  -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.5:0.0.0 -y "SR.wav"
    #Extract each channel of DolbyE 2.0
    ffmpeg  -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.6:0.0.0 -y $jobOutputFolder:Left.wav
    ffmpeg  -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.7:0.0.0 -y $jobOutputFolder:Right.wav
    #Audio 5.1
    ffmpeg -i "FL.wav" -i "FR.wav" -i "CC.wav" -i "LFE.wav" -i "SL.wav" -i "SR.wav" -filter_complex "[0:a][1:a][2:a][3:a][4:a][5:a]join=inputs=6:channel_layout=5.1:map=0.0-FL|1.0-FR|2.0-FC|3.0-LFE|4.0-BL|5.0-BR[a]" -map "[a]" -c:a pcm_s24le -ar 48000 -f wav -y "Track1_51.wav"
    #Audio 2.0
    ffmpeg -i "Left.wav" -i "Right.wav" -filter_complex "[0:a][1:a]join=inputs=2:channel_layout=stereo[a]" -map "[a]" -c:a pcm_s24le -ar 48000 -f wav -y "Track2_20.wav"

So I strongly believe this should be done inside MPV itself...

FranceBB avatar Aug 08 '22 13:08 FranceBB

Here's another sample with audio only called DolbyE_51_20.wav (attachment is zipped .zip) DolbyE_51_20.zip

FranceBB avatar Oct 02 '22 00:10 FranceBB

DolbyE_51_20_remuxed_to_u8.zip About the sample above, while it's muxed as .wav it's being decoded as noise by MPV, however, once it's remuxed to .u8 with

ffmpeg -i "DolbyE_51_20.wav" -c:a copy -f u8 -y "DolbyE_51_20.u8"

MPV recognizes it and decodes it (although it thinks it's a 7.1 instead of a 5.1 + 2.0 downmix)

See, here it's wrongly detected as PCM Stereo 48000Hz while it's muxed as .wav:

image

but here it's correctly detected as DolbyE 44800Hz while it's extracted as .u8 (although it thinks it's a 2299 kbit/s 7.1 while it's actually a 1291 kbit/s 5.1 and a 505 kbit/s 2.0 downmix):

image

FranceBB avatar Feb 24 '23 23:02 FranceBB