[FFmpeg-trac] #9479(undetermined:new): DolbyE not recognized in mxf container

FFmpeg trac at avcodec.org
Wed Oct 27 17:41:46 EEST 2021


#9479: DolbyE not recognized in mxf container
-------------------------------------+-------------------------------------
             Reporter:  FranceBB     |                    Owner:  (none)
                 Type:  enhancement  |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by FranceBB:

Old description:

> Summary of the bug: Dolby E tracks in an mxf container aren't recognized
> as such, but rather as pcm_s24le, 48000 Hz, 7.1, s32 (24 bit), 9216 kb/s,
> which is wrong.
>
> How to reproduce:
> {{{
> % ffmpeg -i "DolbyE.mxf"-acodec pcm_s24le -ar 48000 -ac 1 -y "out1.wav"
>
> ffmpeg version r103791+10 master-447cf53774
> built on Sep 23 2021 03:17:02 with gcc 11.1.0 (GCC)
> }}}
>
> Sample File: https://we.tl/t-R8dRX8gIzT
>
> Step 1: Download the sample file from here: https://we.tl/t-R8dRX8gIzT
> Step 2: use ffprobe to check the file
> Step 3: it's detected as 7.1 pcm instead of DolbyE 5.1 + 2.0
>

> {{{
> ffprobe.exe -show_format -show_streams -i
> "\\mibctvan000\Ingest\MEDIA\temp\DolbyE.mxf"
>
> pause
> }}}
>
> shows:
>
> [[Image(https://i.imgur.com/pN4rac0.png)]]
>
> but the sample channel layout actually is:
>
> Track 1: DolbyE 5.1 + 2.0 Stereo Downmix
> Track 2: DolbyE 5.1 + 2.0 Stereo Downmix
> Track 3: PCM S24LE 2.0 Stereo Downmix
> Track 4: PCM S24LE 2.0 Stereo Downmix
>
> 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 at 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
> }}}
>

> Therefore it's clear that ffmpeg has a problem supporting the mxf
> container because Dolby E tracks aren't recognized:
>

>
> {{{
> C:\tmp\DolbyE.mxf streams:
>
> 0: mpeg2video (4:2:2), yuv422p(tv, bt709, top first), 1920x1080 [SAR 1:1
> DAR 16 :9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn
> 1: pcm_s24le, 48000 Hz, 7.1, s32 (24 bit), 9216 kb/s -> must be dolby_e,
> 44800 Hz, 7.1, fltp
> 2: pcm_s24le, 48000 Hz, 7.1, s32 (24 bit), 9216 kb/s -> must be dolby_e,
> 44800 Hz, 7.1, fltp
> 3: pcm_s24le, 48000 Hz, stereo, s32 (24 bit), 2304 kb/s
> 4: pcm_s24le, 48000 Hz, stereo, s32 (24 bit), 2304 kb/s
> }}}
>
> With the workaround of extracting the tracks as pcm unsigned 8 bits (u8
> format):
>

> {{{
> ffmpeg.exe -i DolbyE.mxf -map 0:1 -acodec copy -f u8 stream1.u8
> ffmpeg.exe -i DolbyE.mxf -map 0:2 -acodec copy -f u8 stream2.u8
> }}}
>
> the extracted stream1.u8 and stream2.u8 are now recognized as Dolby E:
>

> {{{
> C:\tmp\stream1.u8 streams:
>
> 0: dolby_e, 44800 Hz, 7.1, fltp
> }}}
>
> ffmpeg should improve the mxf support to recognize Dolby E tracks and be
> capable to decode tracks with something like:
>

> {{{
> ffmpeg.exe -i DolbyE.mxf -map 0:1 -acodec pcm_s24le -ar 48000 -y
> "output.wav"
> }}}
>

> One more thing, even by decoding to u8, ffmpeg still sees the DolbyE as
> 7.1 rather than 5.1 + 2.0:
>

> {{{
> -------------- Media Info
> Audio #1
> ID              : 3-1
> Format          : Dolby E
> Channel(s)      : 6 channels
> Channel layout  : L C Ls X R LFE Rs X
> Title           : Program_1
>
> Audio #2
> ID              : 3-2
> Format          : Dolby E
> Channel(s)      : 2 channels
> Channel layout  : X X X L X X X R
> Title           : Program_2
> }}}
>
> When ffmpeg decodes the stream1.u8 audio, it shows:
>

> {{{
> [dolby_e @ 0000022094688b80] Stream has 2 programs (configuration 0),
> channels will be output in native order.
> }}}
>
> We need to be able to select the Program!
>
> ffmpeg should let the user choose the Program in audio streams. Maybe
> with something like:
>

> {{{
> -map 0:1:p:1
> }}}
>

> Currently, the only workaround is doing something like this:
>

> {{{
> @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
> }}}
>

> which is far from ideal.
> Please improve support for DolbyE detection and decoding without relying
> to the .u8 workaround.

New description:

 Summary of the bug: Dolby E tracks in an mxf container aren't recognized
 as such, but rather as pcm_s24le, 48000 Hz, 7.1, s32 (24 bit), 9216 kb/s,
 which is wrong.

 How to reproduce:
 {{{
 % ffmpeg -i "DolbyE.mxf"-acodec pcm_s24le -ar 48000 -ac 1 -y "out1.wav"

 ffmpeg version r103791+10 master-447cf53774
 built on Sep 23 2021 03:17:02 with gcc 11.1.0 (GCC)
 }}}

 Sample File: https://we.tl/t-R8dRX8gIzT

 Step 1: Download the sample file from here: https://we.tl/t-R8dRX8gIzT
 Step 2: use ffprobe to check the file
 Step 3: it's detected as 7.1 pcm instead of DolbyE 5.1 + 2.0


 {{{
 ffprobe.exe -show_format -show_streams -i
 "\\mibctvan000\Ingest\MEDIA\temp\DolbyE.mxf"

 pause
 }}}

 shows:

 [[Image(https://i.imgur.com/pN4rac0.png)]]

 but the sample channel layout actually is:

 Track 1: DolbyE 5.1 + 2.0 Stereo Downmix
 Track 2: DolbyE 5.1 + 2.0 Stereo Downmix
 Track 3: PCM S24LE 2.0 Stereo Downmix
 Track 4: PCM S24LE 2.0 Stereo Downmix

 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 at 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
 }}}


 Therefore it's clear that ffmpeg has a problem supporting the mxf
 container because Dolby E tracks aren't recognized:



 {{{
 C:\tmp\DolbyE.mxf streams:

 0: mpeg2video (4:2:2), yuv422p(tv, bt709, top first), 1920x1080 [SAR 1:1
 DAR 16 :9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn
 1: pcm_s24le, 48000 Hz, 7.1, s32 (24 bit), 9216 kb/s -> must be dolby_e,
 44800 Hz, 7.1, fltp
 2: pcm_s24le, 48000 Hz, 7.1, s32 (24 bit), 9216 kb/s -> must be dolby_e,
 44800 Hz, 7.1, fltp
 3: pcm_s24le, 48000 Hz, stereo, s32 (24 bit), 2304 kb/s
 4: pcm_s24le, 48000 Hz, stereo, s32 (24 bit), 2304 kb/s
 }}}

 With the workaround of extracting the tracks as pcm unsigned 8 bits (u8
 format):


 {{{
 ffmpeg.exe -i DolbyE.mxf -map 0:1 -acodec copy -f u8 stream1.u8
 ffmpeg.exe -i DolbyE.mxf -map 0:2 -acodec copy -f u8 stream2.u8
 }}}

 the extracted stream1.u8 and stream2.u8 are now recognized as Dolby E:


 {{{
 C:\tmp\stream1.u8 streams:

 0: dolby_e, 44800 Hz, 7.1, fltp
 }}}

 ffmpeg should improve the mxf support to recognize Dolby E tracks and be
 capable to decode tracks with something like:


 {{{
 ffmpeg.exe -i DolbyE.mxf -map 0:1 -acodec pcm_s24le -ar 48000 -y
 "output.wav"
 }}}


 One more thing, even by decoding to u8, ffmpeg still sees the DolbyE as
 7.1 rather than 5.1 + 2.0:


 {{{
 -------------- Media Info
 Audio #1
 ID              : 3-1
 Format          : Dolby E
 Channel(s)      : 6 channels
 Channel layout  : L C Ls X R LFE Rs X
 Title           : Program_1

 Audio #2
 ID              : 3-2
 Format          : Dolby E
 Channel(s)      : 2 channels
 Channel layout  : X X X L X X X R
 Title           : Program_2
 }}}

 When ffmpeg decodes the stream1.u8 audio, it shows:


 {{{
 [dolby_e @ 0000022094688b80] Stream has 2 programs (configuration 0),
 channels will be output in native order.
 }}}

 We need to be able to select the Program!

 ffmpeg should let the user choose the Program in audio streams. Maybe with
 something like:


 {{{
 -map 0:1:p:1
 }}}


 Currently, the only workaround is doing something like this:


 {{{
 @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
 }}}


 which is far from ideal.
 Please improve support for DolbyE detection and decoding without relying
 on the .u8 workaround.

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9479#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list