Glitches transcoding from WMA

Server Version#: 1.19.5.3021
Player Version#: Plexamp 3.1.1, also Plex Win10, Plex Web, Roku, XB1

Summary
Transcoding from WMA causes consistent, reproducible audio glitches like pops and skips. Test files included.

Foreword
This is not a new issue, actually. It’s been happening for ~1 year, since I started using Plex for music (with Tidal). In ye olde days it was much much worse, and I could hear glitches in almost everything, in my own WMA and MP3 files, but also in music from Tidal (non-lossless). It always happened in quiet passages, so I chalked it up to silence compression, loudness eq, or whatever. It happened in every device and app I used, be it the Plex UWP app (when that existed), the newer Plex app, on my Roku and XB1, on Plex and now Plexamp for iOS. It got much better with time.

But the glitches still persist to this day, and I finally had the time to investigate.

I took note of the music whenever I heard a glitch, and I narrowed down to these conditions:

  • PMS is 1.19.3 and newer for Sinology NAS
  • Source file is WMA Lossless
  • Always during quiet passages, and reproducible

Methodology

  1. Picked one track that I knew glitches in multiple places, and copied it to my PC. For reference, the track is “Sleep Together” by Porcupine Tree. It’s a file ripped by me a long time ago, and I knew it was good. But listening thru Plex apps, it always skips and pops at the beginning (quiet intro, 9th bar, just as the lyrics start) and also during the bridge (again, quiet passage, about the 4:10 mark).
  2. Used ffmpeg (Windows builds by Zeranoe, from official site) to transcode it from WMA-Lossless to multiple formats: FLAC, WMA-CBR, MP3 VBR & CBR. Listened to all of them with whatever non-plex player. None had glitches.
  3. Installed the latest PMS (1.19.5.3021) in my Win10-64 PC. Did not touch the default encoder settings. Added all of the files as individual separate tracks in the music library, and added each track into it’s own playlist.
  4. In Plexamp (v3.1.1), set the download quality to 192Kbps.
  5. For each playlist, I downloaded it then got the file from the offline cache (AppData\Local\Plexamp\Offline). The json file there confirmed it had been transcoded to Opus 192k as expected. I copied the file to another folder and renamed to know it’s source. I have a spreadsheet to keep track.
  6. Finally, used ffmpeg to transcode WMA-Lossless to Opus 192k.
  7. Listened to the transcoded files with a non-plex player.

Findings
Of all the test tracks transcoded by PMS, both the WMA Lossless and WMA CBR had glitches. All other sources were transcoded correctly. The manually transcoded one also did not have glitches. This last result tells me that the problem is not within the ffmpeg libs that PMS use.

Now, sadly, I’m rather new to Plex itself, so I’m not sure what settings (both UI or file-based) I can fiddle with, and I’m not sure what log files would be helpful in diagnosing this issue. At the very least I can upload all my test artifacts.
I also would love to know exactly how PMS uses ffmpeg to transcode (settings and whatnot), so I could more closely replicate that.

And please, PLEASE, if there’s anything I can test, or try, or reach out to, that could help to debug and solve this, I’m willing to try as needed.

The alternative, I recon, would be to transcode my whole library, which in my experience it’s a PITA to do so correctly and thoroughly keeping metadata. Plus, it has been working flawlessly for 10+ years. I really really love the Plex-sphere (for more than just music), Plexamp itself is every bit as good and functional and whimsical as I could hope, and merging my own hi-quality carefully tagged library with Tidal beats the s##t out of just about any streaming service on earth. But I need to solve this if I’m to continue to use it.

If you read this far… :heart: :slightly_smiling_face:

EDIT: Well, I can’t upload that big a file. Seems right. Get the data here: https://1drv.ms/u/s!AgsRIEU2aKT2oPQC0tYim4hUPwulnQ?e=pIsNUZ

I’m having the same issue with WMA files. Whether I play them from Plex web, android or TV, the playback is jerky and skipping. Additionally, the audio quality is very poor.

If I take the WMA files and play them directly on my android phone (Samsung) or TV (Samsung), the playback is ok.

Yes, I’m having this issue since 2018 but didn’t bother to post the problem since it’s very difficult to get support from Plex team. Since somebody posted this, I just ride on it.

If the wimpy processor or interrupts on the transcoding server were the problem, then (a) the symptoms would not be deterministic (ie.: would not happen exactly the same, in the same timemark, thru multiple tests), and (b) would dissapear or change on a different server. I noticed it on the tiny NAS, then reproduced on a more powerful PC. All this I described in detail.

Besides, I know the transcoding does not happen in real-time. Plexamp does not just stream from the server a few seconds at a time, otherwise real life usage in cellular networks (or even offline) would not be possible. I downloaded the whole transcoded track and then picked it from the temp directory.

So, the PMS transcoding has reproducible issues with WMA sources. I provided test articles. Programatix also chipped in (thanks!). I discarded the client being the problem (It happens in every client, plus it’s present in the downloaded file, observable in any third party player or audio editor). I also proved that the issue is not upstream (ie.: in the ffmpeg libs themselves, at least in the one build I tested).

So, yeah. I’m in the process of slooooowly transcoding everything to FLAC (ffmpeg + scripting). But I would much rather spend the time helping (in whatever capacity I have) to actually improve Plex. That’s why I gathered this sort of test suite.

My NAS is DS918+ with Celeron processor with hardware transcoder. The WMA files are old from the Pentium 3 era and Pentium 3 can play the WMA file without any issue. The bitrate for the WMA files are just 96 kbps and are less than 5MB per files. When the playback start, there is a spike to CPU usage but for a moment. I’m guessing it’s when the transcoding begin and completed within the few seconds. During the whole playback, no more increase in CPU usage. However the playback shutters as hell for the whole song on all clients.

image

<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="12" librarySectionTitle="Music" librarySectionUUID="094666d1-4c6e-49ad-939e-113155c33766" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1603922053">
<Track ratingKey="14092" key="/library/metadata/14092" parentRatingKey="14086" grandparentRatingKey="14085" guid="plex://track/5d07cdd5403c640290f7f567" parentGuid="plex://album/5d07c180403c64029084d62b" grandparentGuid="plex://artist/5d07bbfc403c6402904a5bbc" type="track" title="You Rock My World" grandparentKey="/library/metadata/14085" parentKey="/library/metadata/14086" librarySectionTitle="Music" librarySectionID="12" librarySectionKey="/library/sections/12" grandparentTitle="Michael Jackson" parentTitle="Invincible" summary="" index="6" parentIndex="1" ratingCount="275728" lastViewedAt="1604600537" thumb="/library/metadata/14086/thumb/1604086291" art="/library/metadata/14085/art/1601927473" parentThumb="/library/metadata/14086/thumb/1604086291" grandparentThumb="/library/metadata/14085/thumb/1601927473" grandparentArt="/library/metadata/14085/art/1601927473" duration="338821" addedAt="1532159111" updatedAt="1603392503">
<Media id="18807" duration="338821" bitrate="101" audioChannels="2" audioCodec="wmav2" container="asf">
<Part accessible="1" exists="1" id="18996" key="/library/parts/18996/1596121189/file.wma" duration="338821" file="/volume1/music/Michael Jackson/Invincible/06 You Rock My World.wma" size="4268877" container="asf" deepAnalysisVersion="4" hasThumbnail="1" requiredBandwidths="2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647">
<Stream id="35614" streamType="2" selected="1" codec="wmav2" index="0" channels="2" bitrate="96" albumGain="-11.09" albumPeak="1.861807" albumRange="8.198442" endRamp="-51.00 0.13;-8.26 0.73;2.56 0.83;8.60 0.93;" gain="-11.09" loudness="-8.71" lra="6.27" peak="1.746560" requiredBandwidths="95,95,95,95,95,95,95,95" samplingRate="44100" startRamp="-51.00 0.00;-26.55 0.40;-8.18 0.50;-4.45 0.60;-2.98 4.10;0.15 4.20;3.23 32.20;6.50 45.60;" streamIdentifier="1" displayTitle="Unknown (WMAV2 Stereo)" extendedDisplayTitle="Unknown (WMAV2 Stereo)"/>
</Part>
</Media>
<Mood id="38692" filter="mood=38692" tag="Happy"/>
<Mood id="38598" filter="mood=38598" tag="Romantic"/>
<Mood id="38673" filter="mood=38673" tag="Rousing"/>
<Extras size="0"> </Extras>
<Related> </Related>
</Track>
</MediaContainer>

So, I don’t think it’s hardware issue. Instead I think it’s the WMA decoder in Plex.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.