Comskip error in docker image

I’m getting the following error in the logs with commercial skipping enabled:

2017/11/23 17:00:00 [DVR] Commercial detection failed with fork/exec /channels-dvr/2017.11.16.0140/comskip: no such file or directory

When I go into the image I see that comskip is in the expected location but when I try to execute it I get “file not found” from the shell.

/ # /channels-dvr/2017.11.16.0140/comskip
/bin/sh: /channels-dvr/2017.11.16.0140/comskip: not found

I haven’t seen something like that one before. Ideas? I even deleted the container and the image and pulled/started them again thinking the underlying image might be corrupt on my side, but nope.

Are you using the official docker container?

What does “file comskip” say?

Can you copy/paste the OS/CPU section from the top of the DVR settings page?

I’m getting the same error I’m using the unRaid Docker

ASUS All Series
Linux Alpine
3.3.3 (kernel: 4.9.30-unRAID)
CPU
12 cores / Intel® Core™ i7-6800K CPU @ 3.40GHz

Thank you

1 Like

Official container. File claims it’s not there.

OS
Gigabyte Technology Z97X-SLI
Linux Alpine
3.3.3 (kernel: 4.4.0-101-generic)
CPU
4 cores / Intel® Core™ i5-4590 CPU @ 3.30GHz

I ran “file” from the docker host and noticed that comskip is dynamically-linked and the other binaries are static.

channels-dvr:        ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=34f55afd422d733dba17184ea251339f55c18b2c, not stripped
comskip:             ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=f2de54c0cf73e17cb4ff183cf79a50a1aa27b07b, stripped
ffmpeg:              ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=221522e57875cff4520eb7dd9cef66ccd145f0fb, stripped
ffprobe:             ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=16d183b1a10c04c58dcb2c8b4525ec48a2e16f42, stripped

The library “/lib64/ld-linux-x86-64.so.2” does not exist inside the docker image. That appears to be the issue.

Okay, I see the problem now. The comskip build that’s being downloaded in the install script is presuming a full Linux install with many other libraries, but the Docker image is based on a lightweight image that doesn’t have a full kit installed (it’s using busybox and libmusl). As such, comskip can’t run. The “not found” message is that it can’t find /lib64/ld-linux-x86.so.2 to run the program with, but you can’t just drop that in because ldd shows a whole ton more libraries from /usr/local/lib that aren’t installed, either.

Basically, the 2017.11.16.0140 build of comskip is only built for a desktop Linux and not a docker Linux. Either the base OS of the image needs to be something like a minimal Ubuntu or comskip needs to be built and linked inside a docker image with similar libraries and a full development kit installed. The former is probably the saner change from a stability and supportability aspect.

PS: Oh, and I tried to run that binary in my host OS and it segfaulted. Though I found the INI file it was using in the Logs directly and ran my own copy of comskip using that and while it made all the right sidecar files I’m not seeing the Channels UI update to reflect that comskip was run. Is there a database flag to set, or a different location for those sidecar files? How would one run this manually in a way that Channels will pick up the results from, basically?

I have a fix for this in the works. Comskip is supposed to be statically linked like the other binaries.

Use this command to upgrade to the fixed version:

curl -XPUT http://x.x.x.x:8089/updater/check/2017.11.25.0219

Alright, it appears statically-linked and runs in the container. How to I make it go back and run over previous recordings to verify?

You would have to do it manually. Find the file-XXX id from the log, then run:

curl -XPUT http://x.x.x.x:8089/dvr/files/XXX/recomskip

Thank you for the update everything is working as expected.

1 Like