Opened 15 years ago

Closed 14 years ago

#6975 closed enhancement (invalid)

New Audio Setup and additional audio capabilities

Reported by: JYA Owned by: JYA
Priority: minor Milestone: unknown
Component: MythTV - General Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: yes

Description (last modified by JYA)

The aim of this ticket is to simplify the current MythTV Audio configuration while adding extra functionalities.

*It combines earlier ticket (#5900) by "foobum" ; providing upmixing capabilities and 5.1 AC3 re-encoding. The upmixer can be enable/diabled at any time by pressing Ctrl-U.

*Internal volume control (ticket #6279) to work even when audio is output via a digital device (including 'passthru' and upmixed AC-3). When setting the mixer to "software", gives mythtv the capability to control the volume of all content (including AC3 and DTS)

*Simplification of the Setup/General/Audio? screen, only presenting the options when they are relevant to the selected speaker configuration.

*Remove settings that aren't relevant anymore or that only created problem (like aggressive soundcard buffer)

*Simplify the stereo/surround configuration. Previously you had to set the number of speakers to stereo in order to get digital multi-channels.

*Various fixes across the board

Attachments (11)

new_audio.diff (105.1 KB) - added by JYA 15 years ago.
New audio setup + upmixer + software volume control patch
new_audio-21874.diff (102.6 KB) - added by JYA 15 years ago.
Updated to build against SVN #21874
new_audio-21947.diff (102.7 KB) - added by JYA 15 years ago.
Updated to build against SVN #21947
new_audio-21955.diff (107.2 KB) - added by JYA 15 years ago.
Fix remaining issues.... Mono audio playback and AAC channel ordering
new_audio-21956.diff (106.4 KB) - added by JYA 15 years ago.
Simplify mono to stereo conversion using C++ templates (version 2)
new_audio-22054.diff (106.4 KB) - added by JYA 15 years ago.
Updated to build against SVN #22054
new_audio-22106.diff (101.2 KB) - added by JYA 15 years ago.
Updated to build against SVN #22106
new_audio-22186.diff (98.0 KB) - added by JYA 14 years ago.
Updated to build against SVN r22186
new_audio-22249.diff (98.0 KB) - added by JYA 14 years ago.
Updated to build against SVN r22249
gdb.txt (35.6 KB) - added by anonymous 14 years ago.
backtrace of crash after audio corruption
gdb1.txt (106.8 KB) - added by anonymous 14 years ago.
Ignore the previous gdb.txt. That was not the right one. This is

Download all attachments as: .zip

Change History (26)

Changed 15 years ago by JYA

Attachment: new_audio.diff added

New audio setup + upmixer + software volume control patch

comment:1 Changed 15 years ago by JYA

Owner: changed from Isaac Richards to JYA
Status: newassigned

Changed 15 years ago by JYA

Attachment: new_audio-21874.diff added

Updated to build against SVN #21874

Changed 15 years ago by JYA

Attachment: new_audio-21947.diff added

Updated to build against SVN #21947

comment:2 Changed 15 years ago by JYA

new_audio-21955 fixes the two remaining problems. 1- Correctly re-order AAC audio when using ffmpeg/FAAC 2- Fix issues when playing mono audio. Under some circumstances (like using digital output) a mono audio track would give you no sound

Changed 15 years ago by JYA

Attachment: new_audio-21955.diff added

Fix remaining issues.... Mono audio playback and AAC channel ordering

comment:3 Changed 15 years ago by JYA

Simplify mono to stereo conversion, using C++ templates instead.

Changed 15 years ago by JYA

Attachment: new_audio-21956.diff added

Simplify mono to stereo conversion using C++ templates (version 2)

Changed 15 years ago by JYA

Attachment: new_audio-22054.diff added

Updated to build against SVN #22054

comment:4 Changed 15 years ago by JYA

Description: modified (diff)

comment:5 Changed 15 years ago by Mark Spieth

the latest patch works well. It should be included in 0.22 as 6 channel output is broken without it, which is mainly due to ac3 channel reordering that occurred recently in ffmpeg/libavcodec.

comment:6 Changed 15 years ago by JYA

I agree with you Mark, but despite my pleas it's been decided that it won't be included in 0.22... The patch fixes more than just channel ordering, and I now see it more as a bug fixes patches than a new features one.

Changed 15 years ago by JYA

Attachment: new_audio-22106.diff added

Updated to build against SVN #22106

comment:7 Changed 15 years ago by JYA

Committed some fixes in [22106]. This fixes 5.1 channel output except for AAC audio.

Changed 14 years ago by JYA

Attachment: new_audio-22186.diff added

Updated to build against SVN r22186

Changed 14 years ago by JYA

Attachment: new_audio-22249.diff added

Updated to build against SVN r22249

comment:8 Changed 14 years ago by JYA

Resolution: fixed
Status: assignedclosed

(In [22432]) New Audio Setup and additional audio capabilities

  • Provide upmixing capabilities and 5.1 AC3 re-encoding
  • Internal volume control to work even when audio is output via a digital devide (including 'passthru' and upmixed AC-3). When setting the mixer to "software", gives mythtv the capability to control the volume of all content (including AC3 and DTS)
  • Simplification of the Setup/General/Audio? screen, only presenting the options when they are relevant to the selected speaker configuration.
  • Remove settings that aren't relevant anymore or that only created problem (like aggressive soundcard buffer)
  • Simplify the stereo/surround configuration. Previously you had to set the number of speakers to stereo in order to get digital multi-channels.
  • Various fixes across the board (like timestretch with digital sound)

User of digital audio will have to edit the audio configuration settings, and change "Stereo" to "5.1" for the "Speaker configuration" settings. Ctrl-U will toggle the upmixer during playback or in MythMusic. Default upmixer behaviour for video playback and music can be changed in their respective configuration screen.

Close #6975

Note that AAC multi-channel ordering is still wrong unless you are using libfaad, this will be fixed with the next ffmpeg resync.

Original patch from "foobum". Thank you for your great work.

comment:9 Changed 14 years ago by anonymous

I have been having some audio issues since updating to this revision. When transitioning from a commercial with non Dolby Digital sound back to a program with Dolby Digital I start getting "WriteAudio?: buffer underrun" errors, the video becomes jerky and sped up and there is no sound. The frontend eventually crashes. In one instance I had "AudioOutput? Error: snd_pcm_open(iec958): Device or resource busy" followed by "DEnc, Error: Could not open codec, invalid bitrate or samplerate" and then a frontend crash.

If the video transitions back to non Dolby Digital before the crash, the non Digital audio works and the video returns to normal.

I have configured my speaker configuration to 5.1 and have passthrough enabled. I am not using time stretch.

I actually prefer not upmixing the sound and don't want volume control in Myth. It would be nice to have an option to only upmix/remix the sound when time stretch is used and doing so is necessary.

comment:10 Changed 14 years ago by JYA

Please provide a backtrace ... and re-open this ticket when doing so.

You do not have to enable the upmixer, simply uncheck that option. It is not enabled by default.

Changed 14 years ago by anonymous

Attachment: gdb.txt added

backtrace of crash after audio corruption

comment:11 in reply to:  10 Changed 14 years ago by anonymous

Backtrace attached. With gdb, it only crashed after pressing escape. Sound was still just as messed up. I am using svn r22435

Thanks for the tip on the setting. I tend to miss some settings as my tv color and/or contrast makes all the settings pages nearly impossible to read.

Let me know if you need anything else.

I don't have permission to reopen.

Changed 14 years ago by anonymous

Attachment: gdb1.txt added

Ignore the previous gdb.txt. That was not the right one. This is

comment:12 Changed 14 years ago by JYA

Resolution: fixed
Status: closednew

that backtrace doesn't show a crash , but an abort (you probably press Ctrl-C)

If you want to report a crash, you must submit a backtrace from when the application has crashed ; killing the program isn't a crash !

If you have a recording with the transition between the different audio codec where you can consistently produce the problem, post it somewhere and put the link here...

comment:13 Changed 14 years ago by anonymous

The first gdb.txt I mistakenly attached was indeed a ctrl-c exit. The second (gdb1.txt) I pressed esc with my remote and it crashed.

I have a recording where I know the issue reproduces about 50 minutes in. Any recommended way to chop out a a few minutes of that?

comment:14 Changed 14 years ago by anonymous

I tried 'mencoder recording.mpg -ss 2500 -endpos 240 -oac copy -ovc copy -o file.mpg'. While I got the snippet I wanted, it does not reproduce. The a/v sync is horrid though. I have seen this problem with two recordings off of CBS so far. All I can reliably provide is a 7GB file. Size aside, I don't really feel comfortable posting a full tv show someplace.

Would output with any specific verbose options help?

comment:15 Changed 14 years ago by JYA

Resolution: invalid
Status: newclosed
Ticket locked: set

No, same thing Program received signal SIGABRT, Aborted.

You aborted that program with Ctrl-C, there's no crash in that backtrace ...

When you finally have a backtrace working, open a new ticket, I'm closing this one and locking it

Note: See TracTickets for help on using tickets.