ComGone was inspired by ComChap and comskip. It will analyze a video and remove the commercials.
1.9K
ComGone will analyze a video episode file (using Comskip) and remove the commercials. Code repository can be found here: https://codeberg.org/lakestonelabs/comgone
**IMPORTANT:** There are breaking changes beginning with version 0.7.0. Please see the RELEASE_NOTES.md for details.id -u and id -g on your host to get these values.~/.comskip.ini fileComGone can be ran in daemon mode for post-processing, or on-demand via the docker run command. Prebuilt container images can be found here: https://hub.docker.com/r/lakestonelabs/comgone
| Name | Values | Description |
|---|---|---|
| DAEMON_MODE | socket, network | How to accept input from external programs |
| MAX_WORKERS | 1 - X | How many simultaineous worker processes to run at once |
| RECURSIVE | true, false | Search recursively for files to process. Not available in deamon nor single-file mode. |
| OVERWRITE_ORIGINAL | true, false | Replace the original file with the commercial-free version (regardless of file extension) |
| KEEP_EDL | true, false | Keeps the file which marks the start/end boundaries of commercials for each input file |
| VERBOSE | true, false | Print extra info when processing files. |
| OUTPUT_CONTAINER | string | The container name (file extension) to use for the output regardless of input container. Defaults to 'mkv' |
| LISTEN_PORT | intgeger (4746) | The port to listen on when in daemon mode (make sure to alter the docker port params to match this) |
Daemon mode is to be used for on-demand sending of dynamically-created videos for commercial processing. This would be "post-processing" for Jellyfin's DVR functionality. So when Jellyfin is finished recording a DVR show it will then send said recording to ComGone.
The<full_root_path_to_vides> volume must be exposed to the container. The path exposed to the container (right side of the colon) MUST MATCH that
of the path used in your other program (Jellyfin, etc.) that's generating the videos. For example, if you're running Jellyfin in a docker
container, the Jellyfin's internal path for where the DVR shows are being written to must be used for GomGone's container
volume.
Sending video files to ComGone can be accomplished in two ways:
jellyfin-post-processing.sh script. Use this script as the "post-processing" option in Jellyfin's DVR section. See the script's usage documentation./tmp/comgone/comgone.sock). It's assumed that in
this mode you'll be sending files to be processed via the unix socket that ComGone creates for Inter Process Communication.
Therefore, the /tmp/comgone directory must be exposed to both the ComGone and Jellyfin,etc. containers./tmp/comgone directory on your host's filesystem.-v /tmp/comgone:/tmp/comgone) docker run -it -e DAEMON_MODE=socket -v /tmp/comgone:/tmp/comgone --user 1000:1000 -v /<full_root_path_to_vides>:/episodes lakestonelabs/comgone:0.7.3.2
docker run -it -e DAEMON_MODE=network -p 4746:4746 --user 1000:1000 -v /<full_root_path_to_vides>:/episodes lakestonelabs/comgone:0.7.3.2
The latest docker-compose.yml file can be found in the Codeberg repository.
services:
comgone:
image: lakestonelabs/comgone:0.7.3.2
container_name: comgone
restart: unless-stopped
user: 1000:1000
environment:
- DAEMON_MODE=<mode> # Modes: socket|network
- KEEP_EDL=false
- MAX_WORKERS=2
- OVERWRITE_ORIGINAL=true
volumes:
- <dir_to_episodes>:/episodes
ports:
- 4746:4746
When in Daemonm mode, ComGone will listen on port 4746 (or via a socket). Use the included post processing script from the git repo, or use any other script/program that can write to a raw TCP network endpoint.
It is recommended to configure your Jellyfin container with its own internal network. If you've already done so, proceed to the next step.
Use the below as an example to configure a dedicated docker network for your container in the docker-compose.yml file.
networks:
jellyfin:
driver: bridge
services:
jellyfin:
container_name: jellyfin
volumes:
- <host_path_to_drv_recordings>:/videos/tv/live/recordings
- <host_path_to_jellyfin_scripts>:/jellyfin-scripts
networks:
jellyfin:
comgone:
container_name: comgone
volumes:
- <host_path_to_drv_recordings>:/videos/tv/live/recordings
networks:
jellyfin:
jellyfin-post-processing.sh file from the git repo to a location on your host that is mounted into your Jellyfin container.
chmod +x <path_to>_jellyfin-post-processing.shPost-processing application field specify the Jellyfin's container internal path the above jellyfin-post-processing.sh file.
/jellyfin-scripts/jellyfin-post-processing.shPost-processing command line arguments field specify: comgone:4746 "{path}". If your container's network name is different then replace comgone with the correct container name.
comgone in comgone:4746.Simply supply the path to the video file you want to process at the end of the docker run command. Specify
options prior to the path.
docker run -it --user 1000:1000 -e OVERWRITE_ORIGINAL=true -v /<dir_to_episodes>:/episodes lakestonelabs/comgone:0.7.3.2 '/episodes/Game of Thrones S01E01.mkv'
Batch mode will search for video files to process based on the path passed at the end of the docker run command. Specify options prior to the path.
docker run -it --user 1000:1000 -e OVERWRITE_ORIGINAL=true -e RECURSIVE=true -e MAX_WORKERS=2 -v <dir_to_episodes>:/episodes lakestonelabs/comgone:0.7.3.2 /episodes
The below docker command will only process files that match the --date_filter criteria. Supported filter
operators are: >, >=, <, <=, ==, !==
docker run -it --user 1000:1000 -e OVERWRITE_ORIGINAL=true -e RECURSIVE=true -e MAX_WORKERS=2 -v <dir_to_episodes>:/episodes lakestonelabs/comgone:0.7.3.2 --date_filter=">= 2025-02-24" /episodes
NOTE: To kill/stop a running instance you'll need to issue Ctrl-C twice. This is because each file that is processed is given its own worker thread.
You can tune various parts of comskip program that is responsible for the actual commercial detection. To do this you
can copy the .comskip.ini file, which is baked into the container, onto your host system and change the various
settings. Some of the comskip settings are related to commercial detection and some are for performance tuning.
thread_count .comskip.ini setting for faster processing. DO NOT set to more than the max number off CPU threads on your host system.
MAX_THREADS and thread_count into account as to not exhaust your system's CPU resources..comskip.ini file are outside the scope of this project. Please refer to online discussions regarding these settings for more information.git clone https://codeberg.org/lakestonelabs/comgone.gitdocker build -t lakestonelabs/comgone:<version_tag> .This is the underlying Comskip program aborting due to video errors. These are usually caused by a video file being recorded from a bad OTA (Over The Air) signal. If you view the original video file you'll probabaly see a bunch of digital corruption/distortion/pixelation due to poor signal quality. There is nothing Comskip nor ComGon can do about this. It's recommended to check your OTA connections/antenna orientation.
Content type
Image
Digest
sha256:262818ea4…
Size
528.7 MB
Last updated
6 months ago
docker pull lakestonelabs/comgone:0.7.3.2