Server Version#: 1.42.2.10156
Player Version#: N/A
Hello - I have had sonic analysis problems forever and I have a hypothesis (with some help from Claude…) - see below:
On Windows, Sonic Analysis frequently fails with
“Error decoding analysis input files (exit code: 1)”
for albums containing audio files with long paths.
Based on log analysis, failures are strongly correlated with full file path length, with a hard cutoff at ~259 characters. Files below that length analyze successfully. Files above it fail immediately.
This appears consistent with a Windows command-line length limitation when Plex Transcoder is launched via cmd.exe. While Plex logs do not explicitly state “path too long,” the statistical correlation is exact and reproducible.
This issue closely resembles a Windows long-path problem you addressed in 2020 for library scanning using the \\?\ prefix, which does not appear to be consistently applied to Sonic Analysis.
I can’t see enough detail in the logs to be sure, but here is what I see:
Sonic Analysis starts Plex Transcoder
-
The process exits immediately with exit code 1
-
No stderr output is captured or logged
-
Albums are marked as failed even when most tracks succeed
There are no explicit log messages such as “path too long” or “file not found” for these failures. The only indicator is immediate process termination.
Key observations:
-
0 files with paths longer than 259 characters succeeded
-
All files with paths ≤259 characters succeeded, regardless of artist or codec
-
The cutoff is exact at 259 characters
-
Failed attempts complete in 0–20 ms
-
Successful attempts take 200–800 ms, indicating real decode work
This strongly suggests the failure occurs before decoding begins, consistent with an input file open or command construction failure.
I also noticed that roughly 24% of attempts are duplicates, where the same physical audio file is analyzed under multiple Plex album IDs, such as standard and deluxe editions referencing the same files.
When a file is analyzed once successfully, a subsequent attempt can fail immediately because the output WAV already exists. This causes entire albums to be reported as failed even when most tracks succeeded, inflating album-level failure counts.
Plex previously addressed a Windows long-path issue during library scanning by applying the extended-length path prefix (\\?\):
https://forums.plex.tv/t/support-long-file-paths-on-windows/659568
Sonic Analysis appears to encounter the same underlying limitation. Notably, the transcoder command already uses \\?\ for FFMPEG_EXTERNAL_LIBS, but the input media file path does not use the prefix.
Suggested Fix?
Extend the existing Windows long-path handling to Sonic Analysis by:
- Applying the
\\?\extended-length prefix to the input media file path when constructing the Plex Transcoder command
This mirrors Plex’s prior fix, avoids cmd.exe path-length limits, and requires minimal behavioral change.
Thanks in advance!!