Opened 15 years ago

Last modified 15 years ago

#1643 new defect

audio filter lavcac3enc issue

Reported by: andrea3000@… Owned by: reynaldo@…
Priority: important Component: af
Version: unspecified Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

There is an issue with the new version of audio filter lavcac3enc (introduced in r30285 of mplayer).
With an older version (r30223) I was able to use this filter which outputs an ac3 stream that my decoder (logitech z5500) correctly decode as dolby digital.
With the new version of the audio filter (from r30285 to the latest), the audio stream output is ac3be and my decoder is unable to decode it.

I paste the verbose output of a test I have just done; I use a combination of pan filter and lavcac3enc filter to convert a 7ch truehd audio track to 5ch ac3 track that can then be sent through s/pdif. I have always succesfully done this with mplayer revision 30223.
These are the options I use:
-ao coreaudio -channels 6 -af pan=6:1:0:0:0:0:0:0:1:0:0:0:0:0:0:0.45:0:0:0:0:0:0:0.45:0:0:0:0:0:0:0.8:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0:0:0,lavcac3enc=1:448:3,channels=6 -ac -v fftruehd /Volumes/Dati/Audio\ demo/hd_dolby_truehd_channel_check_lossless.m2ts

and this is the verbose output:

==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Forced audio codec: fftruehd
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 192000 + 65536 = 257536 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec "truehd" init OK!
[truehd @ 0x10087d640]Extracting 6 channel downmix from substream 1. Further substreams will be skipped.
AUDIO: 48000 Hz, 6 ch, s32le, 0.0 kbit/0.00% (ratio: 0->1152000)
Selected audio codec: [fftruehd] afm: ffmpeg (FFmpeg TrueHD)
==========================================================================
Building audio filter chain for 48000Hz/6ch/s32le -> 0Hz/0ch/??...
[libaf] Adding filter pan
[pan] Pan level from channel 0 to channel 0 = 1.000000
[pan] Pan level from channel 0 to channel 1 = 0.000000
[pan] Pan level from channel 0 to channel 2 = 0.000000
[pan] Pan level from channel 0 to channel 3 = 0.000000
[pan] Pan level from channel 0 to channel 4 = 0.000000
[pan] Pan level from channel 0 to channel 5 = 0.000000
[pan] Pan level from channel 1 to channel 0 = 0.000000
[pan] Pan level from channel 1 to channel 1 = 1.000000
[pan] Pan level from channel 1 to channel 2 = 0.000000
[pan] Pan level from channel 1 to channel 3 = 0.000000
[pan] Pan level from channel 1 to channel 4 = 0.000000
[pan] Pan level from channel 1 to channel 5 = 0.000000
[pan] Pan level from channel 2 to channel 0 = 0.000000
[pan] Pan level from channel 2 to channel 1 = 0.000000
[pan] Pan level from channel 2 to channel 2 = 0.450000
[pan] Pan level from channel 2 to channel 3 = 0.000000
[pan] Pan level from channel 2 to channel 4 = 0.000000
[pan] Pan level from channel 2 to channel 5 = 0.000000
[pan] Pan level from channel 3 to channel 0 = 0.000000
[pan] Pan level from channel 3 to channel 1 = 0.000000
[pan] Pan level from channel 3 to channel 2 = 0.000000
[pan] Pan level from channel 3 to channel 3 = 0.450000
[pan] Pan level from channel 3 to channel 4 = 0.000000
[pan] Pan level from channel 3 to channel 5 = 0.000000
[pan] Pan level from channel 4 to channel 0 = 0.000000
[pan] Pan level from channel 4 to channel 1 = 0.000000
[pan] Pan level from channel 4 to channel 2 = 0.000000
[pan] Pan level from channel 4 to channel 3 = 0.000000
[pan] Pan level from channel 4 to channel 4 = 0.800000
[pan] Pan level from channel 4 to channel 5 = 0.000000
[pan] Pan level from channel 5 to channel 0 = 0.000000
[pan] Pan level from channel 5 to channel 1 = 0.000000
[pan] Pan level from channel 5 to channel 2 = 0.000000
[pan] Pan level from channel 5 to channel 3 = 0.000000
[pan] Pan level from channel 5 to channel 4 = 0.000000
[pan] Pan level from channel 5 to channel 5 = 1.000000
[pan] Pan level from channel 6 to channel 0 = 0.000000
[pan] Pan level from channel 6 to channel 1 = 0.000000
[pan] Pan level from channel 6 to channel 2 = 0.000000
[pan] Pan level from channel 6 to channel 3 = 0.000000
[pan] Pan level from channel 6 to channel 4 = 0.000000
[pan] Pan level from channel 6 to channel 5 = 0.000000
[pan] Pan level from channel 7 to channel 0 = 0.000000
[pan] Pan level from channel 7 to channel 1 = 0.000000
[pan] Pan level from channel 7 to channel 2 = 0.000000
[pan] Pan level from channel 7 to channel 3 = 0.000000
[pan] Pan level from channel 7 to channel 4 = 0.000000
[pan] Pan level from channel 7 to channel 5 = 0.000000
[libaf] Adding filter lavcac3enc
af_lavcac3enc config spdif:1, bitrate:448000, minchnum:3.
[libaf] Adding filter channels
[channels] Changing number of channels to 6
[libaf] Adding filter format
[format] Changing sample format from little-endian 32-bit signed int to little-endian 32-bit float
[ac3 @ 0x10087d640]No channel layout specified. The encoder will guess the layout, but it might be incorrect.
[libaf] Adding filter format
[format] Changing sample format from little-endian 32-bit float to little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit signed int conversion
[format] Changing sample format from little-endian 32-bit signed int to little-endian 32-bit float
[format] Changing sample format from little-endian 32-bit float to little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit signed int conversion
Trying preferred audio driver 'coreaudio', options '[none]'
AO: [coreaudio] init([48000Hz][6ch][ac3be][0])
AO: [coreaudio] got default audio output device ID: 0x10a Name: Built-in Digital Output
AO: [coreaudio] supported format: 96000.0Hz 16bit [lpcm][12][140733193388036][140733193388033][140733193388036][4294967298] int LE S packed
AO: [coreaudio] supported format: 48000.0Hz 16bit [lpcm][12][140733193388036][140733193388033][140733193388036][4294967298] int LE S packed
AO: [coreaudio] supported format: 44100.0Hz 16bit [lpcm][12][140733193388036][140733193388033][140733193388036][4294967298] int LE S packed
AO: [coreaudio] supported format: 96000.0Hz 20bit [lpcm][4][140733193388040][140733193388033][140733193388040][4294967298] int LE S
AO: [coreaudio] supported format: 48000.0Hz 20bit [lpcm][4][140733193388040][140733193388033][140733193388040][4294967298] int LE S
AO: [coreaudio] supported format: 44100.0Hz 20bit [lpcm][4][140733193388040][140733193388033][140733193388040][4294967298] int LE S
AO: [coreaudio] supported format: 96000.0Hz 24bit [lpcm][4][140733193388040][140733193388033][140733193388040][4294967298] int LE S
AO: [coreaudio] supported format: 48000.0Hz 24bit [lpcm][4][140733193388040][140733193388033][140733193388040][4294967298] int LE S
AO: [coreaudio] supported format: 44100.0Hz 24bit [lpcm][4][140733193388040][140733193388033][140733193388040][4294967298] int LE S
AO: [coreaudio] supported format: 96000.0Hz 16bit [cac3][76][140733193394176][140733193389568][140733193388032][4294967298] int LE S packed
AO: [coreaudio] supported format: 48000.0Hz 16bit [cac3][76][140733193394176][140733193389568][140733193388032][4294967298] int LE S packed
AO: [coreaudio] supported format: 44100.0Hz 16bit [cac3][76][140733193394176][140733193389568][140733193388032][4294967298] int LE S packed
AO: [coreaudio] probe default audio output device whether support digital s/pdif output:1
AO: [coreaudio] source: 48000.0Hz 16bit [cac3][14][12][1][12][6] int BE S packed
AO: [coreaudio] current device stream number: 1
AO: [coreaudio] original stream format: 48000.0Hz 16bit [lpcm][12][4][1][4][2] int LE S packed
AO: [coreaudio] setting stream format: 48000.0Hz 16bit [cac3][4294967372][6144][1536][4676829883349860352][2] int LE S packed
AO: [coreaudio] reached timeout
AO: [coreaudio] actual format in use: 48000.0Hz 16bit [lpcm][4294967308][4][1][4676829883349860356][2] int LE S packed
AO: [coreaudio] reached timeout
AO: [coreaudio] actual format in use: 48000.0Hz 16bit [lpcm][4294967308][4][1][4676829883349860356][2] int LE S packed
AO: [coreaudio] reached timeout
AO: [coreaudio] actual format in use: 48000.0Hz 16bit [lpcm][4294967308][4][1][4676829883349860356][2] int LE S packed
AO: [coreaudio] reached timeout
AO: [coreaudio] actual format in use: 48000.0Hz 16bit [lpcm][4294967308][4][1][4676829883349860356][2] int LE S packed
AO: [coreaudio] reached timeout
AO: [coreaudio] actual format in use: 48000.0Hz 16bit [lpcm][4294967308][4][1][4676829883349860356][2] int LE S packed
AO: [coreaudio] using 32 chunks of 6144 bytes (buffer len 196608 bytes)
AO: [coreaudio] 48000Hz 2ch ac3be (2 bytes per sample)
AO: Description: Darwin/Mac OS X native audio output
AO: Author: Timothy J. Wood & Dan Christiansen & Chris Roccati
Building audio filter chain for 48000Hz/6ch/s32le -> 48000Hz/2ch/ac3be...
[format] Changing sample format from little-endian 32-bit signed int to little-endian 32-bit float
[format] Changing sample format from little-endian 32-bit float to little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit signed int conversion
[libaf] Adding filter channels
[channels] Changing number of channels to 2
[format] Changing sample format from little-endian 32-bit signed int to little-endian 32-bit float
[format] Changing sample format from little-endian 32-bit float to little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit signed int conversion
Starting playback...
[libaf] Reallocating memory in module format, old len = 0, new len = 65305
[libaf] Reallocating memory in module pan, old len = 0, new len = 65305
[libaf] Reallocating memory in module format, old len = 0, new len = 32665
[libaf] Reallocating memory in module lavcac3enc, old len = 0, new len = 6144
[libaf] Reallocating memory in module channels, old len = 0, new len = 18437
[libaf] Reallocating memory in module channels, old len = 0, new len = 6157
Increasing filtered audio buffer size from 0 to 6144
COLLECT_SECTION, start: 64, size: 184, collected: 0
SKIP: 0+1, TID: 0, TLEN: 17, COLLECTED: 184
PARSE_PAT: section_len: 17, section 0/0
PROG: 0 (1-th of 2), PMT: 31
PROG: 1 (2-th of 2), PMT: 256
COLLECT_SECTION, start: 64, size: 184, collected: 0
SKIP: 0+1, TID: 2, TLEN: 63, COLLECTED: 184
FILL_PMT(prog=1), PMT_len: 184, IS_START: 64, TS_PID: 256, SIZE=184, M=0, ES_CNT=2, IDX=0, PMT_PTR=0x1011357e0
PROG DESCR, TAG=5, LEN=4(4)
PROG DESCR, TAG=5, LEN=4(4)
...descr id: 0x5, len=8
...descr id: 0x28, len=4
PARSE_PMT(1 INDEX 0), STREAM: 0, FOUND pid=0x1011 (4113), type=0x10000005, ES_DESCR_LENGTH: 16, bytes left: 17
...descr id: 0x5, len=4
...descr id: 0x81, len=4
PARSE_PMT(1 INDEX 1), STREAM: 1, FOUND pid=0x1100 (4352), type=0xffffffff, ES_DESCR_LENGTH: 12, bytes left: 0


[truehd @ 0x10087d640]Extracting 6 channel downmix from substream 1. Further substreams will be skipped.
[libaf] Reallocating memory in module lavcac3enc, old len = 6144, new len = 12288
[libaf] Reallocating memory in module channels, old len = 18437, new len = 36869
[libaf] Reallocating memory in module channels, old len = 6157, new len = 12301
Increasing filtered audio buffer size from 6144 to 18432
COLLECT_SECTION, start: 64, size: 184, collected: 184
SKIP: 0+1, TID: 0, TLEN: 17, COLLECTED: 184
PARSE_PAT: section_len: 17, section 0/0
PROG: 0 (1-th of 2), PMT: 31
PROG: 1 (2-th of 2), PMT: 256
COLLECT_SECTION, start: 64, size: 184, collected: 184
SKIP: 0+1, TID: 2, TLEN: 63, COLLECTED: 184
FILL_PMT(prog=1), PMT_len: 184, IS_START: 64, TS_PID: 256, SIZE=184, M=0, ES_CNT=2, IDX=0, PMT_PTR=0x1011357e0
PROG DESCR, TAG=5, LEN=4(4)
PROG DESCR, TAG=5, LEN=4(4)
...descr id: 0x5, len=8
...descr id: 0x28, len=4
PARSE_PMT(1 INDEX 0), STREAM: 0, FOUND pid=0x1011 (4113), type=0x10000005, ES_DESCR_LENGTH: 16, bytes left: 17
...descr id: 0x5, len=4
...descr id: 0x81, len=4
PARSE_PMT(1 INDEX 1), STREAM: 1, FOUND pid=0x1100 (4352), type=0xffffffff, ES_DESCR_LENGTH: 12, bytes left: 0


Increasing filtered audio buffer size from 18432 to 30720
[truehd @ 0x10087d640]Extracting 6 channel downmix from substream 1. Further substreams will be skipped.
COLLECT_SECTION, start: 64, size: 184, collected: 184
SKIP: 0+1, TID: 0, TLEN: 17, COLLECTED: 184
PARSE_PAT: section_len: 17, section 0/0
PROG: 0 (1-th of 2), PMT: 31
PROG: 1 (2-th of 2), PMT: 256
COLLECT_SECTION, start: 64, size: 184, collected: 184
SKIP: 0+1, TID: 2, TLEN: 63, COLLECTED: 184
FILL_PMT(prog=1), PMT_len: 184, IS_START: 64, TS_PID: 256, SIZE=184, M=0, ES_CNT=2, IDX=0, PMT_PTR=0x1011357e0
PROG DESCR, TAG=5, LEN=4(4)
PROG DESCR, TAG=5, LEN=4(4)
...descr id: 0x5, len=8
...descr id: 0x28, len=4
PARSE_PMT(1 INDEX 0), STREAM: 0, FOUND pid=0x1011 (4113), type=0x10000005, ES_DESCR_LENGTH: 16, bytes left: 17
...descr id: 0x5, len=4
...descr id: 0x81, len=4
PARSE_PMT(1 INDEX 1), STREAM: 1, FOUND pid=0x1100 (4352), type=0xffffffff, ES_DESCR_LENGTH: 12, bytes left: 0

I hope you can help me...I tried almost everything that came into my mind..

Change History (2)

comment:1 by reimar, 15 years ago

Hm? Isn't it a question of the sound card whether ac3be is supported?
Next, I think the real issue is the channels filter which shouldn't be there, the output of a working version would help a lot here.
Lastly, you can force little-endian ac3 by adding the format=ac3le filter.

comment:2 by andrea3000@…, 15 years ago

(In reply to comment #1)

Hm? Isn't it a question of the sound card whether ac3be is supported?
Next, I think the real issue is the channels filter which shouldn't be there,
the output of a working version would help a lot here.
Lastly, you can force little-endian ac3 by adding the format=ac3le filter.

Forcing little-endian everything works as before...thank you very much!
I still don't understand what is the problem...my sound card is a realteck ALC889a...it sounds strange to me that it doesn't support ac3be..
Thank you again!

Note: See TracTickets for help on using tickets.