How to call the Plex Universal Transcoder from the command line?

Before I upload, to conserve space, I generally transcode my DVD rips with my own personal incantation of ffmpeg. However, I would much rather use Plex’s Optimized for Mobile for these rips. because the space settings and quality are both good for me.

I don’t want to keep the original version, so when I go this route, I choose to optimize it, then grab the transcoded version, replacing the original. This is pretty time consuming, so I was hoping to do this from the command line somehow.

Could someone share the location of the transcoder and perhaps how to call it with the pre-built optimized settings? I’m happy to look at source code to figure this out as well if someone would point me the right direction.

Thanks for the reply. I have been doing that already but would really like to duplicate the ffmpeg settings for each mode. As you know, there dozens of flags and settings in ffmpeg. My set is a good approximation but not exact. For example, my most recent test shows about a 300mb difference between Plex’s Mobile transcoding compared to mine.

I figured it would be a better result to just call the actual Plex transcoder with the correct options than to guess with ffmpeg like I’ve been doing.

If you look at the processes on your device while an optimization job is active, you can see how the Plex Transcoder was instantiated. All of the arguments are visible. Or you can see the history in Plex Media Server.log. Some of the arguments are Plex-specific like --progressurl but you can decode the “familiar” ffmpeg stuff easily enough.

Additional steps are required to actually call the Plex Transcoder yourself - you need to set some environment variables. Plex is doing some clever stuff to separate the open-source and non-open-source bits of code. Like @trumpy81 I would strongly discourage you from using it as your day-to-day encoder.

I mention a few of the other environment variables here:

https://forums.plex.tv/t/transcoder-background-tasks-being-throttled/

What’s interesting about the “Optimize …” presets is that they’ve got VBV enabled with bitrate targets focused on remote streaming. I don’t think they’re ideal “Archival” settings, but if you’re keeping your DVDs you can always do another “good” encoding from source.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.