Bug report - Server restart resets Transcoding parameters

Server Version#: Version 4.59.2 - plexmediaserver-1.24.1.4931-1a38e63c6.x86_64
Player Version#: N/A

I transcode my video files in background to 1.5Mps/480P for external access. In order to provide as much clarity as possible, I have the transcoding parameters set as follows:

Transcoder quality: Make my CPU hurt
Background transcoding x264 preset: Very slow

Whenever the Server restarts, these values are reset to “Automatic” and “Very fast”. This causes the current set of files being transcoded to be in a questionable state, and requires that I delete them and re-transcode.

Server restarts are triggered by software upgrade, out-of-memory conditions (there’s a memory leak in the server) and, of course, server reboots. While software upgrades only happen between transcoding sessions, the out-of-memory condition can happen at any time - usually after a week or two of running.

Before anyone asks, yes, I did Save after I changed the settings.

A more generalized, but less detailed, report of a similar problem can be found here: Plex Media Server configs after power failure

While this should be fixed properly maybe there’s a hacky way around it. If that preference is written into a config file… you could change the owner to prevent it from being overwritten with the default values you don’t want.

If the preference only ever exists in RAM then you’re probably out of luck.

you could change the owner to prevent it from being overwritten with the default values you don’t want

That MIGHT work. Where are the config files documented? Also, how will this resolve the problem of the file not being read when the service is started?

There’s a Preferences.xml file in the main app data directory… but if those settings are even kept in there, or how they are read and written, I dunno. It’s definitely a long shot.

There’s a Preferences.xml file in the main app data directory.

I found the file (“/home/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml”). This is the most recently saved set of settings and appears to have the information I provided.

In the same directory, there are also 1700 “older” versions of it, all at zero length. Strangely enough, they’re all dated July 26, 2020. I deleted the zero-length files. Let’s see if that helps anything.

Whoa, that ain’t right!

Maybe check to see if the privs set right on the prefs file? Mine looks like this:

-rw-r--r-- 1 plex plex 1677 Sep 20 16:32 Preferences.xml

Same owner, group and mode.

I also found a version in “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml” with the same size, content, owner, group, mode and modification date as the copy in /home.

There was a problem with that. You need to upgrade – and make sure you delete all those temp files. :slight_smile:

Preferences.xml is the primary for all major system-wide settings.
Per-section ones are kept in the database.

It wouldn’t hurt to make a preventative sudo chown -R plex:plex /var/lib/plexmediaserver and fix anything which might be ‘stuck’ at root.

I just noticed that the transcoder settings are supported in that prefs file.

Since you report the setting you make in the GUI doesn’t stick around after a reboot I guess there are a couple of potential problems.

Option one, when you change the setting it does not actually get written to the prefs file, so it is lost when you restart the server. If that is the case, adding it to the prefs file might fix it.

Option two, the setting is in the prefs file but it is ignored. If that is the case you are probably hosed.

I just tried changing this setting my my Ubuntu server, adding TranscoderH264OptionsOverride="slow" to my prefs file and restarting the server. After server restart, the directive was still in the file. (Some software will re-write the config file on start… had to check.)

Unfortunately in the Transcoder GUI settings, it still showed “Very fast” but it is possible that this is a display bug, or maybe “slow” isn’t working but another value would.

You could try adding that directive to the prefs file and seeing if it produced a different result even if the GUI says it didn’t change… maybe try a couple of different settings, too. I don’t have a lot of hope though. :man_shrugging:

This is what I’m seeing as well. When there are transcodes queued, those processed after the restart are done much faster, clearly indicating that the system is displaying the value being used.

Back to my OP, this is a bug, and my best guess is that this parameter, probably with a significant number of other parameters, isn’t being read at start time, or it might be being overwritten by default values after being read.

Just did this. Also /home/plexmediaserver and (just for completeness) my media directories. I don’t expect to see any change for this issue, as the owner/group/mode of the file containing the setting was correct.

Sure looks like it … and no workaround. Hopefully they get to it… if a config directive isn’t followed, that is a pretty legit bug.

@BanzaiInstitute

Please check your PM.

@peter-a

If @BanzaiInstitute has the same option as you “TranscoderH264OptionsOverride”,

Thanks. I went right to it in the transcoder options processor.

Please check your log files.

  1. TranscoderH264OptionsOverride - is a valid preference.
  2. It is only used when a “Universal” profile is used.
  3. Augmented profiles (from the smart players) causes the preference to be ignored because they tell the transcoder exactly how they want it to behave.

cat /home/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml

<?xml version="1.0" encoding="utf-8"?>
<Preferences OldestPreviousVersion="1.19.4.2902-69560ce1e" MachineIdentifier="GUID-1" ProcessedMachineIdentifier="GUID-2" AnonymousMachineIdentifier="GUID-3" MetricsEpoch="1" AcceptedEULA="1" PublishServerOnPlexOnlineKey="0" PlexOnlineToken="MyToken" PlexOnlineUsername="MyEmail@MyDomain.com" PlexOnlineMail="MyEmail@MyDomain.com" DvrIncrementalEpgLoader="0" CertificateUUID="GUID-4" CertificateVersion="2" PubSubServer="184.105.148.114" PubSubServerRegion="sjc" PubSubServerPing="53" CloudSyncNeedsUpdate="0" LanguageInCloud="1" DlnaEnabled="1" DlnaClientPreferences="IP=192.168.1.97,DirectPlay=true,DirectStream=true,LocalResolution=1920x1080,RemoteResolution=1920x1080,OnlineResolution=1920x1080,LocalVideoQuality=99,RemoteVideoQuality=99,OnlineVideoQuality=99,SubtitleSize=60,AudioBoost=100,MusicBitrate=320" TranscodeCountLimit="2" TranscoderH264BackgroundPreset="veryslow" TranscoderQuality="3" BackgroundQueueIdlePaused="0"/>

Do I need to set the TranscoderH264OptionsOverride option? If so, where can I find it?

@peter-a

When you look at your logs, do you see a lot of “Universal” profile use?

The option only activates for them.

If there’s a smart player (Roku, Nividia, Apple, Android) it won’t activate.

This is for background transcoding, not on-demand transcoding.

Just updated to the latest version of Server. It appears that this bug may have been fixed.

More testing will be required to be sure.

There have been at least two updates of the Plex application, and a few restarts for patching, and the settings haven’t been lost.

I think this bug is fixed.

1 Like

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