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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th October 2021, 11:11   #1  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,915
ffmpeg, container mxf and audio Dolby E

The feature request by FranceBB in BestAudioSource and L-SMASH Source seems a ffmpeg problem supporting the mxf container because Dolby E tracks aren't recognized:

Quote:
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 extract the tracks like pcm unsigned 8 bits (u8 format):
Quote:
ffmpeg.exe -i DolbyE.mxf -map 0:1 -acodec copy -f u8 stream1.u8
the extracted stream1.u8 is now recognized like Dolby E:

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

0: dolby_e, 44800 Hz, 7.1, fltp
1) ffmpeg must improve the mxf support to recognize Dolby E tracks and be capable to extract tracks with something like:

ffmpeg.exe -i DolbyE.mxf -map 0:1 -acodec copy -f dolby_e stream1.dbe

But there are other problem to be solved:
Seems the Dolby E is not a 7.1 but a 5.1 + 2.0 (downmix)
Code:
-------------- 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 decode the stream1.u8 audio show:
Quote:
[dolby_e @ 0000022094688b80] Stream has 2 programs (configuration 0), channels will be output in native order.
We need select the Program (also EAC3 files can have more than 1 Program)

2) ffmpeg must let select the Program in audio streams. Maybe with something like:

Code:
-map 0:1:p:1
The 7.1 output (the same with ffmpeg and FFAudioSource) is show in the attached image and seems the first 6 chanels are the 5.1 and the last the 2.0 downmix.
Then the workaound to obtain the 2 Programs is

Quote:
FFMPEG -i stream1.u8 -filter_complex "asplit [s][d]; [s] pan=5.1|c0=c0|c1=c1|c2=c2|c3=c3|c4=c4|c5=c5 [ss]; [d] pan=stereo|c0=c6|c1=c7 [dd]" -map "[ss]" -acodec pcm_s24le surround.wav -map "[dd]" -acodec pcm_s24le downmix.wav
In AviSynth we can use for the 5,1:
Quote:
FFAudioSource("C:\tmp\stream1.u8")
ConvertAudioTo24bit()
GetChannel(1, 2, 3, 4, 5, 6)
#GetChannel(7, 8)
And the GetChannel(7, 8) for the 2.0
Attached Images
 
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 27th October 2021 at 11:31. Reason: typo
tebasuna51 is offline   Reply With Quote
Old 27th October 2021, 15:34   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
Opened a ticket: https://trac.ffmpeg.org/ticket/9479

Please comment and/or upvote
FranceBB is offline   Reply With Quote
Old 8th November 2021, 10:26   #3  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
Replied to the ticket with 2 more samples.

Currently we have:

FFMpeg bugtracker: https://trac.ffmpeg.org/ticket/9479
LWLibavAudioSource BugTracker: https://github.com/AkarinVS/L-SMASH-Works/issues/17
MPV Player BugTracker: https://github.com/mpv-player/mpv/issues/9353

Last edited by FranceBB; 8th November 2021 at 11:09.
FranceBB is offline   Reply With Quote
Reply


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 08:37.


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