DetectSample <file> has a runtime of 0, is it a valid video file?

Sonarr version (exact version): 2.0.0.4689
Mono version (if Sonarr is not running on Windows): 4.8.0
OS: Mint 18.1
((Debug logs)): https://pastebin.com/KSHeVuH8
Description of issue: Due to a failing HD with my OS on it I had to migrate settings for Sonarr to a new HD. I used the same OS on both drives and updated packages every few days so versions should have all been the same at the time of the move. I followed the instructions in the backup and restore section of the wiki on GitHub.

I keep my media and other files on a 2nd internal HD. I’ve noticed that Sonarr is having trouble with some existing video files, but oddly not all of them. Newly acquired files seem to work fine. The error complains that video files have a runtime of 0 but the files are fully functional. I’ve seen a few topics on this subject but most are old and were fixed in newer releases. I thought this was a permissions issue at first but Sonarr has no problems adding new files and it handles most existing files without issue. An example of the error is below and some debug output is in the pastebin link.

Apr 8 17:43:59 server mono[1075]: [Error] DetectSample: [/home/user/files/temp/completed/The.Daily.Show.2017.04.03.Willie.Parker.1080p.CC.WEBRip.AAC2.0.x264-BTW[rarbg]/The.Daily.Show.2017.04.03.Willie.Parker.1080p.CC.WEBRip.AAC2.0.x264-BTW.mkv] has a runtime of 0, is it a valid video file?

Is libmediainfo installed?
If so, which version is installed?

It looks like version 0.7.82-1 is installed.

$ sudo apt list *mediainfo*  
Listing... Done
libmediainfo-dev/xenial,now 0.7.82-1 amd64 [installed]
libmediainfo-doc/xenial,xenial 0.7.82-1 all
libmediainfo0v5/xenial,now 0.7.82-1 amd64 [installed,automatic]
mediainfo/xenial,now 0.7.82-1 amd64 [installed,automatic]
mediainfo-gui/xenial 0.7.82-1 amd64
python-mediainfodll/xenial,xenial 0.7.82-1 all
python3-mediainfodll/xenial,xenial 0.7.82-1 all

That version is quite old, an upgraded version (0.7.94) is now available may help if it’s a file it’s failing to read.

I upgraded and stopped/started Sonarr as well as rebooted just for good measure but I still see the messages in the log. An excerpt of them is at: https://pastebin.com/jTwcGNub

$ sudo dpkg -s libmediainfo0v5 
Package: libmediainfo0v5
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 6457
Maintainer: MediaArea.net SARL <info@mediaarea.net>
Architecture: amd64
Multi-Arch: same
Source: libmediainfo
Version: 0.7.94-1
Replaces: libmediainfo0
Depends: libc6 (>= 2.14), libcurl3-gnutls (>= 7.16.2), libgcc1 (>= 1:4.0), libmms0 (>= 0.4), libstdc++6 (>= 5.2), libzen0v5 (>= 0.4.35), zlib1g (>= 1:1.1.4)
Conflicts: libmediainfo0
Description: library for reading metadata from media files -- shared library
 MediaInfo is a library used for retrieving technical information and other
 metadata about audio or video files.
 .
 A non-exhaustive list of the information MediaInfo can retrieve from media
 files include:
  - General: title, author, director, album, track number, date, duration...
  - Video: codec, aspect, fps, bitrate...
  - Audio: codec, sample rate, channels, language, bitrate...
  - Text: language of subtitle
  - Chapters: number of chapters, list of chapters
 .
 MediaInfo supports the following formats:
  - Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1, MPEG-2,
           MPEG-4, DVD (VOB)...
  - Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
  - Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
  - Subtitles: SRT, SSA, ASS, SAMI...
 .
 This package contains the shared library needed for running applications which
 use this library.
Homepage: http://MediaArea.net/MediaInfo

I tested this same release with Media info 0.7.93.0 and 0.7.94.0 and both retrieved the media info from the file properly. I tested under Windows, but the versions should be the same under Mint.

Everything else seems to be functioning normally. I’ve just been leaving these files on my system in case you guys wanted me to gather some information so you could possibly figure out the root cause. If you don’t want to do that then I’ll just remove them and my log will probably be quiet again.

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