OliveTin for Channels: An Interface for Misc Channels DVR Scripts & Tricks

Stop the stack, change this section of your docker-compose to look like this, and restart:

    volumes:
      - ${HOST_DIR}/olivetin:/config # Add the parent directory on your Docker you'd like to use
      - ${DVR_SHARE}:/mnt/192.168.50.68-8089 # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR network share

Sorry it took so long.

true
Current CDVR Comskip status:
{"available":true,"customized":false,"enabled":true,"ini":{"always_keep_first_seconds":"60","always_keep_last_seconds":"300","min_commercialbreak":"45"},"queued":1}

Settings as used in the most recent Comskip run. Assumes no override file in use:

Current compskip.ini:
----------------------------------------

verbose=10
detect_method=123 ;; everything but scenechange
punish_no_logo=0
cc_correct_type_modifier=1
length_nonstrict_modifier=1.5 ;; required before below due to comskip.ini parsing bug
combined_length_nonstrict_modifier=1
min_show_segment_length=222
min_commercialbreak=45
use_existing_logo_file=0
logo_fraction=0.39
delete_logo_file=1
output_vdr=1
output_edl=1
output_ffmeta=1
output_ffsplit=1
always_keep_first_seconds=60
always_keep_last_seconds=300
min_commercialbreak=45
thread_count=1
----------------------------------------

If you need to use an override file it should be placed in this directory on your CDVR server:
C:\ProgramData\ChannelsDVR\data

Save this text as compskip.ini in the location referenced above:
----------------------------------------

verbose=10
detect_method=123 ;; everything but scenechange
punish_no_logo=0
cc_correct_type_modifier=1
length_nonstrict_modifier=1.5 ;; required before below due to comskip.ini parsing bug
combined_length_nonstrict_modifier=1
min_show_segment_length=222
min_commercialbreak=45
use_existing_logo_file=0
logo_fraction=0.39
delete_logo_file=1
output_vdr=1
output_edl=1
output_ffmeta=1
output_ffsplit=1
always_keep_first_seconds=60
always_keep_last_seconds=300
min_commercialbreak=45
thread_count=1
----------------------------------------
1 Like

That's what we want to see! Thanks for hanging in there...

My Problem is that I am like a dog with a bone .. once I start it have to finish it thanks.

version: '3.9'
services:
  olivetin:
    image: bnhf/olivetin:${TAG} # Add the tag like latest or test to the environment variables below
    container_name: olivetin
    ports:
      - 1337:1337
    environment:
      - CHANNELS_DVR=${CHANNELS_DVR} # Add your Channels DVR server in the form hostname:port or ip:port
      - CHANNELS_CLIENTS=${CHANNELS_CLIENTS} # Space separated list of Channels DVR clients you'd like notifications sent to in the form hostname or IP
      - UPDATE_YAMLS=${UPDATE_YAMLS} # Set this to true to update config.yaml
      - UPDATE_SCRIPTS=${UPDATE_SCRIPTS} # Set this to true to update all included scripts
      - TZ=${TZ} # Add your local timezone in standard linux format. E.G. US/Eastern, US/Central, US/Mountain, US/Pacific, etc
    volumes:
      - ${HOST_DIR}/olivetin:/config # Add the parent directory on your Docker you'd like to use
      - ${DVR_SHARE}:/mnt/192.168.50.68-8089
    restart: unless-stopped

  static-file-server:
    image: halverneus/static-file-server:latest
    container_name: static-file-server
    ports:
      - 8080:8080
    environment:
      - FOLDER=${FOLDER}
    volumes:
      - ${HOST_DIR}/olivetin/data:${FOLDER}
    restart: unless-stopped

#volumes: # use this section if you've setup a docker volume named channels-dvr, with CIFS or NFS, to bind to /mnt/dvr inside the container. Set ${HOST_DIR} to channels-dvr (HOST_DIR=channels_dvr) in that example
  #channels-dvr:
    #external: true
1 Like

Sigh, I thought linux would be included with the Docker install. I got ubunto up and running, I can access it through cmd or powershell if I type wsl.exe --install, but if I simply type wse.exe I get a bunch of "Failed to Translate" errors, probably because I still haven't set up my environment.

From the old days I know how to set up things in my $HOME/<user_id> folder .bashrc files, etc. but Docker posts warn not to do this. a) if I know what I am doing can I just go ahead b) if I don't do it by editing those files, am I supposed to use docker settings to do it?

I Plan to look for some you tube videos, subject install/setup "WSL for Windows". If that is going to get me through this part, no need to respond with any details.

2 Likes

Can you give me a few examples of the criteria to be matched?

Also, are you talking about creating an M3U from this, or are you hoping this would become a new "Channel Collection"?

If it's the former, as long as the data exists to match it shouldn't be a problem. If it's the latter, I don't know of any public or private API support for something like that.

1 Like

Yes, it's an i7 laptop running WIn 10. I have linux/bash experience, just having a little trouble setting up WSL, environment params, and finding things. I'll be looking to put some command aliases in my .profile, set up command history, vim, etc.

I pulled the latest to look at the new comskip function. When I pull down the DVR menu it seems to not be picking up the CHANNELS_DVR environment variable.

Oops! Those are my servers -- I'll fix that now...

@cyoungers Can you pull :latest again and confirm that it's fixed for me?

Perfect. DVR pulldown looks good. I'm seeing my server.

1 Like

When I added a Channels DVR ALERNATE server it overrode yours.

1 Like

You should re-pull latest and remove that value from CHANNELS_DVR_ALTERNATES

maybe change the test environment also in the future.

Actually, I generally delete :test once :latest has its features. It'll reappear again once I implement something that I want someone more than just me to take for a spin.

1 Like

Some searching found the attached post elsewhere. Apparently Docker-Desktop sets its own WSL distribution as the default, and that was giving me (an old linux user) a bunch of confusion.

2 Likes

New :latest and :2024.03.02 pushed incorporating 3.1.0 updates to:

More help please. I've got WSL (Ubuntu) running, docker installed (via docker desktop), and a compose.yaml as shown below. I know docker is there because I get the expected response to docker --help and docker-compose --help. My guess was to run docker-compose -f compose.yaml but nothing happened. What do I need to fix? (xxx.xxx.xxx.xxx is the ip of my local Channels server)

version: '3.9'
services:
  olivetin:
    image: bnhf/olivetin:latest 
    container_name: olivetin
    ports:
        - 1337:1337
    environment:
      - CHANNELS_DVR= http://xxx.xxx.xxx.xxx:8089
      - CHANNELS_CLIENTS=”TS4K 1” “TS4K 2”
      - UPDATE_YAMLS=TRUE
      - UPDATE_SCRIPTS=TRUE
      - TZ=US/Eastern
    volumes:
      - /mnt/c/Program Files/Docker/Docker/Data/olivetin:/config
      - /mnt/xxx.xxx.xxx.xxx
    restart: unless-stopped
    
  static-file-server:
    image: halverneus/static-file-server:Latest
    container_name: static-file-server
    ports:
      - 8080:8080
    environment:
      - FOLDER=/Web
    volumes:
      - /mnt/c/Program Files/Docker/Docker/Data/olivetin/data:/Web
    restart: unless-stopped

Though it is possible to do this via the command line, I don't support it that way -- only via Portainer. There are enough variables with this kind of thing without dealing with all of the different ways it can be run. Given the "stack" nature of this project, and the multiple environment variables Portainer makes things easier -- and more cross-platform.

So, you've got Docker Desktop running, and have added the Portainer extension -- if I remember correctly. Now's the time time to fire-up Portainer's excellent WebUI, and paste in the following to Portainer-Stacks:

version: '3.9'
services:
  olivetin:
    image: bnhf/olivetin:${TAG} # Add the tag like latest or test to the environment variables below
    container_name: olivetin
    dns_search: ${DOMAIN} # For Tailscale users using Magic DNS, add your Tailnet (tailxxxxx.ts.net) to use hostnames for remote nodes, otherwise use your local domain name
    ports:
      - 1337:1337
    environment:
      - CHANNELS_DVR=${CHANNELS_DVR} # Add your Channels DVR server in the form hostname:port or ip:port
      - CHANNELS_DVR_ALTERNATES=${CHANNELS_DVR_ALTERNATES} # Space separated list of alternate Channels DVR servers to choose from in the form hostname:port or ip:port
      - CHANNELS_CLIENTS=${CHANNELS_CLIENTS} # Space separated list of Channels DVR clients you'd like notifications sent to in the form hostname or IP
      - UPDATE_YAMLS=${UPDATE_YAMLS} # Set this to true to update config.yaml
      - UPDATE_SCRIPTS=${UPDATE_SCRIPTS} # Set this to true to update all included scripts
      - TZ=${TZ} # Add your local timezone in standard linux format. E.G. US/Eastern, US/Central, US/Mountain, US/Pacific, etc
    volumes:
      - ${HOST_DIR}/olivetin:/config # Add the parent directory on your Docker you'd like to use
      - ${DVR_SHARE}:/mnt/local-server-8089 # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR network share
      - ${DVR2_SHARE}:/mnt/remote-server-8089 # Note that these volume mounts should always be to /mnt/hostname-port or /mnt/ip-port (dash rather than a colon between)
    restart: unless-stopped

  static-file-server:
    image: halverneus/static-file-server:latest
    container_name: static-file-server
    dns_search: ${DOMAIN}
    ports:
      - 8080:8080
    environment:
      - FOLDER=${FOLDER}
    volumes:
      - ${HOST_DIR}/olivetin/data:${FOLDER}
    restart: unless-stopped

#volumes: # use this section if you've setup a docker volume named channels-dvr, with CIFS or NFS, to bind to /mnt/dvr inside the container
  #channels-dvr:
    #external: true

And then, in the environment section of Portainer -- in Advanced mode, paste in the following:

TAG=latest
DOMAIN=tailxxxxx.ts.net
CHANNELS_DVR=local-server:8089
CHANNELS_DVR_ALTERNATES=remote-server:8089
CHANNELS_CLIENTS=appletv4k-den firestick-bedroom
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Mountain
HOST_DIR=/data
DVR_SHARE=/mnt/dvr
DVR2_SHARE=/mnt/dvr2
FOLDER=/web

You'll need to modify the environment variables to suit your environment, and tweak the "volumes" section ONLY of the docker-compose to your setup. Use the comments in the docker-compose to help you with the env vars.

Based on what you posted above, your environment variables might look something like this. Note that I'm assuming your LAN domain is localdomain, also hostnames can never have spaces -- so double-check those. And, you need to figure out the full path to your Channels DVR data directory (after the /mnt/c I put in):

TAG=latest
DOMAIN=localdomain
CHANNELS_DVR=http://xxx.xxx.xxx.xxx:8089
CHANNELS_DVR_ALTERNATES=
CHANNELS_CLIENTS=TS4K1 TS4K2
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Eastern
HOST_DIR=/mnt/c/'Program Files'/Docker/Docker/Data
DVR_SHARE=/mnt/c/
DVR2_SHARE=
FOLDER=/web

And your Volumes section of the compose, should have this modification. The dash instead of a colon shown below is on-purpose, and required:

    volumes:
      - ${HOST_DIR}/olivetin:/config # Add the parent directory on your Docker you'd like to use
      - ${DVR_SHARE}:/mnt/xxx.xxx.xxx.xxx-8089 # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR network share

Thanks so much, I'll get to work on that.

1 Like