SONARR: Unable to determine if file is sample

Sonarr version (exact version): 2.0.0.4949
Mono version (if Sonarr is not running on Windows): 4.6.2
OS: Synology DSM 6.1.3-15152 Update 8
((Debug logs)):
Example:

DetectSample Failed to get runtime from the file, make sure mediainfo is available 14:50

VideoFileInfoReader Unable to parse media info from file: /volume1/Download/Compleet/Sonarr/The.Big.Bang.Theory.S11E05.The.Collaboration.Contamination.1080p.AMZN.WEB-DL.DD.5.1.H.264-QOQ English/989b5f4b025642e9a41619a1695166b6.mkv: Access to the path “/volume1/Download/Compleet/Sonarr/The.Big.Bang.Theory.S11E05.The.Collaboration.Contamination.1080p.AMZN.WEB-DL.DD.5.1.H.264-QOQ English/989b5f4b025642e9a41619a1695166b6.mkv” is denied.

There is access to this folder by the way.

(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)_

Description of issue:
After a file is downloaded by NZBGET, iyt is not picked up by Sonarr. In Sonarr Activity under Queue there is an orange symbol and when hovering over it: “Unable to determine if file is a sample file”. Sonarr does nothing with this file : no rename and no import to the series folder. It does not happen with all files but I see this sometimes happen. When I download the nzb file directly in Newsleecher, it downloads and unpacks and the video file is not corrupt. But somehow Sonarr has a problem with some files and then does not Rename and import.

Some additional information from Sonarr log texts:
17-11-4 10:31:22.1|Error|VideoFileInfoReader|Unable to parse media info from file: /volume1/Download/Compleet/Sonarr/Mom.S05E01.720p.HDTV.X264-DIMENSION/7e8a791800e34d9ab7bc6dad5d15eff0.mkv

[v2.0.0.4949] System.UnauthorizedAccessException: Access to the path “/volume1/Download/Compleet/Sonarr/Mom.S05E01.720p.HDTV.X264-DIMENSION/7e8a791800e34d9ab7bc6dad5d15eff0.mkv” is denied.
at System.IO.FileStream…ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00335] in /spksrc/native/mono/work-native/mono-4.6.2/mcs/class/corlib/System.IO/FileStream.cs:290
at System.IO.FileStream…ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /spksrc/native/mono/work-native/mono-4.6.2/mcs/class/corlib/System.IO/FileStream.cs:157
at System.IO.FileStream…ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /spksrc/native/mono/work-native/mono-4.6.2/mcs/class/corlib/System.IO/FileStream.cs:92
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess)
at NzbDrone.Common.Disk.DiskProviderBase.OpenReadStream (System.String path) [0x0001b] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Disk\DiskProviderBase.cs:395
at NzbDrone.Core.MediaFiles.MediaInfo.VideoFileInfoReader.GetMediaInfo (System.String filename) [0x0006e] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\MediaFiles\MediaInfo\VideoFileInfoReader.cs:53

17-11-4 10:31:22.1|Error|DetectSample|Failed to get runtime from the file, make sure mediainfo is available
17-11-4 10:31:22.1|Error|VideoFileInfoReader|Unable to parse media info from file: /volume1/Download/Compleet/Sonarr/Mom.S05E01.720p.HDTV.X264-DIMENSION/7e8a791800e34d9ab7bc6dad5d15eff0.mkv

Either permissions (can’t access the file) or libmediainfo is not available (though it should be included in the synology package).

The strange thing is, it does not happen with all downloaded files.About of 10-20% of them. After checking then the /volume1/Download/Compleet/Sonarr/Mom.S05E01.720p.HDTV.X264-DIMENSION/ folder (in this example) there is no file 7e8a791800e34d9ab7bc6dad5d15eff0.mkv.

80-90% of my sonarr downloads I do not get this message of “Unable to determine if file is a sample file” and the files are being downloaded correctly with NZBGET and SONARR.

Pernissions for folder and subfolders of /volume1/Download/Compleet look fine. How could I check if libmediainfo is available?

What about the file(s) that are failing to get mediainfo from?

If other downloads are importing then mediainfo is available.

Hi,
I am having the exact same issue. In fact I even installed the mediainfo pkg on synology to make sure it’s there.
Most of my videos process with np but there are times when I get Unable to determine if file is a sample in activity. If I view the video it plays with np.

I want to add that if permissions was an issue then when I choose manual import that works with no problem at all.

Thank you for help,
Bryan

I have the same issue. In my case I’m not sure if it’s a permission problem. I have nzbget set up with a umask of 0, but for some reason some of the downloaded files do not have 777 permissions. The folders do, but the files inside them have 666 permissions. Manual import still works though, but this is happening to a lot of files. Might be an issue with nzbget. But if manual import works then how can auto import not have the correct permissions?

I’ve also been having this exact issue with my Synology DS916+ running DSM 6.1.3-15152 Update 8. I’ve had my NAS for about a year, however my imports have been failing about 60% of the time for the same reason for the last couple months.

Manual import is successful every time. I have verified permissions, folders and files are all 777. I only have one user on my system “admin”.

I have tried various installs/uninstalls using Sonarr & Nzbget in various forms, in Docker, from Synology, from Synocommunity. I have even re-installed directly via shell.

One thing I’ve noticed is all failed imports are obfuscated mkv files. Might just be a coincidence - I use Nzbgeek and NZBfinder.

Strange that it it does not fail 100% of the time.

Perhaps the developer could consider adding an option to bypass a mediainfo sample check, and just automatically move/import files > specified size. For example, a 1.5gb .mkv file is probably not a sample.

Sonarr Version 2.0.0.5054
Mono Version 4.6.2
MediaInfo 0.7.93-4
NZBGet 20.0-r2159, Umask 000

This could be the problem, something in the file requiring a newer version of mediainfo would fix. Either a new mediainfo package would need to be installed or the Sonarr synology package updated (this package is not maintained by us).

We do not have plans to use the filesize to determine if a file is a sample or not.

I have mediainfo 0.7.99

Seems to only happen when the file has a random alphanumeric name. Some people put an episode in a file like:

67gf7hery89t8c9vx76geaw0.mkv

That seems to throw it off.

Getting this here too on Centos Linux but only with Outlander web episodes. Next time one snags, I’ll try to remember to up a debug log.

Mediainfo is v0.7.99 here

I maintain 2 systems on different platforms.

Only difference between the 2 installs is the version of Mono.
System A: Mono 5.0.1.1 (No problems importing files)
System B: Mono 4.6.2.7 (Occasional “Unable to determine if file is a sample”)

From System B:
Message
Unable to parse media info from file: /volume1/Downloads/TV-Shows/Lucifer.S03E07.WEB.x264-TBS.mkv: Access to the path “/volume1/Downloads/TV-Shows/Lucifer.S03E07.WEB.x264-TBS.mkv” is denied.

Exception
System.UnauthorizedAccessException: Access to the path “/volume1/Downloads/TV-Shows/Lucifer.S03E07.WEB.x264-TBS.mkv” is denied.
at System.IO.FileStream…ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00335] in /spksrc/native/mono/work-native/mono-4.6.2/mcs/class/corlib/System.IO/FileStream.cs:290
at System.IO.FileStream…ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /spksrc/native/mono/work-native/mono-4.6.2/mcs/class/corlib/System.IO/FileStream.cs:157
at System.IO.FileStream…ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /spksrc/native/mono/work-native/mono-4.6.2/mcs/class/corlib/System.IO/FileStream.cs:92
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess)
at NzbDrone.Common.Disk.DiskProviderBase.OpenReadStream (System.String path) [0x0001b] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Disk\DiskProviderBase.cs:395
at NzbDrone.Core.MediaFiles.MediaInfo.VideoFileInfoReader.GetMediaInfo (System.String filename) [0x0006e] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\MediaFiles\MediaInfo\VideoFileInfoReader.cs:55

I have the very same issue since I got back few days ago from 2 months out of country. It seams that the obscured (Random filename) uploads are not handled correctly and always detected as “unknown if samples”. How can I disable this detection as a workaround? Sample detection can be done by size, no need for any other shenanigans. This makes Sonarr dificult to use right now. (always have to manually post process)

Still experiencing this with a lot of recent uploads. Also using Synology latest DSM. Arent there any more people having this problem?

I have the same problem.
Does this to most of my new downloads.
it doesnt seem to do this to the downloads that have been online for a longer time.

oh thank you… you all formed your question better thaan I did.

if anyone knows why or how limediainfo became broken, I’d be ever so greatful

I’m running Fedora 26, latest mono, latest sonarr (both reinstalled), I tried softlinking libmediainfo.so.0 to /opt/NzbDrone

nothing worked, it’s only been three days, not sure if an os update broke things, the machine hosting sonarr sab and deluge is strictly server so not a lot of changes other than system updates.

I can still post process manually, just when the files come in they stay purple and hang in their respective fetch folders.

Any help would be greatly appreciated.

Thanks!

Ray

ps Sucks I know, but I’m glad i’m not alone… :smile:

For me it gives this error.
Quite similar to the one earlier quoted.

17-11-30 01:56:29.4|Error|DetectSample|Failed to get runtime from the file, make sure mediainfo is available
17-11-30 01:56:33.5|Error|VideoFileInfoReader|Unable to parse media info from file: /volume1/NZBDLget/dst/Series/Brooklyn.Nine-Nine.S05E08.Return.to.Skyfire.1080p.AMZN.WEB-DL.DD.5.1.H.264-ViSUM/1bcd22a826c24a4aa1eefcd5e8362ee6.mkv

[v2.0.0.5054] System.UnauthorizedAccessException: Access to the path "/volume1/NZBDLget/dst/Series/Brooklyn.Nine-Nine.S05E08.Return.to.Skyfire.1080p.AMZN.WEB-DL.DD.5.1.H.264-ViSUM/1bcd22a826c24a4aa1eefcd5e8362ee6.mkv" is denied.
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00335] in /source/mono-3.x/mcs/class/corlib/System.IO/FileStream.cs:290 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in /source/mono-3.x/mcs/class/corlib/System.IO/FileStream.cs:157 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in /source/mono-3.x/mcs/class/corlib/System.IO/FileStream.cs:92 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess)
  at NzbDrone.Common.Disk.DiskProviderBase.OpenReadStream (System.String path) [0x0001b] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Disk\DiskProviderBase.cs:395 
  at NzbDrone.Core.MediaFiles.MediaInfo.VideoFileInfoReader.GetMediaInfo (System.String filename) [0x0006e] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\MediaFiles\MediaInfo\VideoFileInfoReader.cs:55 

If anyone has any idea on how to fix, lemme know!

Hi everyone,
I’m writing to let you know the steps I did to finally fix the libmediainfo.so.0 problem

OS : Fedora 26
latest mono and sonarr

turns out it was an issue I had thought, a soft symlink, I’m still learning the ropes of the linux file system, anyways when I got to /usr/lib64, when i did an ls -l |grep libmediainfo.so , i got libmediainfo.so.0 AS A FILE, i also had a broken symlink that pointed to libmediainfo.so.0. it was gone, in it’s place, was libmediainfo.so.17.10 also as a file. So I backed up my libmediainfo.so.0 to a .bak and deleted it. I then made a new softlink with ln -s libmedinfo.so.0 /usr/lib64/libmediainfo.so.17.10 , I then reloaded the sonarr daemon via systemctl, and the error was gone, tried grabbing a show that had failed, and worked perfect again.

I hope this helps you guys… I found very little online regarding libmediainfo and sonarr so I looked around found a person with a similar issue with filebot, another program I’ve used for post process.

Thanks everyone for your help, cool software, good forums.

It looks like there are two possible issues here.

  1. libmediainfo is outdated and the files are not compatible with the old version, in which case libmediainfo will need to be updated.
  2. Sonarr is unable to read the file (access denied), which is likely a permissions issue, Sonarr will need read access at a minimum, though move is required in many cases.

@markus101, is there a way to find out which one of the two it is?

In my situation it would seem to be a permission issue, however with other files it does seem to acces libmediainfo. (log is above)

I can’t seem to find what seems to trigger the error.