SONARR: Unable to determine if file is sample

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.

If it’s mediainfo failing it’ll either return a runtime of 0 or state that it couldn’t load mediainfo, otherwise it’ll log that it can’t find the file (though it got this far, so it saw something), or can’t access it.

In your case it looks like it can’t open the file to read it, so the read permissions it needs aren’t there. ((Trace logs)) will give additional information leading up to the error.

@markus101 First of all, thanks for your responses.
Yesterday i did a trace-log: got this:

> 17-11-30 03:39:04.9|Error|DetectSample|Failed to get runtime from the file, make sure mediainfo is available
> 17-11-30 03:39:04.9|Debug|Parser|Parsing string 'Brooklyn.Nine-Nine.S05E08.1080p.WEB.x264-TBS.mkv'
> 17-11-30 03:39:04.9|Trace|Parser|^(?<title>.+?)(?:(?:[-_\W](?<![()\[!]))+S?(?<season>(?<!\d+)(?:\d{1,2})(?!\d+))(?:[ex]|\W[ex]|_){1,2}(?<episode>\d{2,3}(?!\d+))(?:(?:\-|[ex]|\W[ex]|_){1,2}(?<episode>\d{2,3}(?!\d+)))*)\W?(?!\\)
> 17-11-30 03:39:04.9|Debug|Parser|Episode Parsed. Brooklyn Nine-Nine - S05E08 
> 17-11-30 03:39:04.9|Debug|Parser|Language parsed: English
> 17-11-30 03:39:04.9|Debug|QualityParser|Trying to parse quality for Brooklyn.Nine-Nine.S05E08.1080p.WEB.x264-TBS.mkv
> 17-11-30 03:39:04.9|Debug|Parser|Quality parsed: WEBDL-1080p v1
> 17-11-30 03:39:04.9|Debug|Parser|Release Group parsed: TBS
> 17-11-30 03:39:04.9|Debug|Parser|Parsing string 'Brooklyn.Nine-Nine.S05E08.1080p.WEB.x264-TBS.mkv'
> 17-11-30 03:39:04.9|Trace|Parser|^(?<title>.+?)(?:(?:[-_\W](?<![()\[!]))+S?(?<season>(?<!\d+)(?:\d{1,2})(?!\d+))(?:[ex]|\W[ex]|_){1,2}(?<episode>\d{2,3}(?!\d+))(?:(?:\-|[ex]|\W[ex]|_){1,2}(?<episode>\d{2,3}(?!\d+)))*)\W?(?!\\)
> 17-11-30 03:39:04.9|Debug|Parser|Episode Parsed. Brooklyn Nine-Nine - S05E08 
> 17-11-30 03:39:05.0|Debug|Parser|Language parsed: English
> 17-11-30 03:39:05.0|Debug|QualityParser|Trying to parse quality for Brooklyn.Nine-Nine.S05E08.1080p.WEB.x264-TBS.mkv
> 17-11-30 03:39:05.1|Debug|Parser|Quality parsed: WEBDL-1080p v1
> 17-11-30 03:39:05.1|Debug|Parser|Release Group parsed: TBS
> 17-11-30 03:39:05.2|Debug|ImportDecisionMaker|Size: 822457448
> 17-11-30 03:39:05.2|Debug|VideoFileInfoReader|Getting media info from /volume1/NZBDLget/dst/Series/Brooklyn.Nine-Nine.S05E08.1080p.WEB.x264-TBS/Brooklyn.Nine-Nine.S05E08.1080p.WEB.x264-TBS.mkv
> 17-11-30 03:39:05.2|Error|VideoFileInfoReader|Unable to parse media info from file: /volume1/NZBDLget/dst/Series/Brooklyn.Nine-Nine.S05E08.1080p.WEB.x264-TBS/Brooklyn.Nine-Nine.S05E08.1080p.WEB.x264-TBS.mkv

> [v2.0.0.5054] System.UnauthorizedAccessException: Access to the path "/volume1/NZBDLget/dst/Series/Brooklyn.Nine-Nine.S05E08.1080p.WEB.x264-TBS/Brooklyn.Nine-Nine.S05E08.1080p.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 /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

However, it does work with files that seems to be on the usenet longer. also with MKV files, thought that might have been the difference.
Sonarr has the reading + writing permissions to the disks it has to acces, i dont know how i’m supposed to check if it has the permissions to check the “mediainfo” file.

How long they’ve been on usenet won’t affect Sonarr’s ability to read the file.

How are are you checking the permissions on that particular file?

If you run ls -l /volume1/NZBDLget/dst/Series/Brooklyn.Nine-Nine.S05E08.1080p.WEB.x264-TBS/ what is the output? (you’ll need to SSH in).

Not sure what you mean. mediainfo is something Sonarr uses to read the file and parse information, the error your seeing is from Sonarr trying to read the file before it passes it to mediainfo to get the information.

Hey @markus101 , my sonarr is running on Synology.
i checked via the Synology folder settings (write + read). I’m not quite familiar with the coding…
Getting there though…

This file i already imported manually, so i tried on a different file with the same problem.
When i do the SSH thing and enter the string you sent it returns this to me:

total 1594168
-rw-r----- 1 sc-media 179127 1632421046 Dec  1 03:07 Gotham.S04E10.1080p.WEB.x264-TBS.mkv

If i interpret this correctly, sc-media would be the owner of the folder? Might this be the evil do-er?

ater the test above, i tried to download the brooklyn nine-nine episode again, to see if the results differed.
The same file (brooklyn nine-nine, same exact file) did work now however.

@markus101

You sent me the right direction. Thanks!
After i set the permissions to sc-sonarr as folderowner, it worked.

i used the following string:

sudo chown -R sc-sonarr /volume1/NZBDLget/Series

Afterwards Sonarr imported all the episodes it still had to import!
Thanks a lot!

In my case, my permissions were also messed up. Also see here if you are using Linux (You’ll get the “could not determine if sample error”)

https://forums.sonarr.tv/t/mediainfo-library-could-not-be-loaded-libmediainfo-so-0-fedora-26?source_topic_id=16637

Okay.
I’m back.

I cant seem to figure out how to let sonarr access the files sc-media writes.
sc-media seems to keep claiming ownership of the files it writes. anybody know how to edit this so that sc-sonarr can move them?

OK, so I stumbled across this thread while googling the error and I see someone else has already mentioned the series I’m having issues with above.

I ONLY get this error on one series but I get it with every episode. I have many other series in Sonarr and none of them have the same problem - all download and import automatically.

I get two different errors repeated in the log:

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

and

Unable to parse media info from file. Access to the path is denied.

However the fact that it is just one series has to mean that permissions are OK and Mediainfo is available.

A manual import works fine btw.

i reinstalled sonarr and now it seems to be working correctly …

Complete reinstall (literally deleting everything, including folders and using a totally different mono install) made no difference - it was failing on this one series before, it’s failing on it now. Very strange.

Which version of libmediainfo is installed?
Could be something with the releases for that series that will require an update to mediainfo for Sonarr to get the runtime properly.

How do I check which version it’s using? I’m on a Synology using the latest version of the package from the Synocommunity and then updated within the app to the most recent version of Sonarr barr one (so 2.0.0.5054). I didn’t have to install anything else, apart from mono (which is version 4.2.1 - I recently downgraded it because of the bug with more recent versions that means it regularly lost communication with NZBget).

Looks like it’s probably 0.7.93 (coming from SynoCommunity https://github.com/SynoCommunity/spksrc/tree/master/cross/mediainfo)

Could be similar to the permission issues @Rodnehh was running into. ((Debug logs)) of the failing import would be useful (post them somewhere and link them here).

Thanks for the reply. I’ll have to wait a week for another episode of this particular series and will post back then. I’m struggling to see how it could be a permission issue though when it’s downloading to exactly the same folder as all of the other series (that all work perfectly well).

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