How to Add a Library on Plex Media Server (with Example)

https://ns1.my.id/unggah/2022/12/plex-app-home.jpg
Plex Home

After Plex Media Server was successfully claimed to your Plex account.

You can start adding a library to it, click MORE on your home, and then click the + button.

https://ns1.my.id/unggah/2022/12/add-a-library-plex.gif
  • Choose the library type from the selection
  • Name the library and choose the language to use for information gathered from the internet. Click https://ns1.my.id/unggah/2022/12/NextBTNV2.png
  • Next, add the folders with the media files. Click https://ns1.my.id/unggah/2022/12/mceclip3-19.png
  • Choose the folder to add then click https://ns1.my.id/unggah/2022/12/AddBTNV2.png To remove a folder, click https://ns1.my.id/unggah/2022/12/XButtonV2.png
  • Once you’ve added all the source folders for this library, click https://ns1.my.id/unggah/2022/12/AddLibraryBTNV2-2.png
Creating Libraries | Plex Support
Overview To create a library, launch the Plex Web App then: Click to open the settings menu Ensure that the...

Example instruction:

I want to add a new TV Shows library with name "Kuruluş: Osman". All of episodes available on their YouTube actually but since their YouTube didn't provide english subtitle, so I will try to add it and watch it from my Plex, because Plex provide automatic english subtitle integrated with Opensubtitles.

Create a new Library type

Step 1: You need to create a new library with name "Series" with library type: TV Shows.

https://ns1.my.id/unggah/2022/12/plex-add-tv-shows-library.jpg
Add a new TV Shows Library with name Series

Click the Next button to proceed.

Add folders

Step 2: On Add folders to your library section, click BROWSE FOR MEDIA PLAYER, and a pop-up will appear.

Connect SSH to your server, and create a new directory on /opt/plex/series

mkdir -p /opt/plex/series

and change the owner to plex user.

chown plex:plex /opt/plex/series/

And then choose into /opt/plex/series. Click Add Library button to proceed.

https://ns1.my.id/unggah/2022/12/plex-new-directory.gif
Browse into /opt/plex/series and add library

Series library created

Step 3: Now you'll be redirected to Series Library on your plex media server.

https://ns1.my.id/unggah/2022/12/plex-redroc-series-min.jpg
currently, "Series" library is empty

Add videos

Step 4: To add a new tv show video, we need to SSH back to your server, and then download the youtube videos using yt-dlp (as known as Youtube downloader). You can check more about the yt-dlp on their github.

GitHub - yt-dlp/yt-dlp: A youtube-dl fork with additional features and fixes
A youtube-dl fork with additional features and fixes - GitHub - yt-dlp/yt-dlp: A youtube-dl fork with additional features and fixes

Install yt-dlp with the following command:

pip3 install yt-dlp

And download the TV Shows episode 1 here: https://www.youtube.com/watch?v=0fTJyCTwznM

mkdir -p /opt/plex/series/osman #Create a new folder osman
chown plex:plex /opt/plex/series/osman #change owner to plex user
cd /opt/plex/series/osman #change to osman dir
yt-dlp https://www.youtube.com/watch?v=0fTJyCTwznM 
https://ns1.my.id/unggah/2022/12/yt-dlp-youtube-downloader-cli.jpg
yt-dlp successfully downloaded youtube video

Yt-dlp will download the best-quality of a video. After successfully downloading a youtube video, we can check the list files of a directory by using the following command:

ls

Output:

root@redroc:/opt/plex/series/osman# ls
'Kuruluş Osman 1. Bölüm [0fTJyCTwznM].mp4'

rename the file you've downloaded to format TV_Shows_S01E01.mp4 (plex: Naming and Organizing Your TV Show Files)

mv 'Kuruluş Osman 1. Bölüm [0fTJyCTwznM].mp4' Kurulus_Osman_S01E01.mp4
🦉
You need to rename the TV shows file to the available format, to ensure the meta description of the series is completely fetched into your Plex.

Scan Library Files

Step 5: After a video has been added, you need to scan library files on your Plex. Like a refresh button.

https://ns1.my.id/unggah/2022/12/plex-scan-library-files.gif
"Series" is currently being updated

Please wait, your series library is being updated.

That's it, you can start watching your videos collections by clicking ▶️ / ▶️ Play / ▶️ Resume

https://ns1.my.id/unggah/2022/12/plex-display-series.jpg

Download english subtitle

Step 6: If the videos didn't have english subtitles, you can download the english subtitle on Plex Video Player with these steps:

Plex add subtitle
Add subtitle to plex video player

Click on Options, and then Subtitles->Search Subtitles. Plex will automatically download the subtitle based on the TV Shows from opensubtitles.org

You can customize the subtitle color, subtitle position, and subtitle size on the Options.

Plex added subtitles successfully
Your plex successfully downloaded subtitles

Done! thank you for reading, anyways.

Best regards,

-Average SysAdmin