Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dockerfile with docker-compose for easy volume mounts for input/output #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ remux
bin/
samples/
*.mp4
*.ubv
*.h264
*.aac
~*
Expand Down
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM golang:1.15

ENV PATH=$PATH:/opt/unifi-protect-remux
WORKDIR /opt/unifi-protect-remux
COPY . /opt/unifi-protect-remux

RUN apt-get update && apt install xz-utils -y \
&& rm -rf /var/lib/apt/lists/* \
# install ffmpeg
&& curl --fail -L --silent --show-error https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz > ffmpeg.tar.xz \
&& tar xf ffmpeg.tar.xz --directory /usr/local/bin/ --strip-components 1 \
&& rm ffmpeg.tar.xz \
# install ubnt_ubvinfo
&& curl --fail -L --silent --show-error https://archive.org/download/ubnt_ubvinfo/ubnt_ubvinfo > ubnt_ubvinfo \
&& chmod u+x ubnt_ubvinfo \
# build remux
&& make package
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ A helper script is provided for this:
2. Next, transfer the .ubv and the .ubv.txt file(s) back to your main system.
3. Finally, run the remux binary locally on the .ubv file; the tool will automatically find and use the .ubv.txt file prepared on your Protect system.

From Docker
-----------

docker-compose run --rm remux -with-audio -output-folder /srv/unifi-protect/output-video ./input-video/*.ubv

BUILD FROM SOURCE
=================
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.7'

services:

remux:
build:
context: .
volumes:
- ./input-video:/srv/unifi-protect/input-video
- ./output-video:/srv/unifi-protect/output-video
entrypoint: /opt/unifi-protect-remux/remux
Empty file added input-video/.gitkeep
Empty file.
Empty file added output-video/.gitkeep
Empty file.