vulcanridr

Video content -- Cleanup on aisle 4

One of my projects earlier this year, was to clean up my video content. I had about 2.3TB of video files, movies, TV shows, and some gaming content. For the TV shows and movies, I a plex server on a jail on my network. Running plex is another level of annoyance, since they moved the ability to watch my own content on my own network on plex behind their paywall. But that is a rant for another day...

I found, a while back, presumably after an update, is that I was unable to play content through plex if the file was 1.5 to 2GB or larger. This occurred about some time in late 2023, since one of the things I could no longer play was my Babylon 5 videos, and I did a 30th anniversary rewatch in summer of 2023. Initially it seemed random that some videos would play in mplayer and vlc, but would just "sit and spin" in plex.

So I had a bit of spare time, and started looking at the videos that would not play in plex. All of them were in the 1.5-2GB or larger range. I started to look into re-encoding videos, using ffmpeg, and in my research, found that thanks to streaming, codec developers have really stepped up, and said codecs are far more efficient.

So I started with my "video_clips" directory, mostly some old Cold Waters content from 2017-2019, and some Kerbal Space Program videos from 2022 to present and various short-form videos I have collected. Most of the files were mp4 format, but I also had some mpg, mkv, even a few wmvs and flvs.

I started with a couple of files, and re-encoded them, and had a decent amount of success. I found that I was getting about a 66% size reduction with little to no noticeable reduction in video or audio quality.

I set up a bash for loop and used a the following ffmpeg incantation to convert the videos:
ffmpeg -i $x -c:a aac -c:v libx264 -crf 28 ../$x

After several weeks of turning electricity into heat, I managed to go through video clips and the main video content directory. All told, the video_clips directory was reduced from 768GB to 258GB. The main movies and TV directories dropped from 2.3TB to 618GB, and even better, everything appears to work in plex.

So if you have the time, desire, and cpu cycles, it is worth the space savings.