[FFmpeg-trac] #1149(undetermined:new): wrong channels / poor playback for 7 channel dts

FFmpeg trac at avcodec.org
Thu Mar 29 17:22:56 CEST 2012


#1149: wrong channels / poor playback for 7 channel dts
-------------------------------------+-------------------------------------
             Reporter:  fro          |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 There's already a sample file (not uploaded by me) available here:

 http://samples.mplayerhq.hu/A-codecs/DTS/lotr_5.1_768.dts

 This file plays fine for me in mplayer, but with ffplay I can't get this
 file to play correctly at all (using ffmpeg 0.10.2). Also, when converting
 it to FLAC / OGG / etc with ffmpeg, mplayer sounds just as bad as ffplay
 when using it on the converted file.

 mplayer on the dts gives me birds chirping (about centered) and the sound
 of running water; at 0m35s there's also voice. It sounds good with
 mplayer. With ffplay, the birds chirp on the left side only, the water is
 almost not audible, and the voice is hidden far in the background.

 So I think ffmpeg is somehow using the wrong channels for this file.

 I used the pan filter to randomly switch some channels when downmixing to
 stereo (stupid script attached, couldn't get pan to work with FC/FL/FR
 names though), which helps - but then I don't really know what I switched
 and I haven't found the "correct" setting anyway (assuming that what
 mplayer does is correct - I don't know, but it sounds good to me).

 The whole channel mapping thing is unfathomable for me; hopefully someone
 more experienced can take a look.

 {{{

 $ ffplay lotr_5.1_768.dts
 ffplay version 0.10.2 Copyright (c) 2003-2012 the FFmpeg developers
   built on Mar 28 2012 23:57:36 with gcc 4.5.3
   configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc
 --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar
 --optflags='-march=native -O2 -pipe' --extra-cflags='-march=native -O2
 -pipe' --extra-cxxflags='-march=native -O2 -pipe' --disable-static
 --enable-gpl --enable-version3 --enable-postproc --enable-avfilter
 --disable-stripping --disable-debug --disable-doc --disable-network
 --disable-vdpau --enable-gnutls --enable-libmp3lame --enable-libvo-aacenc
 --enable-libvo-amrwbenc --enable-libtheora --enable-libvorbis --enable-
 libx264 --enable-libxvid --enable-libdc1394 --enable-openal --disable-
 indev=v4l --disable-indev=v4l2 --disable-indev=jack --enable-x11grab
 --enable-libfreetype --enable-pthreads --enable-libopencore-amrwb
 --enable-libopencore-amrnb --enable-libmodplug --enable-libspeex
 --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-avx
 --disable-vis --disable-neon --cpu=host --enable-hardcoded-tab  libavutil
 51. 35.100 / 51. 35.100
   libavcodec     53. 61.100 / 53. 61.100
   libavformat    53. 32.100 / 53. 32.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 61.100 /  2. 61.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0.  6.100 /  0.  6.100
   libpostproc    52.  0.100 / 52.  0.100
 [dts @ 0xd77c60] max_analyze_duration 5000000 reached at 5002667
 [dts @ 0xd77c60] Estimating duration from bitrate, this may be inaccurate
 Input #0, dts, from 'lotr_5.1_768.dts':
   Duration: 00:02:05.18, start: 0.000000, bitrate: 768 kb/s
     Stream #0:0: Audio: dts (DTS-ES), 48000 Hz, 7 channels
 (FL+FR+FC+LFE+BC+SL+SR), s16, 768 kb/s

 }}}


 {{{
 #!/bin/bash

 unique="`echo -e "0\n1\n2\n3\n4\n5\n6" | sort`"

 for FL in {0..6}
 do
     for FC in {0..6}
     do
         for BL in {0..6}
         do
             for SL in {0..6}
             do
                 for FR in {0..6}
                 do
                     for BR in {0..6}
                     do
                         for SR in {0..6}
                         do
                             [ "$unique" != "`echo -e
 "$FL\n$FC\n$BL\n$SL\n$FR\n$BR\n$SR" | sort`" ] && continue

                             echo -e
 "FL=$FL\nFC=$FC\nBL=$BL\nSL=$SL\nFR=$FR\nBR=$BR\nSR=$SR\n"

                             ffplay -f lavfi -i "amovie=lotr_5.1_768.dts
 [l]; [l]
 pan=stereo:c0=c$FL+0.5*c$FC+0.6*c$BL+0.6*c$SL:c1=c$FR+0.5*c$FC+0.6*c$BR+0.6*c$SR"
                         done
                     done
                 done
             done
         done
     done
 done

 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1149>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list