# Media Optimizer keeps re-converting files

**URL:** https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106
**Category:** General Discussions
**Created:** [April 12, 2016, 4:49pm UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106 "2016-04-12T16:49:33Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![markusq931](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@markusq931](https://forums.plex.tv/u/markusq931)
#### Post date: [April 12, 2016, 4:49pm UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/1 "2016-04-12T16:49:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)
#### Post date: [April 18, 2016, 9:35pm UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/2 "2016-04-18T21:35:50Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![markusq931](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@markusq931](https://forums.plex.tv/u/markusq931)
#### Post date: [April 18, 2016, 10:42pm UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/3 "2016-04-18T22:42:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![markusq931](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@markusq931](https://forums.plex.tv/u/markusq931)
#### Post date: [April 22, 2016, 9:14pm UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/4 "2016-04-22T21:14:30Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)
#### Post date: [April 23, 2016, 12:38am UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/5 "2016-04-23T00:38:50Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![DFury](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@DFury](https://forums.plex.tv/u/DFury)
#### Post date: [April 23, 2016, 1:03am UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/6 "2016-04-23T01:03:21Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![markusq931](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@markusq931](https://forums.plex.tv/u/markusq931)
#### Post date: [April 23, 2016, 1:13am UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/7 "2016-04-23T01:13:49Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)
#### Post date: [April 23, 2016, 1:41am UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/8 "2016-04-23T01:41:12Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Dimball](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@Dimball](https://forums.plex.tv/u/Dimball)
#### Post date: [August 1, 2016, 11:52am UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/9 "2016-08-01T11:52:27Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)
#### Post date: [August 1, 2016, 12:34pm UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/10 "2016-08-01T12:34:06Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Dimball](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@Dimball](https://forums.plex.tv/u/Dimball)
#### Post date: [August 1, 2016, 12:57pm UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/11 "2016-08-01T12:57:49Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Dimball](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@Dimball](https://forums.plex.tv/u/Dimball)
#### Post date: [August 1, 2016, 1:09pm UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/12 "2016-08-01T13:09:57Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)
#### Post date: [August 2, 2016, 3:48am UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/13 "2016-08-02T03:48:53Z")

</div>

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,

---

<div class="post-metadata">

### Author: ![Dimball](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@Dimball](https://forums.plex.tv/u/Dimball)
#### Post date: [August 2, 2016, 6:59am UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/14 "2016-08-02T06:59:00Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)
#### Post date: [August 2, 2016, 8:08am UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/15 "2016-08-02T08:08:47Z")

</div>

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

---

<div class="post-metadata">

### Author: ![markusq931](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@markusq931](https://forums.plex.tv/u/markusq931)
#### Post date: [August 6, 2016, 1:17am UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/16 "2016-08-06T01:17:09Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![markusq931](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@markusq931](https://forums.plex.tv/u/markusq931)
#### Post date: [January 5, 2017, 12:36am UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/17 "2017-01-05T00:36:34Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [January 7, 2020, 9:18pm UTC](https://forums.plex.tv/t/media-optimizer-keeps-re-converting-files/142106/18 "2020-01-07T21:18:58Z")

</div>


