Is there a way to automatically convert DVR files after recording in Plex?

I remember a post from @The_DBP where they shared a script that may help or at least get you started. https://forums.plex.tv/t/aio-ubuntu-post-processing-script-ffmpeg-with-vaapi-acceleration-closed-caption-conversion-auto-crop-scale-deinterlace-logging-and-more/501919