This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Documentation

This section contains all the documentation and guides for PersonalMediaVault.

If you have any question you cannot solve with the provided documentation, feel free to start a discussion on GitHub.

1 - Overview

What is PersonalMediaVault?

PersonalMediaVault is an open source tool you can use to create an encrypted, easy to backup and easy to access media gallery.

PersonalMediaVault is a solution to store your personal media files in a secure way, while being able to easily access them from a web browser.

What do I want it for?

You can use PersonalMediaVault to store and organize your media files, being able to securely backup them in the cloud, thanks to them being encrypted.

You can run the server in local, or in a remote server.

If you run it in a server, you can access it from multiple devices, only requiring a modern web browser.

Features

PersonalMediaVault has many useful features. Here is a list of them.

Encrypted storage

Your media files are encrypted with your password.

PersonalMediaVault uses the AES encryption algorithm, with a key length of 256 bits.

Only you, and who you allow, can access the vault. Use a strong password, combined with a password manager for more security.

Easy to backup

The vault is stored in a folder, and always in a consistent status.

You can easily make a backup of the vault by making a copy of the folder.

You can safely store your vault in any cloud service without worrying your files being accessed, since they are encrypted.

Access your vault with a web browser

PersonalMediaVault is implemented as a web application. You can run the server in local, or in a security-hardened server depending on your needs.

You can access the vault from any modern web browser, using the user-friendly and feature-rich web interface it provides.

Support for videos, audios and pictures

You can upload videos, audios or pictures to the vault.

They are automatically classified, given a thumbnail if possible, and encoded for the playback in the browser.

Each kind of media has its own player interface, with both generic and specific features.

Classify your media files with tags

You can give each media file a title, description and classify it with tags.

You can then make searches using those parameters to easily find your media files.

Use albums to create media lists

You can create ordered lists of media files by creating albums.

Albums are the perfect way to easily accessing your favorite media files, or keeping a list of media files in order.

For example a series, a music playlist or a collection of photos of a particular event.

Video player features

The web video player the tool provides has many features, including timeline previews, support for subtitles, support for multiple audio tracks, support for multiple resolutions and event timeline slices.

The audio player also has many of these features, including a sound wave animation to fill the blank space.

Image viewer features

The web image viewer has also many features, including scaling, multiple resolutions and image annotations.

With image annotations, you can add a text that appears on hovering or clicking a zone of the image. It’s very useful for translations or any extra information to add to the image.

Attachments

You can attach any file to a media file.

The attachment will also be encrypted with the same level of security and stored into the media vault, within the media file.

This can be very useful to store related documents, or original media files you don’t want to be encoded, but stored raw.

Fast and performant

PersonalMediaVault is made to be fast and performant.

The server and main tools are built with the Go programming language. The web interface has very small bundle sizes. Multiple caches are in place to further reduce latency.

Docker

PersonalMediaVault provides a Docker image, so you can easily run a server in the cloud without worrying about dependencies or installations.

You can find the images both on Docker Hub and in GitHub Packages.

Console client

PersonalMediaVault provides a command line interface client for PersonalMediaVault, so you can access your vault even from a terminal.

This CLI tool can be also used to make automated scripts, in case you need them for advanced tasks.

What is it not for?

PersonalMediaVault is not an end-to-end encryption storage service. The server is meant to be run by the owner of the media files, either in local or into a personal server.

Where should I go next?

  • Getting Started: Download, install and run PersonalMediaVault
  • Tutorials: Check out some guides and tutorials on how to use PersonalMediaVault.

2 - Getting Started

Download, install and run PersonalMediaVault

In this section we explain how to download, install and run PersonalMediaVault for the first time.

Download

Check out the Releases section on GitHub to find pre-compiled installation packages.

If you do not find installation packages for your system, you can:

Installation

Depending on your operating system, we offer you the following installation guides:

The installation guides also explain how to create a vault and run it in your system.

Next steps

After installing and creating your first vault, you may want to check out the Tutorials section for more guides and tutorial on how to use PersonalMediaVault.

2.1 - Compile from source code

Guide on how to compile PersonalMediaVault from source code

This guide explains how to compile PersonalMediaVault from source code.

Requirements

You will need the following tools installed on your system to compile PersonalMediaVault:

Install FFMpeg (Dependency)

PersonalMediaVault uses FFmpeg as a dependency to encode media, generate thumbnails among other things.

Download it from the official website and install it into your system.

Make sure the ffmpeg and ffprobe binaries are located inside /usr/bin. If they are not, please, set up the following environment variables in your system:

Variable NameDescription
FFMPEG_PATHPath to ffmpeg binary
FFPROBE_PATHPath to ffprobe binary

Clone repository

Clone the PersonalMediaVault repository with the following command:

git clone https://github.com/AgustinSRG/PersonalMediaVault
cd PersonalMediaVault

Compile backend

Navigate to the backend folder and run the compilation script:

cd backend
./build-production.sh
cd ..

The result will be a binary named pmvd. Copy it into /usr/bin

Compile backup tool

Navigate to the backup-tool folder and run the compilation script:

cd backup-tool
./build-production.sh
cd ..

The result will be a binary named pmv-backup. Copy it into /usr/bin

Compile launcher

Navigate to the launcher folder and run the compilation script:

cd launcher
./build-production.sh
cd ..

The result will be a binary named pmv. Copy it into /usr/bin

Compile frontend

Navigate to the frontend folder and run the compilation script:

cd frontend
npm install
npm run build
cd ..

The result will be a folder named dist. Copy its contents into /usr/lib/pmv/www

If you prefer to store the frontend into another path, make sure to set the following environment variable in your system:

Variable NameDescription
FRONTEND_PATHPath to static frontend to serve it.

Creating and running a vault

In order to create, or open a vault, run the launcher command:

pmv ./my_vault

This command will create a new vault on that folder, asking you for the initial username and password.

After it’s created, it will ask you for the port to run the server, and will start it, opening your default browser.

2.2 - Installation on Linux

Guide on how to install PersonalMediaVault on a Linux system with a deb package

This guide explains how to download and install PersonalMediaVault on a Linux system, using the provided DEB package.

Download

First, download the pre-compiled DEB package from any of the available mirrors.

The file should have a name formatted similar to personalmediavault_A.B-C.deb, replacing A, B and C for the major, minor and patch version number respectively.

Make sure to check the file hash with the sha256sum utility and compare it to the provided hash on GitHub.

sha256sum ./personalmediavault_A.B-C.deb

The hash should perfectly match with the provided one. It is doesn’t, do not continue the installation process, and make an Issue to report the problem.

Installing

Once downloaded, you can install the DEB package into your system with apt:

sudo apt install ./personalmediavault_A.B-C.deb

The installation will also install FFmpeg as a dependency.

After the installation, the binary files will be available in /usr/bin, and the frontend files will be available in /usr/lib/pmv/www.

Creating and running a vault

In order to create, or open a vault, run the launcher command:

pmv ./my_vault

This command will create a new vault on that folder, asking you for the initial username and password.

After it’s created, it will ask you for the port to run the server, and will start it, opening your default browser.

2.3 - Installation on Windows

Guide on how to install PersonalMediaVault on a Windows system

This guide explains how to download and install PersonalMediaVault on a Windows system.

Download

Download the MSI installation package from any of the available mirrors.

The file should have a name formatted similar to PersonalMediaVault-A.B.C-x64.msi, replacing A, B and C for the major, minor and patch version number respectively.

Make sure to check the file hash with Powershell and compare it to the provided hash on GitHub.

Get-FileHash -Path "PersonalMediaVault-A.B.C-x64.msi" -Algorithm SHA256

The hash should perfectly match with the provided one. It is doesn’t, do not continue the installation process, and make an Issue to report the problem.

Installing

Once downloaded, run the installer and follow the steps.

The installer should take care of everything for you, installing all the dependencies and placing the binaries in the Program Files folder.

Creating and running a vault

The installer will add an option to the file explorer to open a folder with PersonalMediaVault.

Create a new folder, and use that option to open with PersonalMediaVault.

Open with PersonalMediaVault

That will open the launcher, asking you for an initial username and password for your vault.

After the vault is created, it will ask you for a port to run the server, and will start it, opening your default browser.

2.4 - Run with Docker

Guide on how to run PersonalMediaVault with Docker

This guide explains how to run PersonalMediaVault with Docker.

Pull image

First, select a Docker repository and pull the image

Here is an example, if you choose Docker Hub:

docker pull asanrom/pmv

Setup vault

Create a folder where you wish to install the vault, and create a file named docker-compose.yml, with the following content:

version: '3.9'

services:

  pmv:
    image: asanrom/pmv
    ports:
      - '80:80'
      - '443:443'
    volumes:
      - './:/vault'
    restart: unless-stopped
    command: --daemon --clean --log-requests --skip-lock --vault-path /vault

Check the server options for more information of all the available options to run the server.

Running the vault

In order to run the vault, run Docker compose:

docker compose up -d

Go to http://localhost to check out your vault. You can login with:

  • Username: admin
  • Password: admin

Change your password, and possibly username, and start using your vault.

If you want to stop the vault server, run the following command:

docker compose down

3 - Tutorials

Check out some guides and tutorials on how to use PersonalMediaVault.

This section contains tutorials on varios aspects of PersonalMediaVault.

Check the list below in order to find what you are looking for.

If you can’t find what you’re looking for, feel free to start a discussion on GitHub.

3.1 - Setting up everything

Unlock the the vault for the first time. Set up everything necessary and get familiar with the web interface.

After you launched the vault server, you will be given an URL to connect to the vault using a web browser.

Most modern browsers are supported, including Chromium-based browser, Firefox-based browsers or Webkit-based browsers.

The fist screen you will see is a login screen asking for your vault credentials to unlock the vault. You have to use the credentials you provide when creating the vault. If you didn’t specify any credentials, by default, the username is admin and the password is also admin.

Screenshot

After you successfully log into your vault, you will be presented with the PersonalMediaVault main interface:

Screenshot

Let’s get familiar with the interface elements!

First, you have sidebar at the left. You can toggle its visibility with the button at the top left corner. The sidebar has the following elements:

  • The Home view, where you can access to all the media assets you have, in upload order.
  • The Search results view, only visible when you are filtering by a tag. Very similar to the Home view, but filtered.
  • The Albums view, when you can access every album existing in your vault.
  • The Upload view, where you can upload media files into your vault.
  • The Random view, witch gives you random media files existing in your vault.
  • The Advanced search view, where you can search for media files in your vault, by title, description, type, tags or album.

Below the main options, a list of albums will be displayed, ordered by usage or preference.

Top bar

In the top bar you will find a search bar, and three buttons.

The search bar lets you find tags and albums in your vault. You can type the name, or part of it, and filter by a tag or go into an album.

The top bar buttons are the following, from left to right:

  • The question mark button will display the help menu, letting you know the current version of your PersonalMediaVault instance or giving your information about the documentation or the keyboard shortcuts.
  • The cog button will display the vault settings menu. We’ll explain this menu in details in the next section of this tutorial.
  • The log out button will display a confirmation modal asking you to close the vault session and lock the vault.

Vault settings menu

The vault settings menu has all the options you need to set your vault up. Let’s dive into them and make the necessary actions.

Screenshot

Change theme

Click in the Change theme (Dark / Light) option in order to select the theme you prefer for the web interface.

By default, PersonalMediaVault will detect your browser theme.

By selecting your preferred theme, PersonalMediaVault will save that preference in the local storage of your browser. In order to remember it in future sessions.

Change language

Click in the Change language option to select your language.

By default, PersonalMediaVault will detect your browser language.

By selecting your preferred language, PersonalMediaVault will save that preference in the local storage of your browser. In order to remember it in future sessions.

Isn’t your language yet supported? Feel free to contribute with a pull request to add a new language. In order to add a new language, check the frontend/src/locales folder. Copy locale-en.json and translate every key to your language.

Change username

Click in the Change username option in order to change your username. This is the username you use to unlock the vault.

In order to change it, you must also provide your current password.

Screenshot

Change password

Click in the Change password option in order to change your password. This is the password you use to unlock the vault.

In order to change it, you must also provide your current password.

Make sure to use a very strong password, using letters (uppercase and lowercase), numbers and symbols.

Is it recommended to use a password manager, and making a backup of your password. If you lose your password, it will be impossible to recover the vault content, since it’s encrypted with that password.

Screenshot

Invite

Click in the Invite option in order to invite users or devices to access the vault.

This feature will allow you to generate single-use codes that can be used to access the vault in read-only mode.

Screenshot

Administrate accounts

The Administrate accounts option will show you a list of extra accounts for your vault, allowing you to create new ones or delete existing ones.

This feature is useful when you have family or friend you want to share the vault with. You can make read-only accounts for them.

If this use case does not fit your needs, you can just ignore this option.

Tasks

The Tasks option will show you the list of current tasks running for the vault. These tasks and encoding or resizing tasks. They will be created the moment you upload media to your vault.

This option is rarely used, but it can give you a global view of all the tasks running, in case you need to know.

Advanced settings

Click in the Advanced settings option to configure your vault advanced settings. This option will show a modal with 3 tabs.

The first tab, called General will allow you to configure the following:

  • The vault title, displayed as the website title. By default is it Personal Media Vault.
  • The max number of tasks allowed to run in parallel. Depending on your server capabilities, you may want to increase or decrease it.
  • The max number of threads to use for each task. By default is 0, meaning it will use as many as optimal. You can set it in order to restrict the CPU usage.
  • The video previews interval, in seconds. Each interval, PersonalMediaVault will make a preview of a video in order to display them when hovering the timeline.

Screenshot

The second tab, called Extra resolutions will allow you to enable certain extra resolutions to use for small screens, in order to save memory and bandwidth. If you plan to use from a tablet or a mobile device, you may want to enable some of them.

Screenshot

The third tab, called Custom style will let you specify custom CSS code to apply to the web interface. You can use this to make your own theme. However, this option is very advanced and requires CSS knowledge. If you do not have such knowledge or you are not interesting in a custom theme, just ignore this option.

Screenshot

Batch operation

The Batch operation option will let you apply a batch operation to a subset of your vault media assets.

You can filter by title, description, tags or album.

You can apply any of the following operations:

  • Adding tags.
  • Removing tags
  • Adding media into an album
  • Removing media from an album
  • Deleting media from the vault

This can be useful if you want to make a change to many media assets, saving you time.

Screenshot

3.2 - Uploading content

Upload media files to store them into your vault.

In order to add media files into your vault, you may use the Upload option in the main menu.

Screenshot

You can drag and drop files into the box with dotted border, or click it to open the file selector.

Once you select a file, a modal will open asking you to confirm it, while allowing you to add the media into an album, and add tags. This is very useful when you upload multiple times at once that share some tags.

Screenshot

When the upload process finishes, you can check the uploaded media in the Ready tab.

Screenshot

If the upload process fails for some reason, it will be placed in the Error tab.

Max number of uploads in parallel

You can easily change the max number of uploads in parallel to speed up an upload process of many items.

By default it is 1, but you can increase it up to 64, and it will take effect even in the middle of the upload process, so do not worry changing it to upload the speed if you need it.

There is a inconvenience when doing this, when adding into an album, parallel uploads will place the items in an arbitrary order, depending on how fast the upload finishes. Thats is why, when uploading items into an album in order, usually you will prefer uploading one by one.

3.3 - Video player

Learn how to use the video player, used to play any video files you store in the vault.

When selecting a video in the media vault, the video player will be used in order to play it.

The PersonalMediaVault video player is a feature rich player based on the YouTube video player:

  • At the top-left, you have the video title
  • At the top-right, you have a button to open the video metadata editor.
  • At the bottom you have the player controls, and on top of them, you have the timeline.

Screenshot

Basic controls

In order to play or pause, you can simply click the player at the center, use the play button in the player controls bar, or using a keyboard shortcut: Space Bar or K.

Screenshot

In order to change the volume, you can use the volume control in the player controls bar, which displays a slider when hovering it or clicking it. You can also use a keyboard shortcut, being the Up and Down arrow keys, which will change the volume by 5%. You can press Shift while using the vertical arrow keys in order to fine-tune the volume by changing it 1% each key press.

You can mute or un-mute the video by clicking on the volume control in the player controls bar, or using the key M.

Screenshot

By pressing the configuration button or the S key, you can open the video player configuration.

Screenshot

By pressing the full screen button, or the F key, you can toggle the full screen mode for the video player.

Screenshot

Timeline

You can hover the timeline in order to get the timestamp you are hovering into, and an image preview, if available.

Screenshot

You can click the timeline in order to change the current time.

You can use the Home key to go to the beginning of the video. Also, you can use the End key to go to the end of the video.

You can also use the Left and Right arrow keys to go backward or forward by 5 seconds respectively.

Also, if the player is paused, you can use the dot and comma keys to go backward or forward by a single frame respectively.

Configuration

You can open the player configuration by pressing the configuration button or the S key.

Screenshot

You can find several options:

  • You can toggle the loop option. If enabled, the player will automatically replay the video from the beginning after it ending. You can press the L key to do the same.
  • You can toggle the auto-next option. If enabled, the player will attempt to play the next media in the list after the current video finishes playing.
  • You can change the playback speed, to accelerate it or slow it down.
  • You can change the scale of the video, in order to zoom-in to check small details.
  • You can change the video quality (resolution and frames per seconds) between the available ones.
  • You can also change the subtitles, and the audio track, if they are available for your video.
  • You can also change the toggle play delay, being the play/pause delay when you click the player at its center.

Context menu

When right clicking with a mouse, or with a long tap in touch devices, it will open the player context menu, with several options for fast access to them.

Screenshot

You can find several options:

  • You can toggle the loop option. If enabled, the player will automatically replay the video from the beginning after it ending. You can press the L key to do the same.
  • You can hide or show the controls. When done with this options, the controls will stay hidden until you disable the option. You can press the C key to do the same.
  • You can open the tags editor. You can also press the T key to open it.
  • You can open the time slices editor. You can also press the N key to open it.
  • You can open the extended description, being an arbitrary text to attach to the media. You can also press the I key to open it.
  • You can download the video file.
  • You can check the size of the files stored in the vault.
  • You can refresh the media, reloading it from the server.

Editor

You can open the player editor by clicking the expand button at the top right corner of the player. Also you can press the E key.

Screenshot

The player editor allows you to change any aspect of the video.

In the General tab you can change the title of the video, its description and thumbnail. You can also enable extra flags, like resetting the time when loading the video every time, instead of restoring the previous time.

In the Tags tab you can change the media tags. You can use the tags to find the media later when searching for it.

You also have other tabs we explain in detail in the sections below.

Subtitles

You can add subtitles to the video in the Subtitles tab of the player editor. You can add them by uploading SubRip files, with .srt extension.

If you upload a Matroska file (.mkv extension) to the vault, the available subtitles will be automatically extracted.

When a video has subtitles, you can select them at the player configuration menu, while also being able to customize their style.

Screenshot

Audio tracks

You can add extra audio tracks for the video in the Audio Tracks tab of the player editor. You can add them by uploading audio files, for example with .mp3 extension.

If you upload a Matroska file (.mkv extension) to the vault, the available audio tracks will be automatically extracted.

When a video has extra audio tracks, you can select the one that will play at the player configuration menu.

Screenshot

Time slices

You can split the video in different slices by clicking the option in the context menu, or pressing the N key. This will open an editor where you can add time slices, specifying the start time, and a name.

Screenshot

You can also change the time slices in text mode by going to the Time slices tab of the player editor.

Attachments

You can add attachments to the video by going to the Attachments tab of the player editor.

Attachments are arbitrary files you can store in the vault along with the media file, for example the original uncompressed video or the assets used to make it.

Resolutions

In the Resolutions tab of the player editor, you will be able to resize the video to different resolutions, in order to play it in smaller screens without wasting bandwidth.

Once a resolution is available, you will be able to select it from the player configuration menu.

Danger zone

In the Danger zone tab of the player editor, you can:

  • Re-encode the video, in order to attempt to fix encoding errors.
  • Delete the video from the vault, which requires confirmation. You can also use the Delete key.

3.4 - Image viewer

Learn how to use the image viewer, used to display any image files you store in the vault.

When selecting an image in the media vault, the image viewer will be used in order to display it.

The PersonalMediaVault image viewer is very similar to the video player:

  • At the top-left, you have the image title
  • At the top-right, you have a button to open the image metadata editor.
  • At the bottom you have the viewer controls.

Screenshot

Basic controls

You can change the image scale with the scale control, which displays when hovering or clicking on it. The scale can be a percentage of the display width, or can be set to fit the image into the available space:

  • Click the scale button, or press the Space bar, in order to toggle the image fitting mode.
  • Drag the scale control or press the + and - keys to increase or decrease the scale by 10% respectively.
  • You can press the Shift key, along with the + and - keys to increase or decrease the scale by 1% respectively.

Screenshot

By pressing the configuration button or the S key, you can open the image viewer configuration.

Screenshot

By pressing the full screen button, or the F key, you can toggle the full screen mode for the image viewer.

Screenshot

Configuration

You can open the viewer configuration by pressing the configuration button or the S key.

Screenshot

You can find several options:

  • You can hide or show image notes.
  • You can change the image quality (resolution), between the available ones.
  • You can change the image background, for images with transparency.
  • You can change the auto-next option. If enabled, the next media in the list will play after a certain number of seconds have passed.

Context menu

When right clicking with a mouse, or with a long tap in touch devices, it will open the viewer context menu, with several options for fast access to them.

Screenshot

You can find several options:

  • You can toggle the image size fitting mode. If enabled, the image will be automatically resized and centered to fit in the available size.
  • You can hide or show the controls. When done with this options, the controls will stay hidden until you disable the option. You can press the C key to do the same.
  • You can open the tags editor. You can also press the T key to open it.
  • You can open the image notes editor. You can also press the N key to open it.
  • You can open the extended description, being an arbitrary text to attach to the media. You can also press the I key to open it.
  • You can download the image file.
  • You can check the size of the files stored in the vault.
  • You can refresh the media, reloading it from the server.

Editor

You can open the viewer editor by clicking the expand button at the top right corner of the viewer. Also you can press the E key.

Screenshot

The viewer editor allows you to change any aspect of the image.

In the General tab you can change the title of the image, its description and thumbnail.

In the Tags tab you can change the media tags. You can use the tags to find the media later when searching for it.

You also have other tabs we explain in detail in the sections below.

Image notes

You can add annotation to the image by clicking the option in the context menu, or pressing the N key. This will toggle a mode where you can drag in order to add notes to the image, while being able to move and resize the existing ones.

When out of the image notes editor mode, they will be displayed as translucid squares that will display its corresponding text by hovering or clicking on them.

You can use image notes, for example, to name elements of the image, add extra information or translate texts in a foreign language.

Screenshot

You can also change the image notes in text mode by going to the Image Notes tab of the viewer editor, very useful to import and export notes.

Attachments

You can add attachments to the video by going to the Attachments tab of the viewer editor.

Attachments are arbitrary files you can store in the vault along with the media file, for example the original uncompressed image or the assets used to make it.

Resolutions

In the Resolutions tab of the viewer editor, you will be able to resize the image to different resolutions, in order to display it in smaller screens without wasting bandwidth.

Once a resolution is available, you will be able to select it from the viewer configuration menu.

Danger zone

In the Danger zone tab of the viewer editor, you can:

  • Re-encode the image, in order to attempt to fix encoding errors.
  • Delete the image from the vault, which requires confirmation. You can also use the Delete key.

3.5 - Audio player

Learn how to use the audio player, used to play any audio files you store in the vault.

When selecting an audio in the media vault, the audio player will be used in order to play it.

The PersonalMediaVault video player is very similar to the video player, adapted for audio files:

  • At the top-left, you have the audio title
  • At the top-right, you have a button to open the audio metadata editor.
  • At the bottom you have the player controls, and on top of them, you have the timeline.

Screenshot

Basic controls

In order to play or pause, you can simply click the player at the center, use the play button in the player controls bar, or using a keyboard shortcut: Space Bar or K.

Screenshot

In order to change the volume, you can use the volume control in the player controls bar, which displays a slider when hovering it or clicking it. You can also use a keyboard shortcut, being the Up and Down arrow keys, which will change the volume by 5%. You can press Shift while using the vertical arrow keys in order to fine-tune the volume by changing it 1% each key press.

You can mute or un-mute the audio by clicking on the volume control in the player controls bar, or using the key M.

Screenshot

By pressing the configuration button or the S key, you can open the audio player configuration.

Screenshot

By pressing the full screen button, or the F key, you can toggle the full screen mode for the audio player.

Screenshot

Timeline

You can hover the timeline in order to get the timestamp you are hovering into.

Screenshot

You can click the timeline in order to change the current time.

You can use the Home key to go to the beginning of the audio. Also, you can use the End key to go to the end of the audio.

You can also use the Left and Right arrow keys to go backward or forward by 5 seconds respectively.

Also, if the player is paused, you can use the dot and comma keys to go backward or forward by a single frame respectively.

Configuration

You can open the player configuration by pressing the configuration button or the S key.

Screenshot

You can find several options:

  • You can toggle the loop option. If enabled, the player will automatically replay the audio from the beginning after it ending. You can press the L key to do the same.
  • You can toggle the auto-next option. If enabled, the player will attempt to play the next media in the list after the current audio finishes playing.
  • You can change the playback speed, to accelerate it or slow it down.
  • You can change the animation style used to represent the audio wave.

Context menu

When right clicking with a mouse, or with a long tap in touch devices, it will open the player context menu, with several options for fast access to them.

Screenshot

You can find several options:

  • You can toggle the loop option. If enabled, the player will automatically replay the video from the beginning after it ending. You can press the L key to do the same.
  • You can open the tags editor. You can also press the T key to open it.
  • You can open the time slices editor. You can also press the N key to open it.
  • You can open the extended description, being an arbitrary text to attach to the media. You can also press the I key to open it.
  • You can download the audio file.
  • You can check the size of the files stored in the vault.
  • You can refresh the media, reloading it from the server.

Editor

You can open the player editor by clicking the expand button at the top right corner of the player. Also you can press the E key.

Screenshot

The player editor allows you to change any aspect of the audio.

In the General tab you can change the title of the audio, its description and thumbnail. You can also enable extra flags, like resetting the time when loading the audio every time, instead of restoring the previous time.

In the Tags tab you can change the media tags. You can use the tags to find the media later when searching for it.

You also have other tabs we explain in detail in the sections below.

Subtitles

You can add subtitles to the audio in the Subtitles tab of the player editor. You can add them by uploading SubRip files, with .srt extension.

When an audio has subtitles, you can select them at the player configuration menu, while also being able to customize their style.

Screenshot

Time slices

You can split the audio in different slices by clicking the option in the context menu, or pressing the N key. This will open an editor where you can add time slices, specifying the start time, and a name.

Screenshot

You can also change the time slices in text mode by going to the Time slices tab of the player editor.

Attachments

You can add attachments to the audio by going to the Attachments tab of the player editor.

Attachments are arbitrary files you can store in the vault along with the media file, for example the original uncompressed audio or the assets used to make it.

Danger zone

In the Danger zone tab of the player editor, you can:

  • Re-encode the audio, in order to attempt to fix encoding errors.
  • Delete the audio from the vault, which requires confirmation. You can also use the Delete key.

3.6 - Navigating and searching

Navigate your vault, find media assets and customize the size of thumbnails.

Home page

When you unlock the vault, the first page you see is the Home page, which consists on a paginated gallery containing all the media files you stored in your vault.

Screenshot

By default, it will show the most recent media files first. You can change this clicking on the arrow icon at the top-right, in order to show the oldest media files first.

Screenshot

You can also customize the page by clicking in the cog button at the top-right. This will open a modal where you can change:

  • The maximum number of items to load each page.
  • The size range of the thumbnails.
  • The number of items to try fit in a single row (may not be possible if the size of the thumbnails is too big or too small, try changing both until you get the sizes you like).
  • The padding of the thumbnails
  • The corner style of the thumbnails
  • If you want to display or hide titles.

Screenshot

Random Results

In case you want to load random media files from your media vault, you can try the Random page. This page works similar to the Home page, without the menu.

Each time you reload, a new seed is used, giving you a new set of random results.

Screenshot

By typing in the search bar at the top, you can find any album or tag in the vault.

When selecting a tag, it will filter by that tag, showing you a Search results page, identical to the Home page, but only showing the media files containing the tag.

Screenshot

This filter also applies to the Random page, in order to get random, filtered results.

You can clear the filter by clicking on the X button that appears in the search bar when there is an active filter.

If you want a more advanced search system, in order to find a particular file in your vault, you can use the Advanced search page. This page will offer you a variety of options like:

  • Filtering by text in title or description
  • Filtering by multiple tags
  • Filtering by media type (video, audio, picture)
  • Filtering by album

Once your filter is set, you can scroll down until you find what you’re looking for.

Screenshot

3.7 - Using albums

Make ordered list of media, called albums.

You can use albums in order to keep ordered lists of media files in your vault.

In this tutorial we will explain how to create and use them.

Albums list

If you visit the Albums page, you will see the full list of albums existing in your vault.

You can filter by name, and also create new ones from this page.

Screenshot

Creating an album

From the Albums page, click the Create album button in order to create a new album.

You must provide a name for the album and proceed.

Screenshot

After the album is created, you will be redirected to it, being an empty album since it was just created.

Screenshot

Adding media to the album

The first step after creating the album is adding the media files we want inside it.

In order to do this, you have two alternatives:

  • Clicking the + button in the album options. This will open a modal where you can upload or search media files in order to add them to the album.

Screenshot

  • If you are playing or viewing a media file, you can click the albums button, or press A, in order to open the albums list of the media, where you can add or remove the media from different albums.

Screenshot

Once you have multiple media files inside an album, you can navigate using multiple methods:

  • Using the Previous and Next buttons of the player.
  • Using the Left and Right arrow keys (in combination with Shift if the current media is a video or an audio).
  • Using the Page Up and Page Down keys.
  • By scrolling through the list and clicking the element you want to navigate to.
  • By pressing the G key and specifying the position to navigate into.

Screenshot

In the player configuration you can set the Auto next option, in order to automatically navigate to the next media when the video / audio ends or after a certain amount of time in the case of pictures.

Screenshot

You can set the Loop option for the album by clicking in the corresponding button in the album options. When enabled, the next media of the last element will be the first element, and the previous media of the first element will be the last element.

Screenshot

You can set the Random option for the album by clicking in the corresponding button in the album options. When enabled, the next media will be randomly chosen, and the previous media will be disabled.

Screenshot

Re-ordering and removing elements

By clicking in the Options button of a media file inside the vault, you will get a menu where you can change the position of the media file inside the album, and also delete it from the album.

Screenshot

Also, if you are using a computer, you can drag and drop the elements in order to re-order them in a mode efficient way.

Favorites

You can add the album into favorites by clicking the star button in the album options.

Screenshot

If the album is in favorites, it will appear at the top of the menu sidebar, in order to easily access it.

Renaming

In order to rename the album, click in the pencil button in the album options.

Screenshot

Deleting

In order to delete the album, click in the trash button in the album options.

Screenshot

Note: Deleting the album will not delete any media file inside of it.

3.8 - Making backups

Make backups of your vault, to prevent any data losses.

In order to make backups of your vault, you can just make regular copies of the vault folder. Due to its design, it’s always in a consistent status and spreads the data into multiple files, so any external backup tool will work.

Here is the list of alternatives you can use:

  • Using the specific tool provided By PersonalMediaVault.
  • Using an standard tool, like rsync.
  • Using any other external tool, for example the ones provided by the main cloud storage providers.

In this tutorial we’ll explain how to use the backup tool provided by the PersonalMediaVault installation.

Using the backup tool from the launcher

When opening a vault from the launcher, you get a CLI interface with multiple commands.

In order to make a backup, use the backup command:

backup /path/to/backup/folder

In case the destination path is not empty, it will only copy the new files and update the ones that have been modified.

Using the backup tool from the terminal

You can also use the backup tool from the terminal, running the pmv-backup binary:

pmv-backup /path/to/vault /path/to/backup/folder

Re-encrypting

In case you got the encryption key leaked, and it’s no longer secure, you can make a backup re-encrypting everything with a brand new randomly generated encryption key.

In order to do that, use the --re-encrypt option:

pmv-backup /path/to/vault /path/to/backup/folder --re-encrypt

Note: The re-encryption process may take a very long time. Make sure to always use a secure password in order to prevent data leaks in the first place.

4 - Technical Documentation

Documentation about how PersonalMediaVault works.

This section contains technical documents and guides about multiple aspects of PersonalMediaVault.

Check the list below in order to find the information you are looking for.

If you can’t find what you’re looking for, feel free to start a discussion on GitHub.

4.1 - API documentation

Documentation of the HTTP API the server provides.

4.2 - Frontend customization

Learn how to change icons and style of your vault frontend.

This document specifies the vault frontend customization capabilities implemented by the PersonalMediaVault backend, such as custom title, custom style or custom icons.

Custom title and frontend style

You can customize the vault frontend title and also setup custom CSS code if you need it. Simply go to Settings and then Advanced Settings.

Screenshot

The custom title will affect the page base title.

The custom CSS code can be used to do complex stuff, like changing colors or font sizes. Note that this is not a recommended feature, since the style is already optimized for both dark and light theme.

Custom favicon

By default, the PersonalMediaVault backend will serve the official icon.

You can change it by adding a custom favicon.ico into your vault folder.

You may have to clear cache to see the change, since the browser caches the icon to prevent requesting it multiple times.

Custom logos

Similar to the favicon, by default, the official logos will be served.

If you want to change them, you must create a folder inside your vault folder with the name img/icons.

You can copy the official ones and modify them.

FileDescription
favicon.pngFavicon used to display for the top bar. (Default format)
favicon.svgFavicon used to display for the top bar. (Alternative format)
favicon-32x32.pngSmall favicon image (32x32 px)
favicon-16x16.pngSmall favicon image (16x16 px)

4.3 - Server Options

List of available server options

This is a list of all available server options for the PersonalMediaVault backend.

Usage

In order to run the server, you can run the pmvd binary.

In order to see the options, use:

pmvd --help

In order to run the daemon, use:

pmvd --daemon [OPTIONS]

Here is the full list of available options:

OptionDescription
--help, -hPrints command line options.
--version, -vPrints version.
--daemon, -dRuns backend daemon.
--init, -iInitializes the vault. Asks for username and password.
--clean, -cCleans temporal path before starting the daemon.
--port -p <port>Sets the listening port. By default 80 (or 443 if using SSL).
--bind -b <bind-addr>Sets the bind address. By default it binds all interfaces.
--vault-path, -vp <path>Sets the data storage path for the vault.
--cache-size <size>Sets the LRU cache size. By default is can hold 1024 elements.

Also, here is a list of available debug options:

OptionDescription
--skip-lockIgnores vault lockfile.
--fix-consistencyFixes vault consistency at startup (takes some time).
--debugEnables debug mode.
--log-requestsEnables logging requests to standard output.
--cors-insecureAllows all CORS requests (insecure, for development).
--launch-tag <tag>Sets launcher tag (for launcher use).

Also, here is a list of environment variables to configure other options:

Variable NameDescription
FFMPEG_PATHPath to ffmpeg binary
FFPROBE_PATHPath to ffprobe binary
TEMP_PATHTemporal path to store things like uploaded files or to use for FFMPEG encoding. Note: It should be in a different filesystem if the vault is stored in an unsafe environment. By default, this will be stored in ~/.pmv/temp
FRONTEND_PATHPath to static frontend to serve it.
SSL_CERTPath to the SSL certificate. Required to enable HTTPS
SSL_KEYPath to SSL private key. Required to enable HTTPS
USING_PROXYSet it to YES if you are using a reverse proxy.
TEMP_FILE_DELETE_MODESet it to SECURE to clear all the bytes of temporal files (secure delete).

4.4 - Setting up as service (systemd)

Learn how to set up the PersonalMediaVault server as a systemd service.

This technical guide explains how to set up PersonalMediaVault as a service in a Linux machine using systemd.

Make sure to follow the installation guide on Linux before doing this. This guide expects you to have PersonalMediaVault already installed in your system.

The first step for creating a systemd service is to create an user for that service.

In order to create the user, run the following commands:

sudo groupadd pmv
sudo useradd -M pmv -g pmv
sudo usermod -L pmv

After you did this, now it’s time to create a folder to store the vault. In this guide we are going to use /var/pmv/vault.

Run the following commands:

sudo mkdir /var/pmv
sudo mkdir /var/pmv/vault
sudo chown -R pmv:pmv /var/pmv

Then, it’s time to create the service file, run the following command:

sudo nano /etc/systemd/system/pmv.service

Copy the following contents and save it:

[Unit]
Description=PersonalMediaVault
After=network.target auditd.service

[Service]
Type=simple
ExecStart=/usr/bin/pmvd --daemon --log-requests --skip-lock --vault-path /var/pmv/vault
User=pmv
Group=pmv
WorkingDirectory=/var/pmv/vault
Environment=FRONTEND_PATH=/usr/lib/pmv/www
Environment=FFMPEG_PATH=/usr/bin/ffmpeg
Environment=FFPROBE_PATH=/usr/bin/ffprobe
Environment=TEMP_PATH=/tmp/pmv
LimitNOFILE=infinity
LimitCORE=infinity
KillMode=process
StandardInput=null
StandardOutput=syslog
StandardError=syslog
Restart=always

[Install]
WantedBy=multi-user.target

Note: You may want to change some options. For that, make sure to check the following:

After you saved the service file, and exited the editor, run the following command to enable the service, so it runs every time the system starts:

sudo systemctl enable pmv

Then, you can start it:

sudo systemctl start pmv

After it was started, you can check the logs with journalctl. Example:

sudo journalctl -u pmv

You can also check the service status with:

sudo systemctl status pmv

4.5 - Storage model

Documentation of the PersonalMediaVault storage model.

This is the documentation for the vault storage model, including the types of files it uses, their internal structure and the encryption algorithms used.

Use this document as reference for any software development that requires interaction with the vault files.

File types

The vault storage model uses different types of files:

  • Lock file: File used to prevent multiple instances of PersonalMediaVault accessing the same vault.
  • Unencrypted JSON files: Configuration files that do not contain any protected vault data.
  • Encrypted JSON files: Used to store metadata.
  • Index files: Used to store lists of media asset IDs, in order to make searching faster.
  • Encrypted assets: Encrypted files containing the media assets. They can be single-file or multi-file.

Lock file

The lock file has the .lock extension.

It stores in plain text, a decimal number representing the PID of the current Process accessing the vault.

PersonalMediaVault backend should check for the existence of this file and the process before accessing the vault.

Unencrypted JSON files

Unencrypted JSON files have the .json extension.

They follow the JSON format. The schema varies depending on the specific file.

Since they are not encrypted, they just store configuration, like the port it should listen, or the encryption parameters.

Encrypted JSON files

Encrypted JSON files have the .pmv extension.

They take as a base a JSON plaintext, that is encrypted using an algorithm like AES.

They are binary files, with the following structure:

Starting byteSize (bytes)Value nameDescription
02Algorithm IDIdentifier of the algorithm, stored as a Big Endian unsigned integer
2HHeaderHeader containing any parameters required by the encryption algorithm. The size depends on the algorithm used.
2 + HNBodyBody containing the raw encrypted data. The size depends on the initial unencrypted data and algorithm used.

The system is flexible enough to allow multiple encryption algorithms. Currently, there are 2 supported ones:

  • AES256_FLAT: ID = 1, Uses ZLIB (RFC 1950) to compress the data, and then uses AES with a key of 256 bits to encrypt the data, CBC as the mode of operation and an IV of 128 bits. This algorithm uses a header containing the following fields:
Starting byteSize (bytes)Value nameDescription
2 + H4Compressed plaintext sizeSize of the compressed plaintext, in bytes, used to remove padding
2 + H + 416IVInitialization vector for AES_256_CBC algorithm
  • AES256_FLAT: ID = 2, Uses AES with a key of 256 bits to encrypt the data, CBC as the mode of operation and an IV of 128 bits. This algorithm uses a header containing the following fields:
Starting byteSize (bytes)Value nameDescription
2 + H4Plaintext sizeSize of the plaintext, in bytes, used to remove padding
2 + H + 416IVInitialization vector for AES_256_CBC algorithm

Index files

Index files have the .index extension.

They are sorted lists of media assets identifiers. They can store all the existing identifiers, or a fraction of them, for example, for a tag.

Thanks to being sorted, searching for a specific identifier can be achieved using binary search.

They are binary files, consisting of the following fields:

Starting byteSize (bytes)Value nameDescription
08Index sizeNumber of entries the index file contains, stored as a Big Endian unsigned integer
8 + 8*K8Media asset identifierEach media asset identifier is stored as a Big Endian unsigned integer. They are stored next to each other, and already sorted from lower value to grater value

Encrypted assets

Encrypted assets have the .pma extension.

They stored one or multiple encrypted files.

They are also binary files, and they can be of two types:

Single-File encrypted assets

These asset files are used to store a single and possibly big file in chunks, encrypted each chunk using the same method described by the Encrypted JSON files section.

They are binary files consisting of 3 contiguous sections: The header, the chunk index and the encrypted chunks.

The header contains the following fields:

Starting byteSize (bytes)Value nameDescription
08File sizeSize of the original file, in bytes, stored as a Big Endian unsigned integer
88Chunk size limitMax size of a chunk, in bytes, stored as a Big Endian unsigned integer

After the header, the chunk index is stored. For each chunk the file was split into, the chunk index will store a metadata entry, withe the following fields:

Starting byteSize (bytes)Value nameDescription
08Chunk pointerStarting byte of the chunk, stored as a Big Endian unsigned integer
88Chunk sizeSize of the chunk, in bytes, stored as a Big Endian unsigned integer

After the chunk index, the encrypted chunks are stored following the same structure described in the Encrypted JSON files section.

This chunked structure allows to randomly access any point in the file as a low cost, since you don’t need to decrypt the entire file, only the corresponding chunks. This capability is specially great for video rewinding and seeking.

Multi-File encrypted assets

These asset files are used to store multiple smaller files, meant to be sorted and accessed by an index number.

They are binary files consisting of 3 contiguous sections: The header, the file table and the encrypted files.

The header contains the following fields:

Starting byteSize (bytes)Value nameDescription
08File countNumber of files stored by the asset, stored as a Big Endian unsigned integer

After the header, a file table is stored. For each file stored by the asset, a metadata entry is stored, with the following fields:

Starting byteSize (bytes)Value nameDescription
08File data pointerStarting byte of the file encrypted data, stored as a Big Endian unsigned integer
88File sizeSize of the encrypted file, in bytes, stored as a Big Endian unsigned integer

After the file table, each file is stored following the same structure described in the Encrypted JSON files section.

This format is useful to store video previews, without the need to use too many files.

Vault folder structure

Media vaults are stored in folders. A vault folder may contain the following files and folders:

NamePathTypeDescription
Media assetsmediaFolderFolder where media assets are stored.
Tag indexestagsFolderFolder where tag indexes are stored.
Lock filevault.lockLock fileFile used to prevent multiple instances of the PersonalMediaVault backend to access a vault at the same time. It may not be present, in case the vault is not being accessed.
Credentials filecredentials.jsonUnencrypted JSON fileFile to store the existing accounts, along with the hashed credentials and the encrypted vault key, protected with the account password.
Media ID trackermedia_ids.jsonUnencrypted JSON fileFile to store the last used media asset ID.
Tasks trackertasks.jsonUnencrypted JSON fileFile used to store the last used task ID, along with the list of pending tasks.
Albumsalbums.pmvEncrypted JSON fileFile used to store the existing albums, including the metadata and the list of media assets included in them.
Tag listtag_list.pmvEncrypted JSON fileFile to store the metadata of the existing vault tags
User configurationuser_config.pmvEncrypted JSON fileFile to store user configuration, like the vault title or the encoding parameters
Main indexmain.indexIndex fileFile to index every single media asset existing in the vault.

Media assets folder

The media assets are stored inside the media folder.

In order to prevent the folder size to increase too much, the assets are distributed evenly in 256 sub-folders. The sub-folder name for each media asset is calculated from its identifier, since it’s a 64 bit unsigned integer, the folder name is the identifier module 256, and the result turned into a 2 character hex lowercased string

Examples: 00, 01, 02…, fd, fe, ff.

Inside each subfolder, the assets are stored inside their own folders, named by turning their identifier into a decimal string. Examples:

  • media_id=0 - Stored inside {VAULT_FOLDER}/media/00/0
  • media_id=15 - Stored inside {VAULT_FOLDER}/media/0f/15
import (
    "fmt",
    "hex", 
    "path",
)

func GetMediaAssetFolder(vault_path string, media_id uint64) string {
    subFolderName := hex.EncodeToString([]byte{ byte(media_id % 256) });

    return path.Join(vault_path, "media", subFolderName, fmt.Sprint(media_id))
}

The media asset folder may contain up to 3 types of files:

Media asset metadata file

Each media asset folder must contain a file named meta.pmv, being an encrypted JSON file containing the metadata of the media asset.

The file contains the following fields:

Field nameTypeDescription
idNumber (64 bit unsigned integer)Media asset identifier
typeNumber (8 bit unsigned integer)Media type. Can be: 1 (Image), 2 (Video / Animation) or 3 (Audio / Sound)
titleStringTitle
descriptionStringDescription
tagsArray<Number (64 bit unsigned integer)>List of tags for the media. Only identifiers are stored
durationNumber (Floating point)Duration of the media in seconds
widthNumber (32 bit unsigned integer)Width in pixels
heightNumber (32 bit unsigned integer)Height in pixels
fpsNumber (32 bit unsigned integer)Frames per second
upload_timeNumber (64 bit integer)Upload timestamp (Unix milliseconds format)
next_asset_idNumber (64 bit unsigned integer)Identifier to use for the next asset, when created
original_readyBooleanTrue if the original asset exists and is ready
original_assetNumber (64 bit unsigned integer)Asset ID of the original asset. The original asset is Single-File
original_extStringExtension of the original asset file. Eg: mp4
original_encodedBooleanTrue if the original asset is encoded
original_taskNumber (64 bit unsigned integer)If the original asset is not encoded, the ID of the task assigned to encode it
thumb_readyBooleanTrue if the thumbnail asset exists and is ready
thumb_assetNumber (64 bit unsigned integer)Asset ID of the thumbnail asset. The thumbnail asset is Single-File
previews_readyBooleanTrue if the video previews asset exists and is ready
previews_assetNumber (64 bit unsigned integer)Asset ID of the video previews asset. The video previews asset is Multi-File
previews_intervalNumber (Floating point)Video previews interval in seconds
previews_taskNumber (64 bit unsigned integer)If the video previews asset is not ready, the ID of the task assigned to generate it
force_start_beginningBooleanTrue to indicate the player not to store the current playing time, so the video or audio starts from the beginning every time
is_animBooleanTrue to indicate the player to treat the media as an animation
img_notesBooleanTrue if the image has a notes asset
img_notes_assetNumber (64 bit unsigned integer)Asset ID of the image notes asset. The image notes asset is Single-File
resolutionsArray<Resolution>List of extra resolutions
subtitlesArray<Subtitle>List of subtitles files
time_splitsArray<TimeSplit>List of time splits for videos or audios
audio_tracksArray<AudioTrack>List of extra audio tracks for videos
attachmentsArray<Attachment>List of attachments stored with the media asset

The Resolution object has the following fields:

Field nameTypeDescription
widthNumber (32 bit unsigned integer)Width in pixels
heightNumber (32 bit unsigned integer)Height in pixels
fpsNumber (32 bit unsigned integer)Frames per second
readyBooleanTrue if the asset is ready
assetNumber (64 bit unsigned integer)Asset ID of the asset. The asset is Single-File
extStringAsset file extension. Example: mp4
task_idNumber (64 bit unsigned integer)If the asset is not ready, ID of the task assigned to encode it

The Subtitle object has the following fields:

Field nameTypeDescription
idStringSubtitles language identifier. Example: eng
nameStringSubtitles file name. Example English
assetNumber (64 bit unsigned integer)Asset ID of the asset. The asset is Single-File

The TimeSplit object has the following fields:

Field nameTypeDescription
timeNumber (Floating point)Time in seconds where the split starts
nameStringName of the time split

The AudioTrack object has the following fields:

Field nameTypeDescription
idStringAudio track language identifier. Example: eng
nameStringAudio track file name. Example English
assetNumber (64 bit unsigned integer)Asset ID of the asset. The asset is Single-File

The Attachment object has the following fields:

Field nameTypeDescription
idNumber (64 bit unsigned integer)Unique attachment identifier
nameStringAttachment file name
sizeNumber (64 bit unsigned integer)Attachment file size (in bytes)
assetNumber (64 bit unsigned integer)Asset ID of the asset. The asset is Single-File

The image notes asset is a JSON file, containing an array of ImageNote objects, with the following fields:

Field nameTypeDescription
xNumber (32 bit integer)X position (pixels)
yNumber (32 bit integer)Y position (pixels)
wNumber (32 bit integer)Width (pixels)
hNumber (32 bit integer)Height (pixels)
textStringText to display for the specified area

Tag indexes folder

When a tag is added to the vault, a new index file is created inside the tags folder, with a name made by concatenating the tag_ prefix with the tag identifier encoded in decimal, and the .index extension.

import (
    "fmt",
    "path",
)

func GetTagIndexPath(vault_path string, tag_id uint64) string {
	return path.Join(vault_path, "tags", "tag_"+fmt.Sprint(tag_id)+".index")
}

Each tag index file contains the list of media asset identifiers that have such tag.

Credentials file

The credentials file, named credentials.json is an unencrypted JSON file used to store the hashed credentials, along with the encrypted vault key.

The JSON file contains the following fields:

Field nameTypeDescription
userStringUsername of the root account
pwhashStringPassword hash. Base 64 encoded
saltStringHashing salt. Base 64 encoded
enckeyStringEncrypted key. Base 64 encoded
methodStringName of the hashing + encryption method used
fingerprintStringVault fingerprint
accountsArray<Account>Array of additional accounts

Each Account is an object with the following fields:

Field nameTypeDescription
userStringAccount username
pwhashStringPassword hash. Base 64 encoded
saltStringHashing salt. Base 64 encoded
enckeyStringEncrypted key. Base 64 encoded
methodStringName of the hashing + encryption method used
writeBooleanTrue if the account has permission to modify the vault

Currently, the following methods are implemented:

AES256 + SHA256 + SALT16

This algorithm uses a random salt of 16 bytes (128 bits).

The password hash is calculated by using the SHA256 algorithm 2 times on the binary concatenation of the password (as UTF-8) and the random salt:

import (
    "sha256"
)

func ComputePasswordHash(password string, salt []byte) []byte {
	firstHash := sha256.Sum256(append([]byte(password), salt...))
	secondHash := sha256.Sum256(firstHash[:])
	return secondHash[:]
}

The vault ket is encrypted using the AES256 algorithm, using the system defined in the Encrypted JSON files section. Specifically using the AES256_FLAT mode.

The key for the encryption is calculated by hashing with SHA256 the the binary concatenation of the password (as UTF-8) and the random salt:

import (
    "sha256"
)

func ComputeAESEncryptionKey(password string, salt []byte) []byte {
	passwordHash := sha256.Sum256(append([]byte(password), salt...))
	return passwordHash[:]
}

Media ID tracker

The media ID tracker file, named media_ids.json is an unencrypted JSON file used to store the number of used media identifiers, very important to prevent duplicated identifiers.

The JSON file has just one field:

Field nameTypeDescription
next_idNumber (64 bit unsigned integer)Next identifier to use when adding a new media asset

Tasks tracker

The task tracker file, named tasks.json is an unencrypted JSON file used to store the number of used task identifiers, in order to prevent duplicates. It also stores the pending tasks, in order to continue them in case of a vault restart.

The JSON file contains the following fields:

Field nameTypeDescription
next_idNumber (64 bit unsigned integer)Next identifier to use when creating a new task
pendingObject (Mapping String -> PendingTask)Mapping. For each pending task, the required metadata to restart them

The PendingTask objects have the following fields:

Field nameTypeDescription
idNumber (64 bit unsigned integer)Task identifier
media_idNumber (64 bit unsigned integer)Media asset ID
typeNumber (8 bit unsigned integer)Task type. It can be: 0 (Encode original), 1 (Encode extra resolution) or 2 (Generate video previews)
first_time_encBooleanTrue if this task is the first time the asset is being encoded (was just uploaded)
resolutionObject { width: Width (px), height: Height (px), fps: Frames per second }Resolution for type = 1

Albums file

The albums file, named albums.pmv is an encrypted JSON file used to store the list of existing albums in the vault.

The file has the following fields:

Field nameTypeDescription
next_idNumber (64 bit unsigned integer)Identifier to use for the next album, when creating a new one.
albumsObject { Mapping ID -> Album }List of albums. For each album it maps its identifier to its metadata

The Album object has the following fields:

Field nameTypeDescription
nameStringName of the album
lmNumber (64 bit integer)Last modified timestamp. Unix milliseconds format
listArray<Number (64 bit unsigned integer)>List of media asset identifiers contained in the album

Tags file

The tags file, named tag_list.pmv is an encrypted JSON file used to store the list of existing tags in the vault.

The file has the following fields:

Field nameTypeDescription
next_idNumber (64 bit unsigned integer)Identifier to use for the next tag, when creating a new one.
tagsObject { Mapping ID -> String }List of tags. For each tag, it maps its identifier to its name

User configuration file

The user configuration file, named user_config.pmv is an encrypted JSON file used to store the vault configuration set by the user.

The file has the following fields:

Field nameTypeDescription
titleStringVault custom title
cssStringCustom CSS for the frontend
max_tasksNumber (32 bit integer)Max number of tasks to run in parallel
encoding_threadsNumber (32 bit integer)Max number of threads to use for a single encoding task
video_previews_intervalNumber (32 bit integer)Video previews interval (seconds)
resolutionsArray<VideoResolution>Resolutions to automatically encode when uploading a video
image_resolutionsArray<ImageResolution>Resolutions to automatically encode when uploading an image

The VideoResolution object has the following fields:

Field nameTypeDescription
widthNumber (32 bit unsigned integer)Width in pixels
heightNumber (32 bit unsigned integer)Height in pixels
fpsNumber (32 bit unsigned integer)Frames per second

The ImageResolution object has the following fields:

Field nameTypeDescription
widthNumber (32 bit unsigned integer)Width in pixels
heightNumber (32 bit unsigned integer)Height in pixels

Main index file

The main index file, named main.index is an index file containing every single media asset identifier existing in the vault.

This file is used to check if a media asset exists and to perform searches when a tag filter is not specified.

5 - Console Client

Documentation about how to use the console client.

This section contains the documentation about the PersonalMediaVault console client.

The PersonalMediaVault console client is a CLI application developed in the Rust programming language that can be used to interact with the PersonalMediaVault server without a GUI environment or inside shell scripts.

Download

In order to download the tool, go to the Releases and download the binary for your system

You can find its source code at the pmv-cli repository. You can compile it yourself following the instructions provided in the README document.

Usage

In order to use the tool, place the binary inside a folder in your PATH environment variable.

Run the tool help command to see the manual:

pmv-cli --help

For more information, check the Manual

5.1 - Manual

Manual for the PersonalMediaVault console client.

This is the manual for the PersonalMediaVault console client.

Usage:

pmv-cli [OPTIONS] <COMMAND>

Commands:

CommandDescription
loginLogins into an active vault, printing a session URL into the standard output
logoutCloses the active session, given a session URL
accountManages accounts
mediaManages media assets
randomRetrieves random media assets from the vault
searchSearches for media assets in the vault (Basic)
advanced-searchSearches for media assets in the vault (Advanced)
tagManages tags
albumManages albums
configManages vault configuration
taskRetrieves tasks information
invitesManages invites
batchApplies a batch operation to a list of media assets
get-server-informationGets server information, like the version it is using

Options:

OptionDescription
-u, --vault-url <VAULT_URL>HTTP connection URL to the active vault
-d, --debugTurn debug messages on
-y, --yesAuto confirm actions
-h, --helpPrint help
-V, --versionPrint version

Command: login

Logins into an active vault, printing a session URL into the standard output

Usage:

pmv-cli login [OPTIONS]

Options:

OptionDescription
-U, --username <USERNAME>Vault username. You can also specify the credentials in the URL
-D, --duration <DURATION>Session duration. Can be: day, week, month or year
-I, --invite-code <INVITE_CODE>Invite code. Setting this option will ignore the credentials and use the code
-h, --helpPrint help

Command: logout

Closes the active session, given a session URL

Usage:

pmv-cli logout

Options:

OptionDescription
-h, --helpPrint help

Command: account

Manages accounts

Usage:

pmv-cli account <COMMAND>

Commands:

CommandDescription
contextPrints account context to the standard output
change-usernameChanges username (only for root account)
change-passwordChanges account password
listList accounts
createCreates new account
deleteDeletes an existing account

Options:

OptionDescription
-h, --helpPrint help

Command: account context

Prints account context to the standard output

Usage:

pmv-cli account context

Options:

OptionDescription
-h, --helpPrint help

Command: account change-username

Changes username (only for root account)

Usage:

pmv-cli account change-username <USERNAME>

Arguments:

ArgumentDescription
<USERNAME>Username to change into

Options:

OptionDescription
-h, --helpPrint help

Command: account change-password

Changes account password

Usage:

pmv-cli account change-password

Options:

OptionDescription
-h, --helpPrint help

Command: account list

List accounts

Usage:

pmv-cli account list [OPTIONS]

Options:

OptionDescription
-c, --csvCSV format
-h, --helpPrint help

Command: account create

Creates new account

Usage:

pmv-cli account create [OPTIONS] <USERNAME>

Arguments:

ArgumentDescription
<USERNAME>Username for the new account

Options:

OptionDescription
-a, --allow-writeAllows the new account to modify the vault
-h, --helpPrint help

Command: account delete

Deletes an existing account

Usage:

pmv-cli account delete <USERNAME>

Arguments:

ArgumentDescription
<USERNAME>Username of the account to delete

Options:

OptionDescription
-h, --helpPrint help

Command: media

Manages media assets

Usage:

pmv-cli media <COMMAND>

Commands:

CommandDescription
getGets media asset metadata and download links
statsGets media asset size stats
downloadDownloads a media asset
exportExports a media asset, downloading everything (metadata + assets) into a folder
uploadUploads a new media asset, waits for encryption and adds tags if specified
importImports a media asset, expecting a folder with the same format the export command uses
set-titleChanges the title of a media asset
set-descriptionChanges the description of a media asset
set-extended-descriptionChanges the extended description of a media asset
set-force-start-beginningChanges the forced start from beginning parameter of a media asset
set-is-animationChanges the is-animation parameter of a media asset
set-thumbnailSets the thumbnail of a media asset
get-time-slicesPrints the time slices of a media asset
set-time-slicesSets the time slices of a media asset
set-image-notesSets the image notes of a media asset
add-resolutionAdds new resolution to the media asset
remove-resolutionRemoves a resolution from the media asset
add-subtitleAdds subtitle file to a media asset
rename-subtitleRenames a subtitles file
remove-subtitleRemoves subtitle file from a media asset
add-audioAdds audio track file to a media asset
rename-audioRenames an audio track file
remove-audioRemoves audio track file from a media asset
add-attachmentAdds attachment file
rename-attachmentRenames attachment file
remove-attachmentRemoves attachment file
re-encodeRe-Encodes a media asset
replaceReplaces the media asset with another file
deleteDeletes a media asset

Options:

OptionDescription
-h, --helpPrint help

Command: media get

Gets media asset metadata and download links

Usage:

pmv-cli media get <MEDIA>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID

Options:

OptionDescription
-h, --helpPrint help

Command: media stats

Gets media asset size stats

Usage:

pmv-cli media stats <MEDIA>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID

Options:

OptionDescription
-h, --helpPrint help

Command: media download

Downloads a media asset

Usage:

pmv-cli media download [OPTIONS] <MEDIA> [ASSET]

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
[ASSET]Asset to download. Examples: original, thumbnail, resolution:1280x720:30, sub:ID, audio:ID, attachment:ID, notes, preview:Index, ext_desc

Options:

OptionDescription
-o, --output <OUTPUT>Path to the file to download the asset into
-p, --print-linkPrints the download link, instead of downloading to a file
-h, --helpPrint help

Command: media export

Exports a media asset, downloading everything (metadata + assets) into a folder

Usage:

pmv-cli media export [OPTIONS] <MEDIA>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID

Options:

OptionDescription
-o, --output <OUTPUT>Path to the folder to download the files into
-h, --helpPrint help

Command: media upload

Uploads a new media asset, waits for encryption and adds tags if specified

Usage:

pmv-cli media upload [OPTIONS] <PATH>

Arguments:

ArgumentDescription
<PATH>Path to the file to upload

Options:

OptionDescription
-t, --title <TITLE>A title for the media asset
-a, --album <ALBUM>Album to upload the media asset into
-T, --tags <TAGS>Tags to add to the media asset, separated by spaces
-s, --skip-encryptionDo not wait for encryption
-h, --helpPrint help

Command: media import

Imports a media asset, expecting a folder with the same format the export command uses

Usage:

pmv-cli media import [OPTIONS] <PATH>

Arguments:

ArgumentDescription
<PATH>Path to the folder to import

Options:

OptionDescription
-a, --album <ALBUM>Album to upload the media asset into
-h, --helpPrint help

Command: media set-title

Changes the title of a media asset

Usage:

pmv-cli media set-title <MEDIA> <TITLE>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<TITLE>Title

Options:

OptionDescription
-h, --helpPrint help

Command: media set-description

Changes the description of a media asset

Usage:

pmv-cli media set-description <MEDIA> <DESCRIPTION>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<DESCRIPTION>Description

Options:

OptionDescription
-h, --helpPrint help

Command: media set-extended-description

Changes the extended description of a media asset

Usage:

pmv-cli media set-extended-description <MEDIA> <PATH>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<PATH>Path to the text file containing the extended description

Options:

OptionDescription
-h, --helpPrint help

Command: media set-force-start-beginning

Changes the forced start from beginning parameter of a media asset

Usage:

pmv-cli media set-force-start-beginning <MEDIA> <FORCE_START_BEGINNING>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<FORCE_START_BEGINNING>Set to ’true’ if you want to tell the clients not to store the time, so they always start from the beginning

Options:

OptionDescription
-h, --helpPrint help

Command: media set-is-animation

Changes the is-animation parameter of a media asset

Usage:

pmv-cli media set-is-animation <MEDIA> <IS_ANIMATION>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<IS_ANIMATION>Set to ’true’ if you want to tell the clients to treat the media as an animation, so they force the loop and disable time skipping

Options:

OptionDescription
-h, --helpPrint help

Command: media set-thumbnail

Sets the thumbnail of a media asset

Usage:

pmv-cli media set-thumbnail <MEDIA> <PATH>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<PATH>Path to the thumbnail file

Options:

OptionDescription
-h, --helpPrint help

Command: media get-time-slices

Prints the time slices of a media asset

Usage:

pmv-cli media get-time-slices <MEDIA>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID

Options:

OptionDescription
-h, --helpPrint help

Command: media set-time-slices

Sets the time slices of a media asset

Usage:

pmv-cli media set-time-slices <MEDIA> <PATH>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<PATH>Path to the file containing the time slices

Options:

OptionDescription
-h, --helpPrint help

Command: media set-image-notes

Sets the image notes of a media asset

Usage:

pmv-cli media set-image-notes <MEDIA> <PATH>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<PATH>Path to the image notes file

Options:

OptionDescription
-h, --helpPrint help

Command: media add-resolution

Adds new resolution to the media asset

Usage:

pmv-cli media add-resolution <MEDIA> <RESOLUTION>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<RESOLUTION>Resolution. Example: 1280x720:30

Options:

OptionDescription
-h, --helpPrint help

Command: media remove-resolution

Removes a resolution from the media asset

Usage:

pmv-cli media remove-resolution <MEDIA> <RESOLUTION>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<RESOLUTION>Resolution. Example: 1280x720:30

Options:

OptionDescription
-h, --helpPrint help

Command: media add-subtitle

Adds subtitle file to a media asset

Usage:

pmv-cli media add-subtitle [OPTIONS] <MEDIA> <SUB_ID> <PATH>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<SUB_ID>Subtitle file identifier. Example: EN
<PATH>Path to the subtitles file

Options:

OptionDescription
--name <NAME>Subtitle file display name. If not specified, the identifier is used
-h, --helpPrint help

Command: media rename-subtitle

Renames a subtitles file

Usage:

pmv-cli media rename-subtitle [OPTIONS] <MEDIA> <SUB_ID>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<SUB_ID>Subtitle file identifier. Example: EN

Options:

OptionDescription
--new-id <NEW_ID>New ID for the subtitles file
--new-name <NEW_NAME>New name for the subtitles file
-h, --helpPrint help

Command: media remove-subtitle

Removes subtitle file from a media asset

Usage:

pmv-cli media remove-subtitle <MEDIA> <SUB_ID>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<SUB_ID>Subtitle file identifier. Example: EN

Options:

OptionDescription
-h, --helpPrint help

Command: media add-audio

Adds audio track file to a media asset

Usage:

pmv-cli media add-audio [OPTIONS] <MEDIA> <TRACK_ID> <PATH>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<TRACK_ID>Audio track file identifier. Example: EN
<PATH>Path to the audio track file

Options:

OptionDescription
--name <NAME>Audio track file display name. If not specified, the identifier is used
-h, --helpPrint help

Command: media rename-audio

Renames an audio track file

Usage:

pmv-cli media rename-audio [OPTIONS] <MEDIA> <TRACK_ID>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<TRACK_ID>Audio track file identifier. Example: EN

Options:

OptionDescription
--new-id <NEW_ID>New ID for the audio track file
--new-name <NEW_NAME>New name for the audio track file
-h, --helpPrint help

Command: media remove-audio

Removes audio track file from a media asset

Usage:

pmv-cli media remove-audio <MEDIA> <TRACK_ID>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<TRACK_ID>Audio track file identifier. Example: EN

Options:

OptionDescription
-h, --helpPrint help

Command: media add-attachment

Adds attachment file

Usage:

pmv-cli media add-attachment <MEDIA> <PATH>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<PATH>Path to the attachment file

Options:

OptionDescription
-h, --helpPrint help

Command: media rename-attachment

Renames attachment file

Usage:

pmv-cli media rename-attachment <MEDIA> <ATTACHMENT_ID> <NAME>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<ATTACHMENT_ID>Attachment ID
<NAME>New name for the attachment file

Options:

OptionDescription
-h, --helpPrint help

Command: media remove-attachment

Removes attachment file

Usage:

pmv-cli media remove-attachment <MEDIA> <ATTACHMENT_ID>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<ATTACHMENT_ID>Attachment ID

Options:

OptionDescription
-h, --helpPrint help

Command: media re-encode

Re-Encodes a media asset

Usage:

pmv-cli media re-encode <MEDIA>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID

Options:

OptionDescription
-h, --helpPrint help

Command: media replace

Replaces the media asset with another file

Usage:

pmv-cli media replace <MEDIA> <PATH>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID
<PATH>Path to the media file to upload

Options:

OptionDescription
-h, --helpPrint help

Command: media delete

Deletes a media asset

Usage:

pmv-cli media delete <MEDIA>

Arguments:

ArgumentDescription
<MEDIA>Media asset ID

Options:

OptionDescription
-h, --helpPrint help

Command: random

Retrieves random media assets from the vault

Usage:

pmv-cli random [OPTIONS]

Options:

OptionDescription
-s, --seed <SEED>PRNG seed
-p, --page-size <PAGE_SIZE>Page size, 10 by default
-t, --tag <TAG>Filter by a tag
-e, --extendedExtended version of the results table
-c, --csvCSV format
-h, --helpPrint help

Searches for media assets in the vault (Basic)

Usage:

pmv-cli search [OPTIONS]

Options:

OptionDescription
-p, --page <PAGE>Selects the results page. The fist page is the page 1
-s, --page-size <PAGE_SIZE>Page size, 10 by default
-t, --tag <TAG>Filter by a tag
-r, --reverseReverses results sorting. By default newest results are first. With this option, oldest results are first
-e, --extendedExtended version of the results table
-c, --csvCSV format
-h, --helpPrint help

Searches for media assets in the vault (Advanced)

Usage:

pmv-cli advanced-search [OPTIONS]

Options:

OptionDescription
-q, --title <TITLE>Filter by title
-d, --description <DESCRIPTION>Filter by description
-k, --media-type <MEDIA_TYPE>Filter by media type. Can be: video, audio or image
-t, --tags <TAGS>Filter by tags. Expected a list of tag names, separated by spaces
-m, --tags-mode <TAGS_MODE>Tag filtering mode. Can be: all, any, none or untagged
-a, --album <ALBUM>Filter by album. Expected an album ID, like: #1
-l, --limit <LIMIT>Limit on the number of results to get. 25 by default
-s, --start-from <START_FROM>Media id to use as a stating point for the scanning process
-r, --reverseReverses results sorting. By default newest results are first. With this option, oldest results are first
-e, --extendedExtended version of the results table
-c, --csvCSV format
-h, --helpPrint help

Command: tag

Manages tags

Usage:

pmv-cli tag <COMMAND>

Commands:

CommandDescription
listList tags
addAdds a tag to a media asset
removeRemoves a tag from a media asset

Options:

OptionDescription
-h, --helpPrint help

Command: tag list

List tags

Usage:

pmv-cli tag list [OPTIONS]

Options:

OptionDescription
-c, --csvCSV format
-a, --alphabeticallySort alphabetically by name
-h, --helpPrint help

Command: tag add

Adds a tag to a media asset

Usage:

pmv-cli tag add <TAG> <MEDIA>

Arguments:

ArgumentDescription
<TAG>Tag name or identifier
<MEDIA>Media asset ID

Options:

OptionDescription
-h, --helpPrint help

Command: tag remove

Removes a tag from a media asset

Usage:

pmv-cli tag remove <TAG> <MEDIA>

Arguments:

ArgumentDescription
<TAG>Tag name or identifier
<MEDIA>Media asset ID

Options:

OptionDescription
-h, --helpPrint help

Command: album

Manages albums

Usage:

pmv-cli album <COMMAND>

Commands:

CommandDescription
listList albums
getGet album and prints it
createCreates a new album
renameRenames an album
deleteDeletes album
addAdds a media asset to an album
removeRemoves a media asset from an album
set-positionChanges the position of a media asset inside al album

Options:

OptionDescription
-h, --helpPrint help

Command: album list

List albums

Usage:

pmv-cli album list [OPTIONS]

Options:

OptionDescription
-m, --media <MEDIA>Filter by media
-c, --csvCSV format
-a, --alphabeticallySort alphabetically by name
-i, --id-sortedSort by ID
-h, --helpPrint help

Command: album get

Get album and prints it

Usage:

pmv-cli album get [OPTIONS] <ALBUM>

Arguments:

ArgumentDescription
<ALBUM>Album ID

Options:

OptionDescription
-e, --extendedExtended version of the results table
-c, --csvCSV format
-h, --helpPrint help

Command: album create

Creates a new album

Usage:

pmv-cli album create <NAME>

Arguments:

ArgumentDescription
<NAME>Album name

Options:

OptionDescription
-h, --helpPrint help

Command: album rename

Renames an album

Usage:

pmv-cli album rename <ALBUM> <NAME>

Arguments:

ArgumentDescription
<ALBUM>Album ID
<NAME>Album name

Options:

OptionDescription
-h, --helpPrint help

Command: album delete

Deletes album

Usage:

pmv-cli album delete <ALBUM>

Arguments:

ArgumentDescription
<ALBUM>Album ID

Options:

OptionDescription
-h, --helpPrint help

Command: album add

Adds a media asset to an album

Usage:

pmv-cli album add <ALBUM> <MEDIA>

Arguments:

ArgumentDescription
<ALBUM>Album ID
<MEDIA>Media asset ID

Options:

OptionDescription
-h, --helpPrint help

Command: album remove

Removes a media asset from an album

Usage:

pmv-cli album remove <ALBUM> <MEDIA>

Arguments:

ArgumentDescription
<ALBUM>Album ID
<MEDIA>Media asset ID

Options:

OptionDescription
-h, --helpPrint help

Command: album set-position

Changes the position of a media asset inside al album

Usage:

pmv-cli album set-position <ALBUM> <MEDIA> <POSITION>

Arguments:

ArgumentDescription
<ALBUM>Album ID
<MEDIA>Media asset ID
<POSITION>New position for the media asset, starting at 1

Options:

OptionDescription
-h, --helpPrint help

Command: config

Manages vault configuration

Usage:

pmv-cli config <COMMAND>

Commands:

CommandDescription
getGets vault configuration
get-cssGets custom CSS code configured for the vault
set-titleSets vault title
set-max-tasksSets max tasks in parallel
set-encoding-threadsSets number of encoding threads to use
set-video-previews-intervalSets the video previews interval in seconds
set-cssSets custom CSS for the vault
clear-cssClears custom CSS for the vault
add-video-resolutionAdds video resolution
remove-video-resolutionRemoves video resolution
add-image-resolutionAdds image resolution
remove-image-resolutionRemoves image resolution

Options:

OptionDescription
-h, --helpPrint help

Command: config get

Gets vault configuration

Usage:

pmv-cli config get

Options:

OptionDescription
-h, --helpPrint help

Command: config get-css

Gets custom CSS code configured for the vault

Usage:

pmv-cli config get-css

Options:

OptionDescription
-h, --helpPrint help

Command: config set-title

Sets vault title

Usage:

pmv-cli config set-title <TITLE>

Arguments:

ArgumentDescription
<TITLE>Vault title

Options:

OptionDescription
-h, --helpPrint help

Command: config set-max-tasks

Sets max tasks in parallel

Usage:

pmv-cli config set-max-tasks <MAX_TASKS>

Arguments:

ArgumentDescription
<MAX_TASKS>Max tasks in parallel

Options:

OptionDescription
-h, --helpPrint help

Command: config set-encoding-threads

Sets number of encoding threads to use

Usage:

pmv-cli config set-encoding-threads <ENCODING_THREADS>

Arguments:

ArgumentDescription
<ENCODING_THREADS>Number of encoding threads to use

Options:

OptionDescription
-h, --helpPrint help

Command: config set-video-previews-interval

Sets the video previews interval in seconds

Usage:

pmv-cli config set-video-previews-interval <INTERVAL_SECONDS>

Arguments:

ArgumentDescription
<INTERVAL_SECONDS>Interval in seconds

Options:

OptionDescription
-h, --helpPrint help

Command: config set-css

Sets custom CSS for the vault

Usage:

pmv-cli config set-css <FILE_PATH>

Arguments:

ArgumentDescription
<FILE_PATH>Path to the css file to use

Options:

OptionDescription
-h, --helpPrint help

Command: config clear-css

Clears custom CSS for the vault

Usage:

pmv-cli config clear-css

Options:

OptionDescription
-h, --helpPrint help

Command: config add-video-resolution

Adds video resolution

Usage:

pmv-cli config add-video-resolution <RESOLUTION>

Arguments:

ArgumentDescription
<RESOLUTION>Video resolution. Example: 1280x720:30

Options:

OptionDescription
-h, --helpPrint help

Command: config remove-video-resolution

Removes video resolution

Usage:

pmv-cli config remove-video-resolution <RESOLUTION>

Arguments:

ArgumentDescription
<RESOLUTION>Video resolution. Example: 1280x720:30

Options:

OptionDescription
-h, --helpPrint help

Command: config add-image-resolution

Adds image resolution

Usage:

pmv-cli config add-image-resolution <RESOLUTION>

Arguments:

ArgumentDescription
<RESOLUTION>Image resolution. Example: 1280x720

Options:

OptionDescription
-h, --helpPrint help

Command: config remove-image-resolution

Removes image resolution

Usage:

pmv-cli config remove-image-resolution <RESOLUTION>

Arguments:

ArgumentDescription
<RESOLUTION>Image resolution. Example: 1280x720

Options:

OptionDescription
-h, --helpPrint help

Command: task

Retrieves tasks information

Usage:

pmv-cli task <COMMAND>

Commands:

CommandDescription
listLists current existing tasks
monitorMonitors tasks
getGet task status
waitWaits for a task to finish, monitoring its status

Options:

OptionDescription
-h, --helpPrint help

Command: task list

Lists current existing tasks

Usage:

pmv-cli task list [OPTIONS]

Options:

OptionDescription
-c, --csvCSV format
-h, --helpPrint help

Command: task monitor

Monitors tasks

Usage:

pmv-cli task monitor

Options:

OptionDescription
-h, --helpPrint help

Command: task get

Get task status

Usage:

pmv-cli task get <TASK>

Arguments:

ArgumentDescription
<TASK>Task identifier

Options:

OptionDescription
-h, --helpPrint help

Command: task wait

Waits for a task to finish, monitoring its status

Usage:

pmv-cli task wait <TASK>

Arguments:

ArgumentDescription
<TASK>Task identifier

Options:

OptionDescription
-h, --helpPrint help

Command: invites

Manages invites

Usage:

pmv-cli invites <COMMAND>

Commands:

CommandDescription
checkPrints the current invite code, if any
generateGenerates a new invite code
clearClears the current invite code
list-sessionsList active invited sessions
close-sessionCloses an invited session

Options:

OptionDescription
-h, --helpPrint help

Command: invites check

Prints the current invite code, if any

Usage:

pmv-cli invites check

Options:

OptionDescription
-h, --helpPrint help

Command: invites generate

Generates a new invite code

Usage:

pmv-cli invites generate [OPTIONS]

Options:

OptionDescription
-D, --duration <DURATION>Session duration. Can be: day, week, month or year
-h, --helpPrint help

Command: invites clear

Clears the current invite code

Usage:

pmv-cli invites clear

Options:

OptionDescription
-h, --helpPrint help

Command: invites list-sessions

List active invited sessions

Usage:

pmv-cli invites list-sessions [OPTIONS]

Options:

OptionDescription
-c, --csvCSV format
-h, --helpPrint help

Command: invites close-session

Closes an invited session

Usage:

pmv-cli invites close-session <INDEX>

Arguments:

ArgumentDescription
<INDEX>Session index

Options:

OptionDescription
-h, --helpPrint help

Command: batch

Applies a batch operation to a list of media assets

Usage:

pmv-cli batch [OPTIONS] <COMMAND>

Commands:

CommandDescription
add-tagsAdds tags to the media assets
remove-tagsRemoves tags from the media assets
add-to-albumAdds media assets into an album
remove-from-albumRemoves media assets from an album, if they were in it
deleteDelete media assets

Options:

OptionDescription
-q, --title <TITLE>Filter by title
-d, --description <DESCRIPTION>Filter by description
-k, --media-type <MEDIA_TYPE>Filter by media type. Can be: video, audio or image
-t, --tags <TAGS>Filter by tags. Expected a list of tag names, separated by spaces
-m, --tags-mode <TAGS_MODE>Tag filtering mode. Can be: all, any, none or untagged
-a, --album <ALBUM>Filter by album. Expected an album ID, like: #1
-e, --everythingDo not filter. Apply to the entire vault instead
-h, --helpPrint help

Command: batch add-tags

Adds tags to the media assets

Usage:

pmv-cli batch add-tags <TAGS>

Arguments:

ArgumentDescription
<TAGS>List of tag names, separated by spaces

Options:

OptionDescription
-h, --helpPrint help

Command: batch remove-tags

Removes tags from the media assets

Usage:

pmv-cli batch remove-tags <TAGS>

Arguments:

ArgumentDescription
<TAGS>List of tag names, separated by spaces

Options:

OptionDescription
-h, --helpPrint help

Command: batch add-to-album

Adds media assets into an album

Usage:

pmv-cli batch add-to-album <ALBUM>

Arguments:

ArgumentDescription
<ALBUM>Album ID

Options:

OptionDescription
-h, --helpPrint help

Command: batch remove-from-album

Removes media assets from an album, if they were in it

Usage:

pmv-cli batch remove-from-album <ALBUM>

Arguments:

ArgumentDescription
<ALBUM>Album ID

Options:

OptionDescription
-h, --helpPrint help

Command: batch delete

Delete media assets

Usage:

pmv-cli batch delete

Options:

OptionDescription
-h, --helpPrint help

Command: get-server-information

Gets server information, like the version it is using

Usage:

pmv-cli get-server-information

Options:

OptionDescription
-h, --helpPrint help