[MPlayer-users] status of dca/dts decoder
Andy Furniss
andyqos at ukfsn.org
Mon Jul 16 13:12:11 CEST 2012
Carl Eugen Hoyos wrote:
> But as said, you can test with MPlayer and HDMI.
Ok, but I don't have a sink to test that with.
>
>>>> Is the downmix from 5.1 to stereo known to have issues?
>>>
>>> I am not sure if I understand the question.
>>> You can test the following:
>>> $ ffmpeg -request_channels 2 -i input out.wav
>>
>> This produces a 6 channel wav with four silent - the L&R do show the
>> issue in that they are not a stereo downmix and clip - they just seem to
>> be everything sent to to 1 channel then duplicated to make 2 (that may
>> not be an accurate analysis though).
>
> Since this works fine here (stereo output):
> Command line and complete, uncut console output missing.
It works with your file but doesn't with the one I tested -
http://www.andyqos.ukfsn.org/thx-simp.vob
It's 28 meg and as you can see has ac3 as well as dts - here's the test
outputs.
sh-3.2$ ffmpeg -request_channels 2 -i hd_dts_animated_logo_lossless.m2ts
out.wav
ffmpeg version N-42472-gd3abbb1 Copyright (c) 2000-2012 the FFmpeg
developers
built on Jul 13 2012 12:52:14 with gcc 4.5.1
configuration: --prefix=/usr --enable-gpl --enable-libx264
--enable-libfaac --enable-nonfree --enable-libxvid
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 35.100 / 54. 35.100
libavformat 54. 16.104 / 54. 16.104
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 2.100 / 3. 2.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mpegts, from 'hd_dts_animated_logo_lossless.m2ts':
Duration: 00:00:21.38, start: 11.608967, bitrate: 36559 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448),
yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn,
47.95 tbc
Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] /
0x0086), 48000 Hz, stereo, s16, 1536 kb/s
[graph 0 input from stream 0:1 @ 0xabfb220] tb:1/48000 samplefmt:s16
samplerate:48000 chlayout:0x3
Output #0, wav, to 'out.wav':
Metadata:
encoder : Lavf54.16.104
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz,
stereo, s16, 1536 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (dca -> pcm_s16le)
Press [q] to stop, [?] for help
size= 4004kB time=00:00:21.39 bitrate=1533.0kbits/s
video:0kB audio:4004kB subtitle:0 global headers:0kB muxing overhead
0.001122%
bash-3.2$ sox out.wav -n stats
Overall Left Right
DC offset -0.023398 -0.023398 -0.022977
Min level -1.000000 -1.000000 -1.000000
Max level 0.999969 0.999969 0.999969
Pk lev dB 0.00 0.00 0.00
RMS lev dB -8.98 -9.09 -8.88
RMS Pk dB -2.96 -2.98 -2.96
RMS Tr dB -inf -inf -inf
Crest factor - 2.85 2.78
Flat factor 30.95 30.58 31.29
Pk count 24.4k 23.6k 25.3k
Bit-depth 16/16 16/16 16/16
Num samples 1.03M
Length s 21.355
Scale max 1.000000
Window s 0.050
bash-3.2$ ffmpeg -request_channels 2 -i ../thx-samples/thx-simp.vob out.wav
ffmpeg version N-42472-gd3abbb1 Copyright (c) 2000-2012 the FFmpeg
developers
built on Jul 13 2012 12:52:14 with gcc 4.5.1
configuration: --prefix=/usr --enable-gpl --enable-libx264
--enable-libfaac --enable-nonfree --enable-libxvid
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 35.100 / 54. 35.100
libavformat 54. 16.104 / 54. 16.104
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 2.100 / 3. 2.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[mpeg @ 0x987b4a0] max_analyze_duration 5000000 reached at 5005000
Input #0, mpeg, from '../thx-samples/thx-simp.vob':
Duration: 00:00:34.43, start: 0.233567, bitrate: 6847 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR
32:27 DAR 16:9], 8260 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x89]: Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 768 kb/s
Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), s16, 448 kb/s
File 'out.wav' already exists. Overwrite ? [y/N] y
tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x60f
[dca @ 0x9883200] channel layout does not match number of channels
Output #0, wav, to 'out.wav':
Metadata:
encoder : Lavf54.16.104
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz,
5.1(side), s16, 4608 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (dca -> pcm_s16le)
Press [q] to stop, [?] for help
Input stream #0:1 frame changed from rate:48000 fmt:s16 ch:6
chl:5.1(side) to rate:48000 fmt:s16 ch:2 chl:stereo
[graph 0 input from stream 0:1 @ 0x988f500] tb:1/48000 samplefmt:s16
samplerate:48000 chlayout:0x3
[auto-inserted resampler 0 @ 0x9b4c900] chl:stereo fmt:s16 r:48000Hz ->
chl:5.1(side) fmt:s16 r:48000Hz
size= 19374kB time=00:00:34.44 bitrate=4608.0kbits/s
video:0kB audio:19374kB subtitle:0 global headers:0kB muxing overhead
0.000343%
bash-3.2$ sox out.wav -n stats
Overall Ch1 Ch2 Ch3 Ch4 Ch5
Ch6
DC offset 0.000340 0.000330 0.000340 0.000000 0.000000 0.000000
0.000000
Min level -1.000000 -1.000000 -1.000000 0.000000 0.000000 0.000000
0.000000
Max level 0.999969 0.999969 0.999969 0.000000 0.000000 0.000000
0.000000
Pk lev dB 0.00 0.00 0.00 -inf -inf -inf
-inf
RMS lev dB -20.84 -15.91 -16.24 -inf -inf -inf
-inf
RMS Pk dB -6.62 -6.62 -7.28 -inf -inf -inf
-inf
RMS Tr dB -inf -inf -inf -inf -inf -inf
-inf
Crest factor - 6.24 6.48 1.00 1.00 1.00
1.00
Flat factor 124.37 14.52 14.09 124.37 124.37 124.37
124.37
Pk count 2.20M 560 453 3.31M 3.31M 3.31M
3.31M
Bit-depth 16/16 16/16 16/16 0/0 0/0 0/0
0/0
Num samples 1.65M
Length s 34.443
Scale max 1.000000
Window s 0.050
>
>>> $ ffmpeg -i input -ac 2 out2.wav
>>
>> This produces a 6 channel copy with no downmix.
>
> This sounds quite unbelievable since it is supposed to work
> for any input; since it works fine here:
> Command line and complete, uncut console output missing.
>
> ("Works fine" does not mean that the stereo output fulfills
> any requirements, just that stereo output is produced.)
You are correct I must have messed up and put the -ac 2 before the -i.
It produces "correct" stereo output unlike the first command which
produces not stereo with the anything I've tried.
>
> Afaict, MPlayer does - as I suspected - request two channels
> from the decoder by default.
>
> Carl Eugen
>
> PS: I tested hd_dts_animated_logo_lossless.m2ts
So can you confirm that decoder downmix is buggy?
I can here that's not stereo and with the oversized 7.1 sound check file
it's really obvious and can be confirmed visually using -
sox fname -n spectrogram
on a wav - so it can't be anything to do with my sound set up.
More information about the MPlayer-users
mailing list