Yes, just to add, I use TMPGEnc Version 6, and thus far setting the encodes to Closed GOP for future encodes solves the problem. (BTW Volts, bravo on your post on the other thread!)
@Volts - Can you expand a little bit further about how i can make the same binary change in Windows (if possible and if you know) so i can get my failing videos to generate as well? Primarily, i’m not sure where/which file to make the change.
Alternatively, do you think this could be something that could be called directly from the command line?
Hi hassetbj
I’m a Windows user too so I can help with this. You’ll need a hex editor tool - there are tons of free ones available, I use one called HxD as it’s really good: https://mh-nexus.de/en/
Once that’s installed, quit the Plex Media Server so it’s not running at all. You’re looking for a file called “Plex Media Server.exe”. If you installed Plex with the defaults, it’ll be in C:\Program Files (x86)\Plex\Plex Media Server. Make a backup of this file just in case!

If you have installed to the default, you’ll need to run HxD as an administrator, because files in Program Files need admin access. Open HxD (as admin if needed), then use it to open Plex Media Server.exe.
Next you need to search for the text string “nokey” and replace that with “none”. The easy way to do this is a search/replace, but that won’t work as it changes the size of the file and Windows then won’t run it, due to the digital signature not being valid.
So, we need to find the string “nokey” first: in HxD, use the Search > Find menu.

We need to change the five bytes representing the text “nokey” to those for “none”. The easiest way is to change the 6B to 6E and the 79 to 00 (thus “deleting” it but without changing the file size).

Now save the file in HXD, quit it and restart PMS. All being well it should just start as normal.
Now you can swap between the original exe file and your modified one if you need to by just copying the appropriate version into C:\Program Files (x86)\Plex\Plex Media Server - make sure PMS is shut down before your do this.
(Sorry if you know most of this stuff, I didn’t want to assume!)
I disavow all responsibility! Dragons beyond! Untrained amateurs only! YMMV! May cause shortness of breath! Do not feed after midnight!
I fear what I have started.
Maybe Plex will kick me off the island for suggesting binary hacking.
Super clear instructions, nice.

I didn’t try replacing the 5th byte with 00, but if it works that’s more elegant than what I did. Nice call, @Raelworld.
The BIG caveat here is that you can break the file, so keep your backup. Obviously.
The other caveat is that index generation will take “as long as it takes your media server to play the media as fast as it can”.
Gorgeous! A visualizer for H.264. IDR vs I vs. P vs. B frames. Plus bitrate analysis. Runs in your browser, so it uses lots (LOTS) of memory for big files. Fast for zooming about once it finishes processing.
It took me a little while to get to this, but it worked perfectly! Thanks so much. And thanks for going through it step by step, i definitely needed it.
Ah good! Glad it worked. Now let’s hope the actual bug gets fixed…
Oh my gosh …

There’s a much better way than the binary hacking above. I found a hidden setting:
In Preferences.xml, add: GenerateBIFKeyframesOnly="0"
By default this setting doesn’t exist, the default value is 1, and Plex uses -skip_frame:v nokey. This is fast but has occasional problems on certain files if FFmpeg doesn’t detect enough keyframes.
Adding this and changing it to 0 causes Plex to not use that argument and not skip frames. This is much slower, but allows preview thumbnail generation to succeed on some files.
It’s the same as the binary hacking above!
(As above, you probably only want to change this if you notice specific shows that don’t have video preview thumbnails. Let thumbnails generate for those shows, and then change it back to 1 for normal operation.)
Well to move here from my other post.
That option wasn’t actually in my Preferences.xml so I added it and restarted the container.
But everything is now generating thumbs.
What is curious is you mentioned GenerateBIFKeyframesOnly=“0” would be slower?
They are generating far faster than they ever have before so Im curious what happens when I change the setting to
Preferences.xml: GenerateBIFKeyframesOnly="1"
Strange the whole option wasn’t in preferences.xml though initially.
It doesn’t appear to be documented anywhere at all. I noticed it when peeping in the Plex Media Server binary.
The -skip_frame:v nokey argument tells FFmpeg to jump over everything but keyframes, bypassing the majority of decoding work. Doing so should be wildly faster when extracting still images from most sane H.264 and H.265 files.
I don’t THINK Plex tries to use any hardware acceleration when extracting thumbnails. When you’ve got a Video Preview Thumbnail job going, can you grab the full command line of the Plex Transcoder process and share it?
Sorry I probably misunderstood your post.
I expected to see
GenerateBIFKeyframesOnly already in Preferences.xml and needed to change from 1 to 0
What I’m saying is it just wasn’t there at all and I add to manually add the option. But as I said I just probably misunderstood.
Oh! Sorry. Indeed, it’s not there by default. Edited my instructions above slightly to make that more clear.
Gone midnight here so I will try and get that output tomorrow for Plex Transcoder, though command line isn’t my strong point.
But all my media usually ends up in the cloud on Gdrive (all the files with missing VPT’s has long been there) What I’m sure about is with that setting added to Preferences.xml (even at the “slower” setting) VP’s are generating faster than ever. But most importantly they ARE generating.
You have had a massive calming effect on my OCD.
Hopefully, someone from Plex picks up on this after your failed attempt earlier. I may shamelessly tag @BigWheel or @anon18523487 in the hope it gets passed on to the server devs. Oh Looks like I just did. 
heh heh.
Sorry this thread is pretty long looks like there is something bad about the files and y’all are figuring out other ways to do it. Can someone get me a sample file that fails and I can make a report for it. You can message me a link.
{edit I see that starksy and hutch file i missed)
You and me and your OCD and my OCD are in it together.
Video Preview Thumbnail all the things!
Hey if it’s faster, that’s cool too. But like, it really shouldn’t be! I just compared on a local spinning disk and a local SSD, and it’s way faster to -skip_frame:v nokey. How do you mount your GDrive? Rclone? GCSF?
Rclone.
I shut down my local storage a while ago in favor of a Hetzner running Cloudbox (as my local storage started to out of hand.)
Switching from Windows that I do know about to the “mysteries of Linux & Docker” was life-changing for me.
But yeah with both an AppleTV where VP thumbs have always been beautiful and now the Shield doing a far better job with them I just HAVE to know they are generated for everything. I will sleep far better now.
PS. Despite my curiosity about the Flac movies I knew it wasn’t limited to Flac. American Gods Season 2 has been Plex danced at least 5 times in the last couple of years, including grabbing different release groups of the Remux.
Ten minutes after you linked me here, they were done.
I may be just over-hyped knowing that I will have VP thumbs for everything pretty soon thanks to you. ![]()
Hi BigWheel, that was my very quick sample file (Starsky & Hutch). At first we thought it was an issue with openGOP files as I’d been re-encoding DVDs with that setting and they failed to index as VPTs. Since then we’ve discovered several commercial releases ripped straight from disc without re-encoding that also fail, eg. everything on the Arrow label.
As @Volts has said, it seems to be an issue with the keyframes, or rather a lack of them, which the indexer is expecting to find.
I have different DVR’s and after my script copies a show to my main PMS I run a scan and analyze using “Plex Media Scanner.exe”. Yes it’s windoze 10. I started doing this because I was not getting video thumbnail previews
I am finding however that the analyze from command line is still not generating the thumbnails.
I tried the following from a command prompt and while they ran, ie no error or usage coming back they did not generate the thumbnails. Adding verbose or progress made no difference in the output…
“D:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe” --section 1 --analyze
“D:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe” --directory “E:\Recorded TV\TV Shows” --analyze
“D:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe” --files “E:\Recorded TV\TV Shows\Law & Order Special Victims Unit.S22E01.Guardians and Gladiators.ts” --analyze
If I go into the WebUI for Plex , and click on the vertical … for the show and select analyze it then generates the thumbnails.
Has anyone successfully run an analyze from a script or command prompt?
I think that’s a different topic than the rest of this thread. Can you make another thread for the new topic? I’ll follow you there.
IIRC for thumbnail generation, you need to specify a specific item ID with --item XX. You may also need --generate. Maybe even --force.
Was pulling my hair out trying to re encode my remux video, no luck until I found this. Saved the day!
