SONARR: Unable to determine if file is sample

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.