Opened 14 years ago

Closed 14 years ago

#8366 closed defect (fixed)

aac background music in foreground / little to no actor's dialogue audible

Reported by: Johnny Walker <johnnyjboss@…> Owned by: JYA
Priority: minor Milestone: 0.24
Component: MythTV - Audio Output Version: Master Head
Severity: low Keywords: aac audio vocals missing
Cc: Ticket locked: no

Description

This mkv file played back correctly in .22-fixes. When I upgraded to .23-fixes I noticed the background music was really loud. When the playback came to a scene with dialogue I realized I was unable to hear the actors. I attempted to switch audio tracks but there is no alternate audio track available on this file.

The problem in this sample is evident at 0:02:21 during playback.

My frontend is Stereo only on Alsa:Default. I entered setup and switched it to 5.1 and then back to see if that helped but it did not. My front end is an Acer Revo and I'm using the Headphone jack output with a Y splitter to RCA.

Change History (13)

comment:1 Changed 14 years ago by Johnny Walker <johnnyjboss@…>

I've uploaded the file to sendspace at http://www.sendspace.com/file/2cue6r

It's also on dropbox.com - I can send individuals an invite to it there if they woulf prefer.

comment:2 Changed 14 years ago by JYA

Milestone: unknown0.24
Severity: mediumlow

Note that there is no downmix done by ffmpeg for most codecs (AFAIK the only exception is for AC3/DD).

So if you are playing 5.1 content on a stereo system, you *will* in most circumstances lose dialogues as they are on the centre channels.

This isn't something new or problem introduced in 0.23.

0.24 will include a downmixer along many audio improvements.

If you want to hear the dialogues, either you wait for 0.24 or you will need to re-encode the audio track...

comment:3 Changed 14 years ago by Johnny Walker <johnnyjboss@…>

I swear this file worked in .22-fixes.

I've switched my output to alsa:hdmi and I'm using the Television's speakers and I still have no dialogues on this file in mythvideo and a very loud music and sound effects track.

This file also sounds fine when I play with mplayer.

comment:4 Changed 14 years ago by danielk

Milestone: 0.240.23
Version: UnspecifiedTrunk Head

jyavenard, we definitely used to support down-mix to stereo in MythTV, in fact was once the only way we 'supported' 5.1. So if we don't anymore, this is a regression and the fix should be backported to the 0.23-fixes branch.

comment:5 Changed 14 years ago by JYA

Milestone: 0.230.24

We never did support downmix, we always relied on ffmpeg to do the job ...

When we ask ffmpeg to decode audio content, we provides as an argument the number of channels to be decoded. The number of channels is what has been set up in the general settings (value is either 2 or 6)

That part of the code hasn't change in ages (it's in libavdecoder...

If you are decoding a 5.1 audio file yet asked ffmpeg to only decode for 2 channels ; ffmpeg will downmix for some codec (AC3); but most will not be downmixed. This includes AAC

Note that the behaviour is different depending on what library was used to decode AAC. If decoded with libfaad, then the downmix will happen, because libfaad does support it.

IF compiled using ffmpeg internal AAC decoder, then no downmix will occur.

The problem is in ffmpeg, not mythtv.

I'm willing to bet that this file didn't play properly in 0.22 either if compiled with the same options as the 0.23 was compiled :)

As a workaround, compile mythtv with the option --enable-libfaad

comment:6 Changed 14 years ago by Johnny Walker <johnnyjboss@…>

I did make a backup - if it's needed or suggested by the devs I can attempt to rollback my installation to settle the 'did this play in .22' and if so 'what were the compile options' questions.

I've attempted to recompile my .23-fixes frontend adding the --enable-libfaad and I get the following:

ccache g++ -Wl,-O1 -o mythavtest version.o main.o -L/usr/lib -L../../libs/libmyth -L../../libs/libmythtv -L../../libs/libavutil -L../../libs/libavcodec -L../../libs/libavformat -L../../libs/libswscale -L../../libs/libmythdb -L../../libs/libmythui -L../../libs/libmythupnp -lmythtv-0.23 -lmythavformat-0.23 -lmythavutil-0.23 -lmythavcodec-0.23 -lmythswscale-0.23 -lmythupnp-0.23 -lmythdb-0.23 -lmythui-0.23 -lmyth-0.23 -L../../libs/libmythlivemedia -lmythlivemedia-0.23 -L../../libs/libmythfreemheg -lmythfreemheg-0.23 -L../../libs/libmythhdhomerun -lmythhdhomerun-0.23 -lfreetype -lz -lraw1394 -liec61883 -lavc1394 -lrom1394 -L/usr/X11R6/lib -lXinerama -lX11 -lXext -lXxf86vm -lXv -lXrandr -lXvMCW -ldl -lXvMC -lpulse -L/usr/local/lib -lpthread -lGLU -lGL -lQtSql -lQtXml -lQtOpenGL -lQtGui -lQtNetwork -lQtCore ../../libs/libavcodec/libmythavcodec-0.23.so: undefined reference to `aac_decoder' collect2: ld returned 1 exit status make[2]: * [mythavtest] Error 1 make[2]: Leaving directory `/home/johnny/Documents/mythtv-0-23/mythtv/programs/mythavtest' make[1]: * [sub-mythavtest-make_default] Error 2 make[1]: Leaving directory `/home/johnny/Documents/mythtv-0-23/mythtv/programs' make: * [sub-programs-make_default-ordered] Error 2

I see the following 2 packages installed:

ii libfaad-dev 2.6.1-3.1 freeware Advanced Audio Decoder - developmen ii libfaad0 2.6.1-3.1 freeware Advanced Audio Decoder - runtime fi

my compile was as follows: ./configure --disable-joystick-menu --enable-vdpau --enable-libfaad

Please advise.

comment:7 Changed 14 years ago by Dibblah

Status: newinfoneeded_new

Make distclean and ask for support in IRC or the mailing lists.

comment:8 Changed 14 years ago by Johnny Walker <johnnyjboss@…>

p.s. - I mentioned that I switched to alsa:hdmi and 5.1 output and then attempted to use my tv for downmix and there still was no dialogue track. Do we expect that behavior?

comment:9 Changed 14 years ago by stuartm

The sample definitely doesn't work in 0.22 with stereo output and without libfaad.

Johnny, that will only work if your TV/hardware supports it and it sounds like it doesn't.

comment:10 Changed 14 years ago by Johnny Walker <johnnyjboss@…>

you're correct - the playback is super slow motion with this enabled in .23-fixes.

I watched half this movie in .22-fixes - It had to have worked. I listened to Morpheus explain what the matrix is in perfect detail. I recall it very clearly. This movie file had worked in my previous installation of .22-fixes.

comment:11 Changed 14 years ago by JYA

I think that my two posts explain enough what you need to do to get it working.

If it worked with 0.22 it's because it obviously was compiled with --enable-libfaad.

This is not a regression in 0.23.

Please, stop the "it used to work , now it doesnt" kind of message. it's not helpful

How to compile mythtv isn't relevant to this ticket either, seek alternative place for advice on how to compile mythtv.

comment:12 Changed 14 years ago by robertm

Status: infoneeded_newnew

comment:13 Changed 14 years ago by JYA

Resolution: fixed
Status: newclosed

Compile 0.23 with --enable-libfaad or use trunk or wait for 0.24

Note: See TracTickets for help on using tickets.