Podblock is a Autohotkey script that utilizes FFMpeg and predefined text-strings to sift through subtitled audio and trim out unwanted segments.
This can be used to wholly remove ads and/or all filler content from your favorite podcasts.
The use-case for this project may be niche, as casual podcast listeners may prefer to manually Skip Forward while listening.
This is very much still a WIP, so this script is very hands-on in terms of use and should NOT be used automatically.
AI-powered alternatives exist and may prove better, but they are cost-prohibitive and power-intensive. This set of tools are a mostly non-AI solution to this.
You will need to setup lists of keywords/phrases for the script to search through to mark the unwanted audio.
Once your keyword bank is built, you can expect to spend about 1-2 minutes per episode you edit. On some more ad-heavy podcasts, this has saved me up to 15 minutes of audio playback.
Whether this is worth the effort is up to you.
- Supports only MP3 audio files currently.
- Support SRT/VRT subtitles.
- Integration with YT-dlp, Sponsorblock, FFMpeg, SyncThing
- Included Adsniffer utility
- Custom podcast name defines
- Custom sponsor defines
- Support for Intro/Outro segments
- yt-dlp - YouTube downloader
- gPodder - RSS downloader
- easy-whisper-ui - Local AI transcription tool
- Notepad++ - Text editor
- qttabbar - Extension to add tabbing functionality and multi-views to Windows Explorer.
- SyncThing - Sync finished files between your devices
- Podcast Republic - Podcast app that allows importing audio files.
Clone the Github repo and install above dependencies.
You will need pre-downloaded audio files/subtitles to use this script.
See the 2 preferred methods to download podcasts.
Search YouTube and copy the URL(s) of the podcasts you'd like to edit.
Run Podblock\DL\.ytdlp.bat for single downloads.
For batch downloads, copy all URLs into Podblock\DL\Queue\.Queue.txt and run Podblock\DL\.ytdlp-Queue.bat.
As YouTube has autogenerated transcription, the YT-dlp scripts will download all subtitles automatically.
Additionally, they are setup so Sponsorblock is used, greatly decreasing the manual oversight needed with this script.
For podcasts that are unavailable on YouTube, you can download them through its official RSS feed.
gPodder is a nice tool to see these visually and download them locally to your computer.
Unfortunately, this method does not include already-made subtitles and the use of local transcription models can be used to remedy this.
WhisperUI can be used on your computer locally to generate subtitles for audio content.
Here are the settings I have for my setup.
At the time of writing this, I am using a RTX 5070TI for transcribing, which takes around 45s/1hr audio.
To start, run Podblock\DL\.GeneratePodcastDirs.ahk and enter the name of the podcast. This will generate the relevent folder structures needed.
Each podcast you edit, you will need to build a library of keywords/phrases for the script to look out for. These will be your podcast-specific rules.
You will find examples of these in the Podblock\Podblock folder.
Each podcast will have a "Sponsors" folder, which is composed of multiple TXT files for the Podblock.ahk script to parse through.
Each TXT file under the Sponsors folder uses the same format. The first line is the beginning of the segment. The second line is the end of the segment.
You will want to make the Sponsors text files to be precise enough to be found, but unique enough so that they are not called early.
The Intro/Outro.txt files can be multiple lines as they indicate the start and ends of the podcast.
Once you have your podcast rules set, you can begin editing.
Podblock can process one audio file at a time. Place one downloaded .mp3 and subtitle file in the root directory next to Podblock.ahk. Do not add multiple files to the root directory or the script may break.
You can use Adsniffer.ahk to detect common words/phrases that may indicate if an ad break is present, which will assist in writing more precise podcast rules.
Run Podblock.ahk. A command prompt window will popup as your audio file is being converted with FFMpeg.
You will see it creates two TXT files in the root directory, named Log.txt and output.txt. Log.txt will denote the audio segments being removed and output.txt will denote the second timestamps being passed to FFMpeg for the final edit.
If you find the incorrect segments have been cut, you will need to check the above two files for where the script marked the cut. The podcast rules might need to be narrowed.
The original audio and subtitle files will be moved to the Archive folder.
The finished converted file will be moved to Output\YourPodcastName.
Once you begin editing files in bulk, you may want to have the finished podcast episodes sync to your phone or tablet for listening on the go.
You can setup SyncThing to monitor your Output folder and sync to your local device, then import the audio files into your preferred podcast player.