Skip to content

Commit 180f752

Browse files
committed
docs(book): added the docs.video2x.org mdBook source files and pipeline
Signed-off-by: k4yt3x <i@k4yt3x.com>
1 parent a77cf9e commit 180f752

File tree

22 files changed

+517
-0
lines changed

22 files changed

+517
-0
lines changed

.github/workflows/docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
deploy:
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Install mdBook
28+
run: |
29+
version="$(curl https://api.github.com/repos/rust-lang/mdBook/releases/latest | jq -r '.tag_name')"
30+
curl -sSL "https://github.com/rust-lang/mdBook/releases/download/$version/mdbook-$version-x86_64-unknown-linux-musl.tar.gz" | tar -xz
31+
sudo mv mdbook /usr/local/bin/
32+
33+
- name: Build Docs with mdBook
34+
run: mdbook build -d "$PWD/build/docs/book" docs/book
35+
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v5
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: "build/docs/book"
43+
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

docs/book/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
book

docs/book/book.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[book]
2+
authors = ["k4yt3x"]
3+
language = "en"
4+
multilingual = false
5+
title = "Video2X Documentation"
6+
7+
[output.html]
8+
default-theme = "ayu"
9+
preferred-dark-theme = "ayu"
10+
git-repository-url = "https://github.com/k4yt3x/video2x"
11+
edit-url-template = "https://github.com/k4yt3x/video2x/edit/master/docs/guide/{path}"

docs/book/src/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Introduction
2+
3+
<p align="center">
4+
<img src="https://github.com/user-attachments/assets/5cd63373-e806-474f-94ec-6e04963bf90f"/>
5+
</p>
6+
7+
This site hosts the documentations for the Video2X project, a machine learning-based lossless video super resolution & frame interpolation framework.
8+
9+
The project's homepage is located on GitHub at: [https://github.com/k4yt3x/video2x](https://github.com/k4yt3x/video2x).
10+
11+
If you have any questions, suggestions, or found any issues in the documentations, please [open an issue](https://github.com/k4yt3x/video2x/issues/new/choose) on GitHub.
12+
13+
> 🚧 Some pages are still under construction.

docs/book/src/SUMMARY.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Summary
2+
3+
[Introduction](README.md)
4+
5+
# Building
6+
7+
- [Building](building/README.md)
8+
- [Windows](building/windows.md)
9+
- [Windows (Qt6)](building/windows-qt6.md)
10+
- [Linux](building/linux.md)
11+
12+
# Installing
13+
14+
- [Installing](installing/README.md)
15+
- [Windows (Command Line)](installing/windows.md)
16+
- [Windows (Qt6 GUI)](installing/windows-qt6.md)
17+
- [Linux](installing/linux.md)
18+
19+
# Running
20+
21+
- [Running](running/README.md)
22+
- [Desktop](running/desktop.md)]
23+
- [Command Line](running/command-line.md)
24+
- [Container](running/container.md)
25+
26+
# Developing
27+
28+
- [Developing](developing/README.md)
29+
- [Architecture](developing/architecture.md)
30+
- [libvideo2x](developing/libvideo2x.md)
31+
32+
# Other
33+
34+
- [Other](other/README.md)
35+
- [History](other/history.md)

docs/book/src/building/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Building
2+
3+
Instructions for building the project.

docs/book/src/building/linux.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Linux
2+
3+
Instructions for building this project on Linux.
4+
5+
## Arch Linux
6+
7+
Arch users can build the latest version of the project from the AUR package `video2x-git`. The project's repository also contains another PKGBUILD example at `packaging/arch/PKGBUILD`.
8+
9+
```bash
10+
# Build only
11+
git clone https://aur.archlinux.org/video2x-git.git
12+
cd video2x-git
13+
makepkg -s
14+
```
15+
16+
To build manually from the source, follow the instructions below.
17+
18+
```bash
19+
# Install build and runtime dependencies
20+
# See the PKGBUILD file for the list of up-to-date dependencies
21+
pacman -Sy ffmpeg ncnn vulkan-driver opencv spdlog boost-libs
22+
pacman -Sy git cmake make clang pkgconf vulkan-headers openmp boost
23+
24+
# Clone the repository
25+
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
26+
cd video2x
27+
28+
# Build the project
29+
make build
30+
```
31+
32+
The built binaries will be located in the `build` directory.
33+
34+
## Ubuntu
35+
36+
Ubuntu users can use the `Makefile` to build the project automatically. The `ubuntu2404` and `ubuntu2204` targets are available for Ubuntu 24.04 and 22.04, respectively. `make` will automatically install the required dependencies, build the project, and package it into a `.deb` package file. It is recommended to perform the build in a container to ensure the environment's consistency and to avoid leaving extra build packages on your system.
37+
38+
```bash
39+
# make needs to be installed manually
40+
sudo apt-get update && sudo apt-get install make
41+
42+
# Clone the repository
43+
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
44+
cd video2x
45+
46+
# Build the project
47+
make ubuntu2404
48+
```
49+
50+
The built `.deb` package will be located under the current directory.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Windows (Qt6)
2+
3+
Instructions for building the Qt6 GUI of this project on Windows.
4+
5+
## 1. Prerequisites
6+
7+
These dependencies must be installed before building the project. This tutorial assumes that Qt6 has been installed to the default location (`C:\Qt`).
8+
9+
- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
10+
- Workload: Desktop development with C++
11+
- [winget-cli](https://github.com/microsoft/winget-cli)
12+
- [Qt6](https://www.qt.io/download)
13+
- Component: Qt6 with MSVC 2022 64-bit
14+
- Component: Qt Creator
15+
16+
## 1. Clone the Repository
17+
18+
```bash
19+
# Install Git if not already installed
20+
winget install -e --id=Git.Git
21+
22+
# Clone the repository
23+
git clone --recurse-submodules https://github.com/k4yt3x/video2x-qt6.git
24+
cd video2x-qt6
25+
```
26+
27+
## 2. Install Dependencies
28+
29+
You need to have the `libvideo2x` shared library built before building the Qt6 GUI. Put the built binaries in `third_party/libvideo2x-shared`.
30+
31+
```bash
32+
# Versions of manually installed dependencies
33+
$ffmpegVersion = "7.1"
34+
35+
# Download and extract FFmpeg
36+
curl -Lo ffmpeg-shared.zip "https://github.com/GyanD/codexffmpeg/releases/download/$ffmpegVersion/ffmpeg-$ffmpegVersion-full_build-shared.zip"
37+
Expand-Archive -Path ffmpeg-shared.zip -DestinationPath third_party
38+
Rename-Item -Path "third_party/ffmpeg-$ffmpegVersion-full_build-shared" -NewName ffmpeg-shared
39+
```
40+
41+
## 3. Build the Project
42+
43+
1. Open the `CMakeLists.txt` file in Qt Creator as the project file.
44+
2. Click on the hammer icon at the bottom left of the window to build the project.
45+
3. Built binaries will be located in the `build` directory.
46+
47+
After the build finishes, you will need to copy the Qt6 DLLs and other dependencies to the build directory to run the application. Before you run the following commands, remove everything in the release directory except for `video2x-qt6.exe` and the `.qm` files as they are not required for running the application. Then, run the following command to copy the Qt6 runtime DLLs:
48+
49+
```bash
50+
C:\Qt\6.8.0\msvc2022_64\bin\windeployqt.exe --release --compiler-runtime .\build\Desktop_Qt_6_8_0_MSVC2022_64bit-Release\video2x-qt6.exe
51+
```
52+
53+
You will also need to copy the `libvideo2x` shared library to the build directory. Copy all files under `third_party/libvideo2x-shared` to the release directory except for `include`, `libvideo2x.lib`, and `video2x.exe`.
54+
55+
Now you should be able to run the application by double-clicking on `video2x-qt6.exe`.

docs/book/src/building/windows.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Windows
2+
3+
Instructions for building this project on Windows.
4+
5+
## 1. Prerequisites
6+
7+
The following tools must be installed manually:
8+
9+
- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
10+
- Workload: Desktop development with C++
11+
- [winget-cli](https://github.com/microsoft/winget-cli)
12+
13+
## 2. Clone the Repository
14+
15+
```bash
16+
# Install Git if not already installed
17+
winget install -e --id=Git.Git
18+
19+
# Clone the repository
20+
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
21+
cd video2x
22+
```
23+
24+
## 3. Install Dependencies
25+
26+
```bash
27+
# Install CMake
28+
winget install -e --id=Kitware.CMake
29+
30+
# Install Vulkan SDK
31+
winget install -e --id=KhronosGroup.VulkanSDK
32+
33+
# Versions of manually installed dependencies
34+
$ffmpegVersion = "7.1"
35+
$ncnnVersion = "20240820"
36+
37+
# Download and extract FFmpeg
38+
curl -Lo ffmpeg-shared.zip "https://github.com/GyanD/codexffmpeg/releases/download/$ffmpegVersion/ffmpeg-$ffmpegVersion-full_build-shared.zip"
39+
Expand-Archive -Path ffmpeg-shared.zip -DestinationPath third_party
40+
Rename-Item -Path "third_party/ffmpeg-$ffmpegVersion-full_build-shared" -NewName ffmpeg-shared
41+
42+
# Download and extract ncnn
43+
curl -Lo ncnn-shared.zip "https://github.com/Tencent/ncnn/releases/download/$ncnnVersion/ncnn-$ncnnVersion-windows-vs2022-shared.zip"
44+
Expand-Archive -Path ncnn-shared.zip -DestinationPath third_party
45+
Rename-Item -Path "third_party/ncnn-$ncnnVersion-windows-vs2022-shared" -NewName ncnn-shared
46+
```
47+
48+
## 4. Build the Project
49+
50+
```bash
51+
cmake -S . -B build -DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DUSE_SYSTEM_BOOST=OFF `
52+
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/libvideo2x-shared
53+
cmake --build build --config Release --parallel --target install
54+
```
55+
56+
The built binaries will be located in `build/libvideo2x-shared`.

docs/book/src/developing/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Developing
2+
3+
Development-related instructions and guidelines for this project.

0 commit comments

Comments
 (0)