Update files

This commit is contained in:
Andros Fenollosa 2023-04-18 12:56:23 +02:00
parent e599f1c7f7
commit 751cb6abc8
10 changed files with 30 additions and 17 deletions

View File

@ -2,32 +2,47 @@
Collection of Bash scripts that execute functionalities in folders. Collection of Bash scripts that execute functionalities in folders.
## Video to mp4 ## Video optmizer
Folder that watches when new videos are added to a folder and optimizes them.
### Requirements
- `inotify-tools`
- `ffmpeg`
Example in Debian.
``` sh
sudo apt install inotify-tools ffmpeg
```
### Install ### Install
``` sh
curl -o dynamic-folders-video-optimizer https://raw.githubusercontent.com/tanrax/dynamic-folders/main/dynamic-folders-video-optimizer.sh && chmod +x dynamic-folders-video-optimizer && sudo mv dynamic-folders-video-optimizer /usr/local/bin
```
### Run ### Run
``` sh
dynamic-folders-video-optimizer [folder to watch]
```
### Service ### Service
```sh
wget /etc/systemd/system/github-runner-glosa.service
curl -o maza https://raw.githubusercontent.com/tanrax/maza-ad-blocking/master/maza && chmod +x maza && sudo mv maza /usr/local/bin
```
```ini ```ini
[Unit] [Unit]
Description=Github runner glosa Description=Folder that watches when new videos are added to a folder and optimizes them.
After=network.target
[Service] [Service]
Restart=always Restart=always
RestartSec=5 RestartSec=5
User=github User=[user]
Group=github Group=[user]
Restart=always WorkingDirectory=/home/[user]
WorkingDirectory=/home/github/actions-runner ExecStart=dynamic-folders-video-optimizer [folder to watch]
ExecStart=/home/user/
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# -- # --
# Description: Script that watches when new videos are added to a folder and optimizes them to mp4 for Web. # Description: Script that watches when new videos are added to a folder and optimizes them.
# -- # --
# Requirements: Install inotify-tools and ffmpeg # Requirements: Install inotify-tools and ffmpeg
# Example Debian: $sudo apt install inotify-tools ffmpeg # Example Debian: $sudo apt install inotify-tools ffmpeg
@ -29,7 +29,7 @@ usage() {
cat << EOF cat << EOF
Usage: $PROGNAME [OPTION] Usage: $PROGNAME [OPTION]
Watches when new videos are added to a folder and optimizes them to mp4 for Web. Watches when new videos are added to a folder and optimizes them.
Options: Options:
--folder [path] Folder path where new video will be monitored and optimized --folder [path] Folder path where new video will be monitored and optimized
--help Display this usage message and exit --help Display this usage message and exit

View File

View File

View File

@ -1 +0,0 @@

View File

@ -1 +0,0 @@