Opened 9 years ago

Closed 9 years ago

#8568 closed enhancement (wontfix)

Vuvuzela filter

Reported by: JYA Owned by: JYA
Priority: minor Milestone: unknown
Component: MythTV - Audio Output Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Watching the football worlcup? Annoyed with those horns ?

this patch will help.

It is implemented by filtering the frequencies 233, 466, 932 and 1864Hz using a band-stop filter (notch filter)

Was provided the info from: http://www.afterdawn.com/news/article.cfm/2010/06/14/vuvuzela_buzz_ruining_your_world_cup_get_rid_of_it

It is not perfect, but once active, you can finally hear people cheering..

May commit it for convenience, but I feel the bi-quad filters parameters could be improved. If people are willing to tweak a bit, this is done in the file mythtv/libs/libmyth/audiooutpututil.cpp in void AudioOutputUtil::notch_update()

By the way, the methods provided in the above link, don't give IMHO as good results.

How to use it: Go to the settings -> general in the audio section. Activate Advanced Audio and check the Vuvuzela box. Validate all pages to the end.

Now when watching a game, press menu, you'll see an entry "Toggle Vuvuzela Filter"

The vuvuzela filter is disabled by default, and needs to be manually enabled each time

Attachments (7)

vuvuzela.patch (20.7 KB) - added by JYA 9 years ago.
Vuvuzela filter
vuvuzela-fixes.patch (21.6 KB) - added by JYA 9 years ago.
0.23-fixes version
vuvuzela-trunk25124.patch (22.5 KB) - added by JYA 9 years ago.
Vuvuzela filter patch for trunk
vuvuzela-trunk25124.2.patch (20.0 KB) - added by JYA 9 years ago.
Updated to remove weight sum with original signal
vuvuzela-fixes.2.patch (24.0 KB) - added by JYA 9 years ago.
Updated version for 0.23-fixes
vuvuzela-trunk25136.patch (19.6 KB) - added by JYA 9 years ago.
Patch for SVN > r25136
vuvuzela-trunk25165.patch (20.2 KB) - added by JYA 9 years ago.
Updated version for trunk 25165

Download all attachments as: .zip

Change History (18)

Changed 9 years ago by JYA

Attachment: vuvuzela.patch added

Vuvuzela filter

comment:1 Changed 9 years ago by bauner

can you pls post your patch for recent 0.23 fixes also? I will try it, but in 0.23 I don't find some files that you patch.

I'm not firm with c++ so I can't do the changes by myself

comment:2 Changed 9 years ago by Raymond Wagner

Please keep requests and discussion on the mailing lists.

comment:3 Changed 9 years ago by JYA

New version supports AC3 and DTS audio (and any format for that matter).

Attached version for trunk, you'll need SVN trunk >= r25124, as there were two bugs preventing it to work properly.

Attached version for 0.23-fixes

Changed 9 years ago by JYA

Attachment: vuvuzela-fixes.patch added

0.23-fixes version

comment:4 Changed 9 years ago by MarcT <myrdhn@…>

trunk 25124 version does not actually apply cleanly.

Hunk 3 of audiooutputbase.cpp fails because the section of code in trunk is

settings.samplerate == source_samplerate && settings.use_passthru == passthru && lneeds_upmix == needs_upmix && lreenc == reenc && lsource_channels == source_channels && lneeds_downmix == needs_downmix;

The patch is looking for

settings.samplerate == source_samplerate && settings.use_passthru == passthru && lneeds_upmix == needs_upmix && lreenc == reenc && lneeds_downmix == needs_downmix;

Changed 9 years ago by JYA

Attachment: vuvuzela-trunk25124.patch added

Vuvuzela filter patch for trunk

comment:5 Changed 9 years ago by JYA

update trunk patch..

Changed 9 years ago by JYA

Attachment: vuvuzela-trunk25124.2.patch added

Updated to remove weight sum with original signal

comment:6 Changed 9 years ago by JYA

I updated the patch, removing 465 and 235Hz frequencies only. Also made the filter more aggressive. I'm quite pleased with the result now... will give it a rest for now.

Will find why the 0.23-fixes patch doesn't work sometimes with AC3 5.1 audio and update with the new filter paramaters

comment:7 in reply to:  5 Changed 9 years ago by Jonathan Martens <jonathan@…>

Replying to jyavenard:

update trunk patch..

Not sure if that is intended (or desired) but this patch seems to make some white space changes to mythtv/libs/libmythtv/tv_play.cpp which are irrelevant to the changes in this bug.

comment:8 Changed 9 years ago by JYA

It aligns all the strings together, the way they were aligned before... Feel free to revert those changes before applying the patch, who knows, it may compile faster :P

Changed 9 years ago by JYA

Attachment: vuvuzela-fixes.2.patch added

Updated version for 0.23-fixes

comment:9 Changed 9 years ago by JYA

The new version fixes issues with multi-channels audio and AC3 tracks.

It relies on using 0.23-fixes r25135 and greater as the bug was in the upstream code and got fixed.

Changed 9 years ago by JYA

Attachment: vuvuzela-trunk25136.patch added

Patch for SVN > r25136

Changed 9 years ago by JYA

Attachment: vuvuzela-trunk25165.patch added

Updated version for trunk 25165

comment:10 Changed 9 years ago by robertm

Status: newinfoneeded_new

Jean-Yves,

Just infoneeding this as I work through tickets since I think you mentioned wanting to close it post-world-cup. Feel free to undo that if I misunderstood.

comment:11 Changed 9 years ago by JYA

Resolution: wontfix
Status: infoneeded_newclosed

World cup is over, and hopefully so are the vuvuzelas.

Note: See TracTickets for help on using tickets.