Cleaned up and merge other Linux snippit repo
Meged https://git.bprieshof.nl/brammp/linux into ./Linux
This commit is contained in:
2
Linux/Docs/rffmpeg/README.md
Normal file
2
Linux/Docs/rffmpeg/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
This Guide uses NFS for saring the Transcode tmp folder
|
||||
This tool expects the media folder(s) to be mounted/located at same location as Primary(Jellyfin) server
|
||||
78
Linux/Docs/rffmpeg/Setup-Primary.md
Normal file
78
Linux/Docs/rffmpeg/Setup-Primary.md
Normal file
@@ -0,0 +1,78 @@
|
||||
## Prerequisites:
|
||||
* A running jellyfin server on the Primary
|
||||
|
||||
## Step 1: Configuring Jellyfin and preparing the server
|
||||
|
||||
### Transcode temp folder
|
||||
#### Sharing the the local trancode folder
|
||||
Make the new trancode folder
|
||||
```
|
||||
mkdir /var/lib/jellyfin/transcoding-temp
|
||||
```
|
||||
NFS is the recomend way of sharing this folder, but SMB/CIFS shoud also work
|
||||
```
|
||||
apt -y install nfs-kernel-server
|
||||
echo '/var/lib/jellyfin/transcoding-temp <Network IP>/24(rw,sync,no_subtree_check)' >> /etc/exports
|
||||
systemctl restart nfs-kernel-server
|
||||
```
|
||||
Set the following setting in jellyfin "Transcode path" in the Playback settings to "/var/lib/jellyfin/transcoding-temp"
|
||||
|
||||
#### Useing a existing remote share trancode folder
|
||||
Make sure the folder is mounted at"/var/lib/jellyfin/transcoding-temp"
|
||||
Set the following setting in jellyfin "Transcode path" in the Playback settings to "/var/lib/jellyfin/transcoding-temp"
|
||||
|
||||
### Jellyfin user
|
||||
Generating sshkey pair without password
|
||||
```
|
||||
sudo -u jellyfin mkdir -p /var/lib/jellyfin/.ssh
|
||||
sudo -u jellyfin ssh-keygen -t rsa -f /var/lib/jellyfin/.ssh/id_rsa
|
||||
```
|
||||
Set the jellyfin user to login as bash in /etc/passwd
|
||||
|
||||
## Step 2: Install slave/render servers
|
||||
|
||||
### Getting info
|
||||
Run `cat /etc/passwd | grep jellyfin:` to get user info, i will refer to it as `<JelUser>`
|
||||
Run `cat /etc/group | grep jellyfin:`, to get group info, i will refer to it as `<JelGroup>`
|
||||
Run `cat /var/lib/jellyfin/.ssh/id_rsa.pub` To get ssh-key for sending commands , i will refer to it as `<PrimaryPubKey>`
|
||||
Get the ip of the Primary, i will refer to it as `<PrimaryIP>`
|
||||
|
||||
### Installing on the remote slave
|
||||
Use the info you collected en follow "Slave-install.md"
|
||||
```
|
||||
sudo -u jellyfin ssh -i /var/lib/jellyfin/.ssh/id_rsa jellyfin@<SlaveIP>
|
||||
```
|
||||
When connected to the Primary exit the session with the slave server
|
||||
Repeat these steps for all slave server
|
||||
|
||||
### Adding local system as slave
|
||||
```
|
||||
echo 'ssh-rsa <PrimaryPubKey>' | sudo -u jellyfin tee /var/lib/jellyfin/.ssh/authorized_keys
|
||||
sudo -u jellyfin ssh -i /var/lib/jellyfin/.ssh/id_rsa jellyfin@localhost
|
||||
```
|
||||
|
||||
## Step 3: Installing rffmpeg
|
||||
```
|
||||
mkdir /etc/rffmpeg /opt/rffmpeg
|
||||
wget https://raw.githubusercontent.com/joshuaboniface/rffmpeg/master/rffmpeg.yml.sample -O /etc/rffmpeg/rffmpeg.yml
|
||||
wget https://raw.githubusercontent.com/joshuaboniface/rffmpeg/master/rffmpeg -O /opt/rffmpeg/rffmpeg.py
|
||||
ln -s /usr/local/bin/rffmpeg.py /opt/rffmpeg/ffmpeg
|
||||
ln -s /usr/local/bin/rffmpeg.py /opt/rffmpeg/ffprobe
|
||||
```
|
||||
## Step 3: Configuring rffmpeg
|
||||
Add to the host section of /etc/rffmpeg/rffmpeg.yml
|
||||
Example of the section in the config file
|
||||
```
|
||||
remote:
|
||||
# A YAML list of remote hosts to connect to
|
||||
hosts:
|
||||
- 192.168.1.2
|
||||
- 192.168.1.3
|
||||
```
|
||||
if you also want the local system to render add localhost or 127.0.0.1
|
||||
|
||||
|
||||
## Step 4: Set jellyfin to use rffmpeg
|
||||
Set the following setting in jellyfin "FFmpeg path" in the Playback settings to "/opt/rffmpeg/ffmpeg"
|
||||
|
||||
## Done
|
||||
43
Linux/Docs/rffmpeg/Setup-Worker.md
Normal file
43
Linux/Docs/rffmpeg/Setup-Worker.md
Normal file
@@ -0,0 +1,43 @@
|
||||
## Prerequisites:
|
||||
* You set up the Primary following Primary-Install.md and have the information reddy
|
||||
* A Clean install of ubuntu linux with ssh-server enabled
|
||||
* The media folder accessible on the same location as the jellyfin server
|
||||
|
||||
## Step 1: Setting up the user
|
||||
```
|
||||
mkdir -p /var/lib/jellyfin/.ssh
|
||||
echo "<JelUser>" >> /etc/passwd
|
||||
echo "<JelGroup>" >> /etc/group
|
||||
echo "jellyfin:*:17928:0:99999:7:::" >> /etc/shadow
|
||||
```
|
||||
Reboot the system just to make sure changes are piked up
|
||||
|
||||
```
|
||||
echo '<PrimaryPubKey>' >> /var/lib/jellyfin/.ssh/authorized_keys
|
||||
chmod 755 -R /var/lib/jellyfin/
|
||||
chown -R jellyfin:jellyfin /var/lib/jellyfin/
|
||||
```
|
||||
|
||||
## Step 2: setting up the Transcode temp folder
|
||||
if you are not using NFS make sure the folder is mounted to "/var/lib/jellyfin/transcoding-temp" and skip the rest of step 2
|
||||
|
||||
### Setting up NFS Client
|
||||
```
|
||||
apt install nfs-common -y
|
||||
mkdir -p /var/lib/jellyfin/transcoding-temp
|
||||
chmod 777 /var/lib/jellyfin/transcoding-temp
|
||||
echo '<PrimaryIP>:/var/lib/jellyfin/transcoding-temp /var/lib/jellyfin/transcoding-temp nfs defaults,vers=3,sync 0 0' >> /etc/fstab
|
||||
sudo mount -a
|
||||
```
|
||||
|
||||
## Step 3: Install the jellyfin version of ffmpeg
|
||||
```
|
||||
apt install apt-transport-https -y
|
||||
add-apt-repository universe -y
|
||||
wget -O - https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo apt-key add -
|
||||
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/ubuntu $( lsb_release -c -s ) main" >> /etc/apt/sources.list.d/jellyfin.list
|
||||
apt update
|
||||
apt install jellyfin-ffmpeg -y
|
||||
```
|
||||
## Done
|
||||
Continue reading "Primary-Install.md"
|
||||
Reference in New Issue
Block a user