Skip to content

Commit

Permalink
chore: update paths
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <radialapps@gmail.com>
  • Loading branch information
pulsejet committed Nov 1, 2023
1 parent 12137fe commit 6d2ef1c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 50 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Memories is a _batteries-included_ photo management solution for Nextcloud with

## 🏗 Development Setup

1. ☁ Clone this into your `custom_apps` folder of your Nextcloud.
1. ☁ Clone this monorepo into the `custom_apps` folder of your Nextcloud.
1. 📥 Install [Composer](https://getcomposer.org/) and [Node.js 18](https://nodejs.org)
1. 👩‍💻 In a terminal, run the command `make dev-setup` to install the dependencies.
1. 🏗 To build/watch the UI, run `make watch-js`.
Expand Down Expand Up @@ -85,4 +85,8 @@ For the full changelog, see [CHANGELOG.md](CHANGELOG.md).

To the great folks building Nextcloud, PHP, Vue and all the other dependencies that make this project possible.

Thanks to [GitHub](https://github.com), [CircleCI](https://circleci.com/) and [BrowserStack](https://www.browserstack.com) for sponsorship for Open Source projects for CI / testing on different devices.
Thanks to [GitHub](https://github.com), [CircleCI](https://circleci.com/) and [BrowserStack](https://www.browserstack.com) for sponsorship for Open Source projects for CI / testing on different devices.

## 📄 License

Memories is licensed under the [AGPLv3](LICENSE). Subpackages such as `go-vod` are licensed under their respective licenses. See the directory of the subpackage for more information.
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Memories works out-of-the-box with most Nextcloud setups, including with externa

## Transcoding

Memories bundles a [transcoding server](https://github.com/pulsejet/go-vod) with HLS capabilites for adaptive streaming. You need to configure transcoding to be able to play any videos. HLS enables the browser to download the video as small chunks and in resolutions adaptive to the connection speed. As a result, this is usually expected to have a major boost in video experience and performance.
Memories bundles a [transcoding server](https://github.com/pulsejet/memories/tree/master/go-vod) with HLS capabilites for adaptive streaming. You need to configure transcoding to be able to play any videos. HLS enables the browser to download the video as small chunks and in resolutions adaptive to the connection speed. As a result, this is usually expected to have a major boost in video experience and performance.

You can configure transcoding from the admin panel. Make sure to test all settings carefully on different kinds of videos.

Expand Down
43 changes: 4 additions & 39 deletions docs/hw-transcoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ NVIDIA GPUs support hardware transcoding using NVENC.

!!! warning "Memories v6+ required"

This method is only supported in Memories v6 and newer. For older versions, see [below](#external-transcoder-v5).
This method is only supported in Memories v6 and newer. If you're on an old version, see the instructions [here](https://github.com/pulsejet/memories/blob/v5.5.0/docs/hw-transcoding.md#external-transcoder).

[go-vod](https://github.com/pulsejet/go-vod), the transcoder of Memories, comes with a pre-built Docker image based on `linuxserver/ffmpeg`. The docker image connects to your Nextcloud instance and pulls the go-vod binary on startup. To set up an external transcoder, follow these steps.
[go-vod](https://github.com/pulsejet/memories/tree/master/go-vod), the transcoder of Memories, comes with a pre-built Docker image based on `linuxserver/ffmpeg`. The docker image connects to your Nextcloud instance and pulls the go-vod binary on startup. To set up an external transcoder, follow these steps.

1. Use a `docker-compose.yml` that runs the go-vod container and mounts the Nextcloud data directories to it. You must specify `NEXTCLOUD_HOST` to match the name of your Nextcloud container.

Expand Down Expand Up @@ -87,41 +87,6 @@ Your external transcoder should now be functional. You can check the transcoding

You can run a similar setup without `docker-compose`. Make sure that the Nextcloud and go-vod containers are in the same network and that the Nextcloud data directories are mounted at the same locations in both containers.

## External Transcoder (v5)

!!! danger "Deprecated"

Use this method if you're running a version of Memories v5 or older. For newer versions, see [above](#external-transcoder).

[go-vod](https://github.com/pulsejet/go-vod), the transcoder of Memories, ships with a Dockerfile that already includes the latest ffmpeg and VA-API drivers. To set up an external transcoder, follow these steps.

1. Clone the go-vod repository. Make sure you use the correct tag, which can be found in the admin panel. Note that this is **not** the same as the version of Memories you run.
```bash
git clone -b <tag> https://github.com/pulsejet/go-vod
```

!!! tip "go-vod version"
Make sure you always use the correct version of go-vod corresponding to your Memories installation. If you use a different version, the admin panel will show a warning and transcoding may not work properly.

1. Use a `docker-compose` file that builds the go-vod container and mounts the Nextcloud data directories to it. The directory containing the `docker-compose.yml` must contain the `go-vod` repository in it. You can then run `docker compose build` to build the image and `docker compose up -d` to start the containers.
```yaml
# docker-compose.yml

services:
server:
image: nextcloud
volumes:
- ncdata:/var/www/html

go-vod:
build: ./go-vod
restart: always
devices:
- /dev/dri:/dev/dri
volumes:
- ncdata:/var/www/html:ro
```

## Internal Transcoder

Memories ships with an internal transcoder binary that you can directly use. In this case, you must install the drivers and ffmpeg on the same host as Nextcloud, and Memories will automatically handle starting and communicating with go-vod. This is also the default setup when you enable transcoding without hardware acceleration.
Expand All @@ -134,7 +99,7 @@ Memories ships with an internal transcoder binary that you can directly use. In
!!! tip "NVENC"

These instructions mostly focus on VA-API. For NVENC, you may find further useful
pointers in [this](https://github.com/pulsejet/go-vod/blob/master/build-ffmpeg-nvidia.sh) build script.
pointers in [this](https://github.com/pulsejet/memories/blob/master/go-vod/build-ffmpeg-nvidia.sh) build script.

### Bare Metal

Expand Down Expand Up @@ -178,7 +143,7 @@ sudo -u www-data \

!!! warning "Beware of old ffmpeg and driver versions"

Some package repositories distribute old ffmpeg versions that do not support some modern hardware. (e.g., the VA-API driver installed by `apt` in the current debian image used by Nextcloud only supports up to 10th generation Intel Ice Lake CPUs). To ensure you have a compatible version, you may want to remove your existing ffmpeg version and build the drivers and ffmpeg from source. [This script](https://github.com/pulsejet/go-vod/blob/master/build-ffmpeg.sh) for VA-API or [this one](https://github.com/pulsejet/go-vod/blob/master/build-ffmpeg-nvidia.sh) for NVENC might be useful.
Some package repositories distribute old ffmpeg versions that do not support some modern hardware. (e.g., the VA-API driver installed by `apt` in the current debian image used by Nextcloud only supports up to 10th generation Intel Ice Lake CPUs). To ensure you have a compatible version, you may want to remove your existing ffmpeg version and build the drivers and ffmpeg from source. [This script](https://github.com/pulsejet/memories/blob/master/go-vod/build-ffmpeg.sh) for VA-API or [this one](https://github.com/pulsejet/memories/blob/master/go-vod/build-ffmpeg-nvidia.sh) for NVENC might be useful.

### Docker

Expand Down
6 changes: 1 addition & 5 deletions go-vod/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# go-vod

Extremely minimal on-demand video transcoding server in go. Used by the FOSS photos app, [Memories](https://github.com/pulsejet/memories).

## Filing Issues

Please file issues at the [Memories](https://github.com/pulsejet/memories) repository.
Extremely minimal on-demand video transcoding server in go.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion lib/Service/BinExt.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class BinExt
{
public const EXIFTOOL_VER = '12.60';
public const GOVOD_VER = '0.1.25';
public const GOVOD_VER = '0.2.2';
public const NX_VER_MIN = '1.1';

/** Get the path to the temp directory */
Expand Down
4 changes: 2 additions & 2 deletions scripts/get-bin-ext.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ chmod 755 exiftool/exiftool

# Get go-vod prebuilt binaries
echo "Getting go-vod $GOVOD_VER"
wget -q "https://github.com/pulsejet/go-vod/releases/download/$GOVOD_VER/go-vod-amd64"
wget -q "https://github.com/pulsejet/go-vod/releases/download/$GOVOD_VER/go-vod-aarch64"
wget -q "https://github.com/pulsejet/memories/releases/download/go-vod/$GOVOD_VER/go-vod-amd64"
wget -q "https://github.com/pulsejet/memories/releases/download/go-vod/$GOVOD_VER/go-vod-aarch64"
chmod 755 go-vod-*

# Check the version of go-vod is correct internally
Expand Down

0 comments on commit 6d2ef1c

Please sign in to comment.