An AdBlocker (Ad-Muter) for TV. When ads appear in between programs, the TV audio will be muted and when program comes back on, TV is unmuted. Completely offline and runs on a Raspberry Pi.
A simple, cheap, extension to your Raspberry Pi for blocking/muting ads on TV.
When ads start to appear after a program, ADBTV will recognize the advertisement audio and will send an Infrared signal to the TV asking it to mute. When the ads end, TV will be unmuted and audio will continue.
Audio from set-top-box (STB) is routed to the Raspberry Pi and TV is asked to mute. So, audio will be continuously received in the Raspberry Pi. And when ads end, the TV will unmute again
- Raspberry Pi
- Infrared Emitter
- USB Sound Card since Raspberry Pi doesn't support audio input
- Your set-top-box (STB) probably support AV output, then connect a 3.5mm-RCA-Female cable to it and then connect a AUX-Male-3.5mm cable to the USB sound card
- Test if audio from STB reaches Raspberry Pi by using
pavucontrolor Audacity or other voice recording softwares
- Clone into your Raspberry Pi
pipenv install- Setup postgres database, copy
.env.exampleto.envand edit config
- Follow tutorial https://devkimchi.com/2020/08/12/turning-raspberry-pi-into-remote-controller/
- Connect infrared emitter. Connect the TX pin to
GPIO17 - Setup lirc
- Reverse image search photo of remote
- Get remote config file from remotes database. Example: https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/samsung/AA59-00382A.lircd.conf
- Test lirc with
irsend LIST Samsung_AA59-00382A "" irsend SEND_ONCE Samsung_AA59-00382A KEY_POWER - Edit remote config values in
.env - Test by running
ir-test.py
- Connect infrared emitter. Connect the TX pin to
- Run the adblocker by running
adbtv.py - ADBTV web interface runs on port 8100
Scripts :
record-ad.py- For recording adsscan.py- Scan for ads, no blockingscan-block.py- Scan for ads, and block (mute) them, but no unmutescan-block-unblock.py- Scan, block ads and unblock when no ad is detectedadbtv.py- Run the web interface and blocker. The main script
- Keep the audio level coming into rasppi to a standard, peak should reach -3dB only. Use
pavucontrolfor this - From experience, audio recognition has correlation with the volume of the audio
- Instead of mute, decrease/increase volume. Helps much in false positives
- Improve audio recognition. Volume has a significant effect on detection