Optimizations Failing for 4K HEVC/TrueHD 7.1 Content

My VM has:
4 x 2.40 GHz L5640 CPU’s
10GB RAM
120 GB SSD
20 TB volume for content

I know how old the CPU’s are, but I’m fine waiting it out when optimizing. Also, with the attached, I have been fine optimizing other 4K HDR content.

With the five problematic movies, they all fail optimization. I’ve had ~90 other 4K movies optimize fine.

what I’m not finding is any indication of a failure. That’s what’s missing at this point.

If you don’t mind increasing log retention, we will stand a much better chance of finding it.

To increase log retention above the default 6 files,

  1. Stop PMS
  2. Edit the Preferences.xml file
  3. Add LogNumFiles="20" anywhere within the XML brackets to increase from 5 to 20.
  4. Save
  5. Start PMS

Now, when a sync fails. you’ll have more time to notice and capture it which is all we can do until we actually get the root cause.

I have a sync running now after having made the preferences change.

In case it helps, here are the 5 XML files for the movies that fail to optimize.

Thanks. Let’s let them sit there until we see which one is the failure point.

To clarify, all 5 movies have failed repeatedly when I manually redo the optimization from settings with the refresh icon next to “Failed to Convert.”

you do delete the optimization queue entry before retrying?

Yes, in the sense that the queue is empty at this point and I’m not adding to it. During the course of your help, each movie I try to optimize is done one at a time.

Great. at the first sign of failure, please capture the full log set. It will let me also see what does work and what doesn’t. If there are no glaring OS errors, that’s what I’ll need to backtrack through the dataflow.

Here is the failure. I monitored the time to completion fairly closely, so hopefully it doesn’t have extraneous data.

One item of note that may have nothing to do with it: at one point after the optimization had passed 85%, the server was not accessible for a brief window of time (~20 minutes or so).

i am about to sleep but saw this come in. Great catch.

The directory is disappearing right out from underneath the transcoder. It’s writing along, moves to the next file and can’t open it. “No such file or directory”

ddb5172e-7c54-410e-a1d8-c5e960b8a2d2/progress/streamDetail?index=8&id=0&codec=hdmv_pgs_subtitle&type=subtitle&language=fre (28 live) Signed-in Token (maxengel)
Jun 06, 2018 05:41:54.340 [0x7f85013ff700] DEBUG - Completed: [127.0.0.1:48088] 206 PUT /video/:/transcode/session/bb64d0fe-06ca-4354-b144-fb2ba0fa50d8/ddb5172e-7c54-410e-a1d8-c5e960b8a2d2/progress/streamDetail?index=8&id=0&codec=hdmv_pgs_subtitle&type=subtitle&language=fre (28 live) 4ms 227 bytes
Jun 06, 2018 05:41:54.344 [0x7f84d73da700] DEBUG - Request: [127.0.0.1:48090 (Loopback)] PUT /video/:/transcode/session/bb64d0fe-06ca-4354-b144-fb2ba0fa50d8/ddb5172e-7c54-410e-a1d8-c5e960b8a2d2/progress/streamDetail?index=9&id=0&codec=hdmv_pgs_subtitle&type=subtitle&language=eng (28 live) Signed-in Token (maxengel)
Jun 06, 2018 05:41:54.345 [0x7f85013ff700] DEBUG - Completed: [127.0.0.1:48090] 206 PUT /video/:/transcode/session/bb64d0fe-06ca-4354-b144-fb2ba0fa50d8/ddb5172e-7c54-410e-a1d8-c5e960b8a2d2/progress/streamDetail?index=9&id=0&codec=hdmv_pgs_subtitle&type=subtitle&language=eng (28 live) 3ms 227 bytes
Jun 06, 2018 05:41:54.361 [0x7f84d43d4700] ERROR - [Transcoder] /content/Movies/Plex Versions/Optimized for TV/.inProgress/Blade Runner 2049 (2017).mp4.18: No such file or directory
Jun 06, 2018 05:41:54.372 [0x7f84fb3ff700] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 28438 is 1 (failure)
Jun 06, 2018 05:41:54.504 [0x7f84f13fc700] DEBUG - Request: [127.0.0.1:48094 (Loopback)] PUT /video/:/transcode/session/bif/progress?progress=91.8&size=-22&remaining=58&vdec_packets=62800&vdec_sw_ok=62794&speed=4.0&vdec_hw_status=0 (28 live) Signed-in Token (maxengel)
Jun 06, 2018 05:41:54.504 [0x7f8500bfe700] DEBUG - Completed: [127.0.0.1:48094] 404 PUT /video/:/transcode/session/bif/progress?progress=91.8&size=-22&remaining=58&vdec_packets=62800&vdec_sw_ok=62794&speed=4.0&vdec_hw_status=0 (28 live) 0ms 259 bytes
Jun 06, 2018 05:41:54.868 [0x7f84fb3ff700] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Media Scanner' exit code for process 28011 is 0 (success)
Jun 06, 2018 05:41:54.874 [0x7f84fe3ff700] DEBUG - Activity: registered new activity e8194c8a-a100-43e5-bb56-2634aebfcd58 - Processing subscriptions
Jun 06, 2018 05:41:54.878 [0x7f84de3e8700] DEBUG - Activity: registered new activity 89cd1399-6d2b-4ac3-9735-3e0f1ab41498 - Processing subscriptions
Jun 06, 2018 05:41:54.878 [0x7f84de3e8700] DEBUG - DVR:Subscription: Scheduling subscriptions.
Jun 06, 2018 05:41:54.879 [0x7f84fe3ff700] DEBUG - Scanning section 4
Jun 06, 2018 05:41:54.879 [0x7f84fe3ff700] DEBUG - Killing job.
Jun 06, 2018 05:41:54.879 [0x7f84fe3ff700] DEBUG - Signalling job ID 28011 with 9

Thanks! After coming through the other logs I’d sent of failed optimizations, the problem you identified does seem to be a pattern. Let me know any troubleshooting steps you’d like me to try.

I’ve optimized every bluray I have with no problems ever. It’s been going fine for years. Suddenly, I now seem to fail 1/3rd the time when I try to “Optimize for TV” since the last update. I tried looking at the log files but I can’t seen to find the Optimization error. I can tell when the optimization fails because my RAM usage maxes out and my disks start going into fits. It doesn’t crash plex but it certainly makes it known something is going on.

Does anyone know which log files to look at to get some insight into why certain MKV files aren’t converting? I’ve even rebuilt the MKV files that were having problems, but that didn’t help.

Does anyone know which log files to look at to get some insight into why certain MKV files aren’t converting? I’ve even rebuilt the MKV files that were having problems, but that didn’t help.

The main system log file has information, but is woefully unhelpful in self-diagnosing the source of the issue. From reading other threads, I’ve heard about some people surmising it may be a subtitle issue, but I haven’t found a solution.

Hopefully @ChuckPA has more insight in helping troubleshoot.

The new version did not resolve the problem as I had hoped. I saw the threads about the subtitles as well, but I typically do not optimize movies with any subtitles selected. I also tried making MKV files free of subtitles as well but that didn’t help either.

@maxengel said:
Thanks! After coming through the other logs I’d sent of failed optimizations, the problem you identified does seem to be a pattern. Let me know any troubleshooting steps you’d like me to try.

Where is the transcoder temporary directory? If it’s on a network share, there’s 3/4 of the cause

My transcoder directory is still the default directory in the root volume. The media is stored in a locally-mounted drive.

With optimization, is all transcoding occurring in the Plex Optimized Versions colder? I thought the transcoder directory was only for on-the-fly transcoding.

Also, other files have converted fine, but the same five are failing continually.

If you look in the Optimized Versions directory, you’ll see a . (dot) directory where the actual in-process transcode is occurring. That file will be the new final-output file. Optimization, like Sync, aren’t real-time so yes, you are correct, transcoder temp is used for on-the-fly

Got it. The reason I ask is because I wasn’t sure if file size could come into play, but if the Transcoder directory (as specified in Advanced Settings) isn’t storing the file during optimization, then it is a moot point.

Do you have any thoughts with regards to the directory disappearing issue you noticed in the logs earlier in this thread?

No I don’t but it’s definitely time to temporarily increase the transcoder log levels. You’ll need to be quick and capture them after failure to avoid losing it.

[chuck@lizum ~.119]$ cat bin/set-transcoder-error
#!/bin/sh
curl 'http://192.168.0.21:32400/:/prefs/set?TranscoderLogLevel=error&X-Plex-Token=Your-Plex-Online-Token-Here'

You can increase the TranscoderLogLevel to verbose if error doesn’t provide enough detail at point of failure. Just remember to turn it back down when done

So I watched the optimization of Blade Runner 2049 closely. at 88%:

  1. The process hung
  2. The server then no longer was accessible
  3. The VM was sluggish to respond
  4. Eventually Plex was accessible again, but the optimization was now failed

Attached are the verbose logs.