Media Optimizer keeps re-converting files

Hello, I apologize if there is already a discussion on this, there’s so much stuff in this forum finding my exact issue is like a needle in a haystack. I’m running plex server version 0.9.16.4 on Windows and I’ve been testing with the Media Optimizer for small batches of my movies before going full bore on all 900 of my movies. It keeps re-converting movies that have already been successfully converted. I saw mention of this being fixed for plex server on windows in the last update but it’s still doing it. Is this still an open issue? I’d be happy to help with debugs etc if this issue is still open or, if I’m doing something wrong any help to figure out what would be much appreciated.

Hello and welcome to the forums.

Can you describe a little better what you mean by re-converting? Is this just happening on it’s own at random or is there something that is triggering the conversion. Are you seeing multiple copies of the converted file? When you see this happening, can you grab all the server logs and post them here. You can find the info on how to find the server logs in my signature.

Hi Thanks for the response. So here’s more details on what happens. I have movies that have completed optimization and the files are present on my storage and also show up in the Optimized versions screen. Then I go into the optimization activity screen and there will be no movies converting. I go to my library and que up another movie for optimization and then I go back over to the optimization activity screen and not only did it que up the 1 new movie to convert but it also put a whole bunch of the already optimized movies back into the optimization activity que and it then proceeds to re-convert those files. When it is done re-converting files that have already been optimized it does not result in any duplicates on my storage. I just qued up another movie for optimization and re-created this so I’m including the logs. The 1 new movie I qued up for this test is “Fury” and it then put 9 other movies that were already done back into the que for conversion again. I am also optimizing and storing 2 versions for every movie, 1 at 720P and 1 at 1080P but it does seem to be storing these properly in their own directories, “Optimized%20for%20TV” for the 1080P ones and “Optimized%20for%20Mobile/” for the 720P ones.

Hi, did someone find an issue in my debug files and fix it? If so, THANKS!! I noticed an update for windows server yesterday, installed it and ran some more tests and it doesn’t seem to be re-converting the files any longer. What was the problem? Or, did this mysteriously go away on it’s own?

I hadn’t looked at your logs yet. I’m not aware of a specific fix for this but maybe it got fixed with some other changes.

I had a similar issue with some of my home videos. What I found is that it was re-optimizing videos for which there was a second, identically-named video in a different folder. It optimized the video in folder “A”…and then some time later it optimized the file in folder “B”. Sometime later…it did the one in folder “A” again…etc, etc.

So, basically…check to see if those files being repeatedly optimized are duplicates from another folder.

I might have spoke to soon on the fix, it looks like it might have started re-optimizing the revenant again just now after I kicked off some new conversions this afternoon.

To your comment DFury, that is a good point, in terms of file names, I do store two versions of all of the movies I optimize into my DMZ storage 1 in 720P and 1 in 1080P, different folders as built by the automated optimization process and different quality conversions but identical file names. I didn’t consider them duplicates in my original post because they’re not the same but file names are.

Are you jobs overlapping? I’m not sure if the optimize process recognizes a previous job.

Hi, I am not sure where to post a bug report, but this is the closest place i’ve found that has mention of this particular bug.

I think when Plex is done optimising the file, it adds the optimised file to the library (through the library scanner. This can happen automatically without user intervention if the setting for detect changes in the library is set in the settings).

This causes the optimised file to be recognised as being a new and duplicate entry of the original file. Because this is a new file, any link to this file being optimised is now broken. Plex will then think that the optimised file that has been added to the library is now a new file and will try to optimise that file again (if you press the refresh button in the optimise versions tab).

I have tested this and can confirm that plex will lose the optimised file link when the library scanner adds the file back into the library again.

Supposedly this was fixed(?) in a previous version, however in the latest version (1.0.3.2461 windows) this behaviour is still present.

It would be nice if this issue can be logged and fixed.

Steps to reproduce:

  1. Make sure Update my library automatically is set to off, and run partial scan when changes are detected is turned off. This is so that we can see the effect happening when we invoke the scanner manually.
  2. Select a file to be optimise using any settings
  3. Once it is done optimising, confirm that the file has been optimised using the optimised versions tab (should be a “complete” badge on it)
  4. Press library refresh on that library where the file which was just optimised
  5. redo step 3 and observe that the badge now says “deleted”. If you press the refresh button, a new optimised version of the optimised version will appear.
  6. Repeating the steps will result in a infinite loop where the file will be optimised to oblivion.

I am running the server on windows 10 on a laptop, using mapped shared drives (SMB) located on my synology NAS.

Please try this and let me know if you need any more logs (however i think you should be able to reproduce this quite easily following these steps).

I am unable to recreate your issue. For step 4, which button are you hitting. There is no refresh button at the library level. There is the “Update Library” button and the “Refresh All” button under the gear icon. I tried both and in both cases the optimized version never changed to deleted.

Can you restart PMS and redo steps 3 to 5 then provide me the Plex Server log?

Hi

I have attached the logs and done the tasks you have requested. I have also attached screen shots of the steps described in the previous post.

let me know if there is anything else you require me to do.

By the way, the media i was transcoding was just for a test as it was a really small file (mp4 file to a mp4 file). It may have not needed the transcode, but the result is the same nevertheless - i.e optimised file link is broken and the optimised file is added to the library.

I think I know what is going on. You are using the root of S: for your optimized folder. Try making it at least 1 folder deep,

That fixed the problem!

Solution: Adding a folder to my TV series called S: ranscoded_series (instead of just S:) fixed the problem

Is this then classed as a bug or a user error? Either way, this needs to be documented as there are several threads regarding this issue. I think many people use the same method to map up a network drive and just use the root of the drive for their content.

My original content is mapped to m: and if i use the default option to create the optimised files at the original location, this will fail again. I will need to redo my library setup for my original content if i want to use that option. (and lose all the information about watched and unwatched and manual edits along the way).

I think this would not an option for many people, so is it possible to fix this bug now that it has been identified properly?

Thanks for your help!

I’ll let the devs know and see if there is anything they want to do about this.

Thanks everyone for chiming in with the detailed steps to re-create and detailed troubleshooting. I had sort of given up on this. I too am using the root of “W” which is the letter of my mapped drive on my Win 7 Plex Server VM to write the new files to. Seems sort of like a bug to me that you can’t use the root of your mapped drive but now that I know I can try restructuring my folders and moving my libraries around again and sounds like that should fix it for me as well. Will give it a shot and let you know.

By the time I got around to trying this with different directories, there have been several updates and it doesn’t appear to be re-converting optimized versions any longer so I’m guessing one of the updates fixed the issue. I didn’t even have to remap my libraries.