Opened 11 years ago
Last modified 8 years ago
#3455 new defect
aresample=matrix_encoding=dplii doesn't downmix backleft and center correctly
Reported by: | Peter Robertson | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | swresample |
Version: | git-master | Keywords: | dplii |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug: DPLII files have too-loud right channel.
Seems to be some problem with the interaction of back left and center channel
How to reproduce:
ffmpeg -i surround_blbrc.wav -af "aresample=matrix_encoding=dplii" -ac 2 dplii_blbrc.wav ffmpeg version git-2014-03-09-8dfd0e6 built on Mar 9 2014 22:53:26 with gcc 4.8.2 (Gentoo 4.8.2 p1.3r1, pie-0.5.8r1)
You can see the problem easiest by crafting a 5.1 surround wave file with empty channels except the center channel with noise and the two back channels, first half of the back left with noise and the second half of the back right with noise. However, all surround files that use the bl and center channels at the same time will be too loud in the resulting file's right channel.
Can provide example files if you like.
Attachments (2)
Change History (9)
comment:1 by , 11 years ago
Component: | ffmpeg → swresample |
---|---|
Keywords: | aresample matrix_encoding dplii removed |
comment:2 by , 11 years ago
peter@Chip /run/media/peter/FRAPs/LetsPlay $ ~/mplayer/ffmpeg/ffmpeg -i surround_blbrc.wav -af "aresample=matrix_encoding=dplii" -ac 2 dplii_blbrc.wav ffmpeg version git-2014-03-09-8dfd0e6 Copyright (c) 2000-2014 the FFmpeg developers built on Mar 9 2014 22:53:26 with gcc 4.8.2 (Gentoo 4.8.2 p1.3r1, pie-0.5.8r1) configuration: --enable-libx264 --enable-gpl libavutil 52. 66.101 / 52. 66.101 libavcodec 55. 52.102 / 55. 52.102 libavformat 55. 34.100 / 55. 34.100 libavdevice 55. 11.100 / 55. 11.100 libavfilter 4. 3.100 / 4. 3.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 18.100 / 0. 18.100 libpostproc 52. 3.100 / 52. 3.100 Guessed Channel Layout for Input Stream #0.0 : 5.1 Input #0, wav, from 'surround_blbrc.wav': Duration: 00:00:01.01, bitrate: 4608 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 5.1, s16, 4608 kb/s File 'dplii_blbrc.wav' already exists. Overwrite ? [y/N] y Output #0, wav, to 'dplii_blbrc.wav': Metadata: ISFT : Lavf55.34.100 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le) Press [q] to stop, [?] for help size= 189kB time=00:00:01.01 bitrate=1536.6kbits/s video:0kB audio:189kB subtitle:0 data:0 global headers:0kB muxing overhead 0.041252%
comment:3 by , 11 years ago
I can fix this problem by inverting the back-left channel of my source files before letting ffmpeg do its thing - it seems like ffmpeg is subtracting the back left from the center channel rather than adding it which means it is inverting the back-left when it shouldn't or not inverting it when it should.
I'll do some tinkering over the weekend and see if I can't figure out some demonstration to attach.
comment:4 by , 11 years ago
The sample you uploaded is too short to do any test imo, I tested with a file that you should be able to find with Google:
$ ffmpeg -i Test\ AC3\ v2.0.avi -af "aresample=matrix_encoding=dplii" -ac 2 out.wav $ ffmpeg -i Test\ AC3\ v2.0.avi -af "aresample=matrix_encoding=dplii" -ac 2 -ab 640k out.ac3 $ ffmpeg -i Test\ AC3\ v2.0.avi -af "aresample=matrix_encoding=dplii" -ac 2 -ab 640k out.eac3
I now set my receiver to "PLII" and played the three files over the digital connection (HDMI): The surround sound sounded as expected (surround sound although I used stereo files). I finally tested the wav file over the analog connection and the stereo signal also played like a surround signal.
Or do I misunderstand the problem?
comment:5 by , 10 years ago
The suggested patch can be found here:
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/175700
http://ffmpeg.org/pipermail/ffmpeg-devel/2014-March/155559.html
comment:7 by , 8 years ago
Keywords: | dplii added |
---|
Please provide your failing command line together with the complete, uncut console output and please provide a sample.