Veriying DCP on Synology NAS via CLI
-
- Posts: 27
- Joined: Sun Jul 17, 2022 12:32 pm
Veriying DCP on Synology NAS via CLI
I'm working on a managed DCP system that ingests DCPs and performs various tasks. One task in this process would be verifying the DCP, which I currently do with the DCP-o-matic Player manually. I wonder if there was a way to do the same via CLI on a Synology NAS.
-
- Site Admin
- Posts: 2852
- Joined: Thu Nov 14, 2013 2:53 pm
Re: Veriying DCP on Synology NAS via CLI
There is a command-line tool dcpomatic2_verify_cli that does the same verification as the player, but from the command line. Perhaps that's what you need?
-
- Posts: 27
- Joined: Sun Jul 17, 2022 12:32 pm
Re: Veriying DCP on Synology NAS via CLI
Thank you, Carl. That's what I need indeed. Unfortunately, I require it to work on my Synology NAS. As far as I can see, there is no simple way of making this work. Maybe you have some advice?
-
- Posts: 309
- Joined: Mon Nov 13, 2017 8:40 pm
- Location: Iceland
Re: Veriying DCP on Synology NAS via CLI
Does your Synology NAS support docker images or virtual machines?
Maybe you could run a Debian and mount the DCP storage, in order to install the DCP-o-matic and point it there.
Or run a container (from what image...?) and run the proper command, pointing to the folder in question.
Easiest way is not what you are asking for. Is to mount the DCP storage on a PC and point the verifier (UI or CLI) to that.
Let it pick up the DCPs* and verify them.
*Mind you, for the time being, if for any reason a DCP folder is inside another, the enclosed one won't show up.
But if you are running the CLI version, you may run a shell command like:
to check what may slip the verifier's attention.
Maybe you could run a Debian and mount the DCP storage, in order to install the DCP-o-matic and point it there.
Or run a container (from what image...?) and run the proper command, pointing to the folder in question.
Easiest way is not what you are asking for. Is to mount the DCP storage on a PC and point the verifier (UI or CLI) to that.
Let it pick up the DCPs* and verify them.
*Mind you, for the time being, if for any reason a DCP folder is inside another, the enclosed one won't show up.
But if you are running the CLI version, you may run a shell command like:
Code: Select all
find ./* -iname "ASSETMAP"*
-
- Posts: 27
- Joined: Sun Jul 17, 2022 12:32 pm
Re: Veriying DCP on Synology NAS via CLI
Thank you for your suggestions. Here’s what worked: you can’t install the Ubuntu .deb directly on Synology DSM, so I ran the DCP-o-matic CLI inside a Docker container based on Ubuntu (24.04 LTS). I copied the matching Ubuntu-specific CLI .deb into the image and installed it with apt so dependencies resolve automatically, then launched the container mounting my DCP folder read-only and a reports folder for output. Finally, I added a tiny host-side wrapper (dom-verify) so I can run dcpomatic2_verify_cli -o <report.html> <DCP> from anywhere on the NAS.
I’m not a Docker pro, so there may be cleaner ways to do this — but this setup works for me. I used ChatGPT to help figure it out.
It might be useful to somebody else. There might be things that chatgpt got wrong and people might want to point out issues. So, here we go:
I’m not a Docker pro, so there may be cleaner ways to do this — but this setup works for me. I used ChatGPT to help figure it out.
It might be useful to somebody else. There might be things that chatgpt got wrong and people might want to point out issues. So, here we go:
- Download the correct CLI
Code: Select all
wget "https://www.dcpomatic.com/dl?id=ubuntu-24.04-x86-cli&version=2.18.22" \
-O /volume1/docker/dcpomatic-cli/dcpomatic-cli_2.18.22_ubuntu24.04_amd64.deb
- Create Dockerfile
Code: Select all
cat > /volume1/docker/dcpomatic-cli/Dockerfile << 'EOF'
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
# Basis
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates tzdata \
&& rm -rf /var/lib/apt/lists/*
# Genau eine 24.04-CLI .deb im Build-Ordner
COPY ./*.deb /tmp/
# Installiere .deb + Dependencies
RUN apt-get update \
&& apt-get install -y /tmp/*.deb \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /tmp/*.deb
WORKDIR /work
ENTRYPOINT ["dcpomatic2_verify_cli"]
EOF
- Build Docker Image and test
Code: Select all
cd /volume1/docker/dcpomatic-cli
docker build --no-cache -t dcpomatic-cli:24.04 .
docker run --rm dcpomatic-cli:24.04 --help
- Create Wrapper
Code: Select all
# 1) Zielordner sicherstellen
mkdir -p /usr/local/bin
# 2) Wrapper schreiben
cat > /usr/local/bin/dom-verify << 'EOF'
#!/bin/sh
# Usage: dom-verify /path/to/DCP
if [ -z "$1" ]; then
echo "Usage: dom-verify /path/to/DCP" >&2
exit 1
fi
IN="$1"
DIR=$(cd "$(dirname "$IN")" 2>/dev/null && pwd) || exit 2
BASE=$(basename "$IN")
DCP_PATH="$DIR/$BASE"
REPORT_DIR="/volume1/verify-reports"
mkdir -p "$REPORT_DIR"
STAMP=$(date +%F_%H%M%S)
NAME=$(basename "$DCP_PATH")
REPORT_FILE="$REPORT_DIR/${NAME}_$STAMP.html"
docker run --rm \
--name dom-verify-run \
--network none \
-e TZ=Europe/Zurich \
-v "$DIR":"$DIR":ro \
-v "$REPORT_DIR":"$REPORT_DIR" \
dcpomatic-cli:24.04 \
-o "$REPORT_FILE" "$DCP_PATH"
RET=$?
echo "Report: $REPORT_FILE"
exit $RET
EOF
# 3) Ausführbar machen
chmod +x /usr/local/bin/dom-verify
- Test & GO
Code: Select all
/usr/local/bin/dom-verify "/volume1/towl-01-dcp/DCP-Folder"
-
- Site Admin
- Posts: 2852
- Joined: Thu Nov 14, 2013 2:53 pm
Re: Veriying DCP on Synology NAS via CLI
Sounds good. It may be possible to make debs for the Synology operating system but I'm not sure if the demand would be high enough to make it worth the effort/compute resources.
-
- Posts: 309
- Joined: Mon Nov 13, 2017 8:40 pm
- Location: Iceland
Re: Veriying DCP on Synology NAS via CLI
A docker image could be appealing to a wider audience, since it covers more contemporary NAS systems.
(Quite a few, nowadays, support VMs and/or Docker containers<images.)
I am not sure if the same images would/could support AWS, I think not.
What I could consider, though, would be whether all DCP-o-matic applications would worth the while.
Definitely the verifier, while similar apps (Clairmeta, dcp_inspect) had their (now abandoned) images made. But the others might be of less interest, as a NAS wouldn't have to contribute much „horsepower“ to encoding (main app, batch converter or encode server) or decoding (player).
And then, if the verifier is not to support KDM integration in the future, even less is needed.
(Quite a few, nowadays, support VMs and/or Docker containers<images.)
I am not sure if the same images would/could support AWS, I think not.
What I could consider, though, would be whether all DCP-o-matic applications would worth the while.
Definitely the verifier, while similar apps (Clairmeta, dcp_inspect) had their (now abandoned) images made. But the others might be of less interest, as a NAS wouldn't have to contribute much „horsepower“ to encoding (main app, batch converter or encode server) or decoding (player).
And then, if the verifier is not to support KDM integration in the future, even less is needed.