I have a series where i converted all files from avi to mp4. I deleted the avi files on local pc so only the mp4 is there. yet when i go to plex it show both version avi and mp4 available for play.

Scan Library - Empty Trash - Clean Bundles - with an Optimize Database thrown in for good measure - should do it…
https://support.plex.tv/articles/200289326-emptying-library-trash/
Did all the above but Nothing seems to work.
You’ve done this enough to know what’s next - right?
Log Files:
https://support.plex.tv/articles/200250417-plex-media-server-log-files/
Drag zip file to message window and drop it.
Just post the Plex XML info of one such affected episode.
Then make a screenshot of your library’s ‘Add Folders’ tab and post it here too.
logs failed to upload.tried both attach a file and drag and drop.
@doormandoorman said:
XML info http://127.0.0.1:32400/library/metadata/18056…
posting the URL doesn’t make sense because it is only valid in your local network.
You are supposed to copy and paste the XML code.
And never, ever post your X-Plex Token !
You may as well post your login and passwort.
Line 1 and 2 will cause a duplication of the content of this subfolder.
Also I did not convert all files to mp4 but I did change all file names to suit Plex
Thanks for the heads up I never was asked for XML.
The drive with the issues is Y drive or line 3
.
Line 1 and 2 were for a different drive from the one in question and I see what you are saying but strange enough this folder and show Ghostwriter is fine. no doubles. .
XML
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="225" librarySectionTitle="TV Shows GOOD" librarySectionUUID="e60c3320-3fe0-4c7c-b831-70c4ed7879c6" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1509975302">
<Video ratingKey="180566" key="/library/metadata/180566" parentRatingKey="180564" grandparentRatingKey="180563" guid="com.plexapp.agents.thetvdb://72089/1/2?lang=en" librarySectionID="225" librarySectionKey="/library/sections/225" type="episode" title="Home Ranch" grandparentKey="/library/metadata/180563" parentKey="/library/metadata/180564" grandparentTitle="The Rifleman" parentTitle="Season 1" contentRating="TV-PG" summary="Two hired hands of a wealthy cattleman, who has been using the ranch for grazing his cattle, demand that Lucas move out. When Lucas refuses, he is beaten and dragged and then the ranch house is burned down. They left Lucas and Mark with the burning house and rode off with Lucas' rifle. Leaving Mark to tend to the animals, Lucas tracks them down and confronts their boss, Mr. Jackford." index="2" parentIndex="1" rating="9.0" viewCount="37" lastViewedAt="1493705502" year="1958" thumb="/library/metadata/180566/thumb/1523914064" art="/library/metadata/180563/art/1523914133" parentThumb="/library/metadata/180564/thumb/1523914129" grandparentThumb="/library/metadata/180563/thumb/1523914133" grandparentArt="/library/metadata/180563/art/1523914133" grandparentTheme="/library/metadata/180563/theme/1523914133" duration="1547046" originallyAvailableAt="1958-10-07" addedAt="1473896691" updatedAt="1523914064">
<Media videoResolution="480" id="263229" duration="1547046" bitrate="957" width="624" height="466" aspectRatio="1.33" audioChannels="2" audioCodec="mp3" videoCodec="mpeg4" container="avi" videoFrameRate="24p" videoProfile="simple">
<Part accessible="1" exists="1" id="958324" key="/library/parts/958324/1457216750/file.avi" duration="1547046" file="V:\show\The Rifleman\The Rifleman - Season 1\The Rifleman - 1x02 - Home Ranch.avi" size="184990222" container="avi" videoProfile="simple">
<Stream id="339487" streamType="1" codec="mpeg4" index="0" bitrate="817" bitDepth="8" chromaSubsampling="4:2:0" frameRate="23.976" height="466" level="3" profile="simple" refFrames="1" width="624"/>
<Stream id="339488" streamType="2" selected="1" codec="mp3" index="1" channels="2" bitrate="128" audioChannelLayout="stereo" samplingRate="44100" streamIdentifier="1"/>
</Part>
</Media>
<Media videoResolution="480" id="292983" duration="1547046" bitrate="957" width="624" height="466" aspectRatio="1.33" audioChannels="2" audioCodec="mp3" videoCodec="mpeg4" container="avi" videoFrameRate="24p" videoProfile="simple">
<Part accessible="1" exists="1" id="295191" key="/library/parts/295191/1473792464/file.avi" duration="1547046" file="Y:\Show\The Rifleman - Season 1\The.Rifleman.S01E02.Home.Ranch.XviD.avi" size="184990222" container="avi" videoProfile="simple">
<Stream id="272355" streamType="1" codec="mpeg4" index="0" bitrate="817" bitDepth="8" chromaSubsampling="4:2:0" frameRate="23.976" height="466" level="3" profile="simple" refFrames="1" width="624"/>
<Stream id="272356" streamType="2" selected="1" codec="mp3" index="1" channels="2" bitrate="128" audioChannelLayout="stereo" samplingRate="44100" streamIdentifier="1"/>
</Part>
</Media>
<Director id="15092" filter="director=15092" tag="Arnold Laven"/>
<Writer id="17984" filter="writer=17984" tag="Sam Peckinpah"/>
<Extras size="0"></Extras>
</Video>
</MediaContainer>
As you can see, this show exists on both volumes Y: and V:
Neither Y:\Show nor V:\show must be completely empty or inaccessible.
Otherwise Plex will not remove any content from its database.
Either remove the path of the now empty drive from the library
or put one single file back into it. A small .txt file will do it.
Then ‘Scan Library FIles’
followed by ‘Empty Trash’
I just realized that thanks. I must have added my back up to the server. So sorry for the misunderstanding.
The Y drive had some old avi files for the show that I did not edit or convert. I did not delete the path since it contains other shows so I instead put A small .txt file as you suggested and it’s Perfect
Thanks everyone for all the help.
Found anther example of files being doubled on plex but this time there is only one version on the server. This one was actually just converted to mp4 and the original file was deleted. now plex shows 2 versions. I emptied trash and cleaned bundles and also optimized. as you could see in second pic th first version is not available. I could just manually delete it but there may be a issue with plex and wanted to let you know.
XML information
<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="225" librarySectionTitle="TV Shows GOOD" librarySectionUUID="e60c3320-3fe0-4c7c-b831-70c4ed7879c6" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1509975302">
<Video ratingKey="264195" key="/library/metadata/264195" parentRatingKey="264180" grandparentRatingKey="264179" guid="com.plexapp.agents.thetvdb://77505/8/15?lang=en" librarySectionID="225" librarySectionKey="/library/sections/225" type="episode" title="Look What I Found" grandparentKey="/library/metadata/264179" parentKey="/library/metadata/264180" grandparentTitle="Three's Company" parentTitle="Season 8" summary="The trio leaves a stray kitten at Mr. Furley's doorstep, but the gift threatens Furley's ability to pass an inspection ordered by his brother Bart." index="15" parentIndex="8" rating="8.0" viewOffset="1001000" viewCount="3" lastViewedAt="1523997496" year="1984" thumb="/library/metadata/264195/thumb/1523991422" art="/library/metadata/264179/art/1518850896" parentThumb="/library/metadata/264180/thumb/1518850896" grandparentThumb="/library/metadata/264179/thumb/1518850896" grandparentArt="/library/metadata/264179/art/1518850896" grandparentTheme="/library/metadata/264179/theme/1518850896" duration="1503573" originallyAvailableAt="1984-01-24" addedAt="1484844946" updatedAt="1523991422">
<Media videoResolution="480" id="262768" duration="1503573" bitrate="1486" width="720" height="480" aspectRatio="1.33" audioChannels="2" audioCodec="aac" videoCodec="h264" container="mp4" videoFrameRate="NTSC" optimizedForStreaming="0" audioProfile="lc" has64bitOffsets="1" videoProfile="high">
<Part accessible="0" exists="0" id="264265" key="/library/parts/264265/1391025756/file.m4v" duration="1503573" file="V:\show\Three's Company\Season 08\Three's Company - s08e15 - Look What I Found.m4v" size="279300497" audioProfile="lc" container="mp4" has64bitOffsets="1" optimizedForStreaming="0" videoProfile="high">
<Stream id="248681" streamType="1" default="1" codec="h264" index="0" bitrate="1336" anamorphic="1" bitDepth="8" chromaSubsampling="4:2:0" colorRange="tv" colorSpace="smpte170m" frameRate="29.823" hasScalingMatrix="0" height="480" level="30" pixelAspectRatio="5648:6453" profile="high" refFrames="4" streamIdentifier="1" width="720"/>
<Stream id="248682" streamType="2" selected="1" default="1" codec="aac" index="1" channels="2" bitrate="150" language="English" languageCode="eng" audioChannelLayout="stereo" profile="lc" samplingRate="48000" streamIdentifier="2"/>
</Part>
</Media>
<Media videoResolution="480" id="954915" duration="1451433" bitrate="1155" width="630" height="480" aspectRatio="1.33" audioChannels="2" audioCodec="aac" videoCodec="h264" container="mp4" videoFrameRate="NTSC" optimizedForStreaming="0" audioProfile="lc" has64bitOffsets="0" videoProfile="baseline">
<Part accessible="1" exists="1" id="960426" key="/library/parts/960426/1523984216/file.mp4" duration="1451433" file="V:\show\Three's Company\Season 08\Three's Company - s08e15 - Look What I Found.mp4" size="209524266" audioProfile="lc" container="mp4" has64bitOffsets="0" optimizedForStreaming="0" videoProfile="baseline">
<Stream id="339564" streamType="1" default="1" codec="h264" index="1" bitrate="1022" language="English" languageCode="eng" bitDepth="8" chromaSubsampling="4:2:0" colorRange="tv" frameRate="30.000" hasScalingMatrix="0" height="480" level="30" profile="baseline" refFrames="3" streamIdentifier="2" width="630"/>
<Stream id="339563" streamType="2" selected="1" default="1" codec="aac" index="0" channels="2" bitrate="132" language="English" languageCode="eng" audioChannelLayout="stereo" profile="lc" samplingRate="44100" streamIdentifier="1"/>
</Part>
</Media>
<Field locked="1" name="director"/>
<Field locked="1" name="writer"/>
<Extras size="0"></Extras>
</Video>
</MediaContainer>
For whatever reason copy and pasting xml info does not appear after I post it here so I did pic. Link below for larger image.
@doormandoorman said:
For whatever reason copy and pasting xml info does not appear after I post it here so I did pic.
It does appear if you enclose it in triple backticks `
This one was actually just converted to mp4 and the original file was deleted. now plex shows 2 versions.
Why did you convert it? It was already in mp4 format. m4v and mp4 are practically identical.
All you have achieved by this is to make the quality worse - both video and audio.
Your converter apparently apparently chnges the audio sample rate from 48 kHz to 44.1 kHz, which doesn’t make sense.
If you wanted to optimize these files somehow you could have ‘optimized them for streaming’.
But of course the above doesn’t explain why plex didn’t remove the erased files from its database.
Make sure Plex is not busy with another library update.
‘Scan library files’
wait until the operation is finished
empty trash
- activate debug logging (not ‘verbose’!)
- quit Plex Server
- wait 1 minute
- start Plex Server
- wait 5 minutes
- fetch log files and attach them here
Or inspect them yourself. Take a look at the Plex Media Server.log file and seek for messages about database corrupt or malformed.
If you find these, you may have to repair your database.
https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database
@OttoKerner said:
Make sure Plex is not busy with another library update.
WHAT?!
You mean updating my 140TB library every 15 minutes is a bad idea?!
Sorry… couldn’t resist… carry on…
B)






