SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux > SageTV for unRAID/Docker

Notices

SageTV for unRAID/Docker Discussion related to SageTV for unRAID/Docker. Questions, issues, problems, suggestions, etc. relating to SageTV for unRAID/Docker should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-01-2019, 04:26 AM
rickgillyon's Avatar
rickgillyon rickgillyon is offline
Sage Icon
 
Join Date: Sep 2005
Location: Whitley Bay, England
Posts: 1,944
All Imported MKVs Show Zero Length

My system downloads MKVs via Sonarr and dumps them into folders where Sage can see them. These videos have been working for years with no issues, but from sometime between 28th November (last fault-free import) and 30th November something happened which made all imports show as length zero. They still play in Sage, but the timeline shows 0:00 to 0:00, can't skip forward or back, if stopped halfway through they always go back to the beginning, and never get set as played even if watched to the end. Does the same for MP4s. This is in PC Client or MiniClient, and Plex/MediaInfo/MPC-HC etc all work just fine and show correct lengths.

So something seems to have happened to Sage's import process around the end of November. Any ideas what changed around those dates? Any suggestions?
__________________
unRAID Server: Intel Core i5 7600K, 16GB DDR4, 2x512GB PCIe M.2 Cache Pool, 2x4TB SATA3 Parity Drive, 2x3TB + 1x4TB SATA Array, 1x TBS 6284 PCIe DVB-T2 Quad, 2x TBS 6205 PCIe DVB-T Quad, Cable TV from TBS2603 sat/IP, IPTV via Telly & node-ffmpeg-mpegts-proxy, unRAID 6.6.6, TVheadend for recording back end, OpenDCT, SDEPG, SageTV 9
Clients: 3 Nvidia Shields, 2 Android Miniclients (Amlogic S905X), 3 Win10 Pro PC Clients
Reply With Quote
  #2  
Old 02-01-2019, 09:26 AM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,035
Try setting “debug_ffmpeg_format_info=true” in sage.properties and then import a new file. It will show what SageTV believes FFmpeg is finding.

EDIT for anyone who finds this later. Set it to TRUE since it’s a string value.

Last edited by wnjj; 02-01-2019 at 10:24 AM.
Reply With Quote
  #3  
Old 02-01-2019, 09:34 AM
rickgillyon's Avatar
rickgillyon rickgillyon is offline
Sage Icon
 
Join Date: Sep 2005
Location: Whitley Bay, England
Posts: 1,944
Quote:
Originally Posted by wnjj View Post
Try setting “debug_ffmpeg_format_info=true” in sage.properties and then import a new file. It will show what SageTV believes FFmpeg is finding.
Output below:
Quote:
Fri 2/1 15:32:27.146 [LibraryImporter@39dee838] Seeker is starting the library import scan...
Fri 2/1 15:32:27.285 [LibraryImporter@39dee838] Starting to scan lib import root: /var/mediaext/videos
Fri 2/1 15:32:27.322 [PluginRepoUpdater@53db1c13] Local plugin repository file's checksum matches server's, no need to download a new one for SageTVPlugins.xml
Fri 2/1 15:32:27.323 [PluginRepoUpdater@53db1c13] Checking to see if the plugin repository file SageTVPluginsV9.xml needs to be updated using MD5 URL: https://raw.githubusercontent.com/Op...VPluginsV9.md5
Fri 2/1 15:32:27.385 [LibraryImporter@39dee838] Increased StringBuffer pool to size=1
Fri 2/1 15:32:27.386 [LibraryImporter@39dee838] testFile=ffmpeg_test.mkv
Fri 2/1 15:32:27.391 [LibraryImporter@39dee838] Now using external format detector for: /var/mediaext/videos/=Missed/ffmpeg_test.mkv
Fri 2/1 15:32:27.397 [SageTV@3e38a2aa] Starting all core plugins...
Fri 2/1 15:32:27.398 [SageTV@3e38a2aa] Moving starting of plugin The TV DB Library to after commons-logging because of its dependency on it.
Fri 2/1 15:32:27.399 [SageTV@3e38a2aa] Moving starting of plugin Phoenix Core Services to after Phoenix API because of its dependency on it.
Fri 2/1 15:32:27.399 [SageTV@3e38a2aa] Moving starting of plugin SageTV Groovy Tools to after sagex-api - SageTV API Extensions because of its dependency on it.
Fri 2/1 15:32:27.399 [SageTV@3e38a2aa] Moving starting of plugin The Movie DB Library to after commons-logging because of its dependency on it.
Fri 2/1 15:32:27.399 [SageTV@3e38a2aa] Moving starting of plugin Phoenix Fanart for Malore Menus to after Phoenix API because of its dependency on it.
Fri 2/1 15:32:27.399 [SageTV@3e38a2aa] Moving starting of plugin SageTV Web Interface to after SageTV Groovy Tools because of its dependency on it.
Fri 2/1 15:32:27.399 [SageTV@3e38a2aa] Moving starting of plugin The Movie DB Library to after hamcrest-core because of its dependency on it.
Fri 2/1 15:32:27.399 [SageTV@3e38a2aa] Moving starting of plugin The TV DB Library to after hamcrest-core because of its dependency on it.
Fri 2/1 15:32:27.400 [SageTV@3e38a2aa] Moving starting of plugin Batch Metadata Tools - Web Interface to after Phoenix Core Services because of its dependency on it.
Fri 2/1 15:32:27.400 [SageTV@3e38a2aa] Moving starting of plugin Jetty Web Server to after sagex-api - SageTV API Extensions because of its dependency on it.
Fri 2/1 15:32:27.400 [SageTV@3e38a2aa] Moving starting of plugin The TV DB Library to after api-common because of its dependency on it.
Fri 2/1 15:32:27.400 [SageTV@3e38a2aa] Moving starting of plugin The Movie DB Library to after api-common because of its dependency on it.
Fri 2/1 15:32:27.400 [SageTV@3e38a2aa] Moving starting of plugin Jetty Web Server to after ant because of its dependency on it.
Fri 2/1 15:32:27.400 [SageTV@3e38a2aa] Moving starting of plugin SageTV Groovy Tools to after groovy because of its dependency on it.
Fri 2/1 15:32:27.400 [SageTV@3e38a2aa] Moving starting of plugin SageTV Web Interface to after SageTV Groovy Tools because of its dependency on it.
Fri 2/1 15:32:27.400 [SageTV@3e38a2aa] Calling start on plugin: Jetty Web Server
Fri 2/1 15:32:27.406 [SageTV@3e38a2aa] ::INFO: Starting Jetty
Fri 2/1 15:32:27.406 [SageTV@3e38a2aa] ::INFO: Jetty Plugin log level: INFO
Fri 2/1 15:32:27.440 [LibraryImporter@39dee838] File Format Parsed /var/mediaext/videos/=Missed/ffmpeg_test.mkv=MATROSKA 0:00:00 0 kbps []
Fri 2/1 15:32:27.441 [LibraryImporter@39dee838] Added:MediaFile[id=26621679 A[26621682,26621680,"ffmpeg_test",0@0116.03:34,0,V] mask=V host=cf0856437333 encodedBy= format=MATROSKA 0:00:00 0 kbps [] /var/mediaext/videos/=Missed/ffmpeg_test.mkv, Seg0[Wed 1/16 3:34:05.999-Wed 1/16 3:34:06.000]] num=25641
Fri 2/1 15:32:27.441 [LibraryImporter@39dee838] New Library File MediaFile[id=26621679 A[26621682,26621680,"ffmpeg_test",0@0116.03:34,0,V] mask=V host=cf0856437333 encodedBy= format=MATROSKA 0:00:00 0 kbps [] /var/mediaext/videos/=Missed/ffmpeg_test.mkv, Seg0[Wed 1/16 3:34:05.999-Wed 1/16 3:34:06.000]]
__________________
unRAID Server: Intel Core i5 7600K, 16GB DDR4, 2x512GB PCIe M.2 Cache Pool, 2x4TB SATA3 Parity Drive, 2x3TB + 1x4TB SATA Array, 1x TBS 6284 PCIe DVB-T2 Quad, 2x TBS 6205 PCIe DVB-T Quad, Cable TV from TBS2603 sat/IP, IPTV via Telly & node-ffmpeg-mpegts-proxy, unRAID 6.6.6, TVheadend for recording back end, OpenDCT, SDEPG, SageTV 9
Clients: 3 Nvidia Shields, 2 Android Miniclients (Amlogic S905X), 3 Win10 Pro PC Clients
Reply With Quote
  #4  
Old 02-01-2019, 09:34 AM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,035
All SageTV does is run FFmpeg and then parse the text that comes out. There should be a field called “Duration:” in that output. Turning on that debug flag should dump the output into the log file.

I’m guessing something is wrong with your FFmpeg or one of its support libraries.

EDIT: hmm. I don’t see the log message I expected. I’ll look closer at the code.
Reply With Quote
  #5  
Old 02-01-2019, 09:37 AM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,035
Try setting it to “TRUE” since I now realize it is probably just a string not a boolean. You should get the file name, its size and then “FFMPEG Info:”
Reply With Quote
  #6  
Old 02-01-2019, 09:44 AM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,170
[LIST]
format=MATROSKA 0:00:00 0 kbps

Is the above normal?

Can you copy a good movie file without the timeline issue and see if the scan also has the 0 kbps
Reply With Quote
  #7  
Old 02-01-2019, 10:13 AM
rickgillyon's Avatar
rickgillyon rickgillyon is offline
Sage Icon
 
Join Date: Sep 2005
Location: Whitley Bay, England
Posts: 1,944
Quote:
Originally Posted by wnjj View Post
Try setting it to “TRUE” since I now realize it is probably just a string not a boolean. You should get the file name, its size and then “FFMPEG Info:”
Ah, that looks significant:
Quote:
Fri 2/1 16:10:04.031 [LibraryImporter@273085f3] testFile=Holby City - S21E04.mkv
Fri 2/1 16:10:04.031 [LibraryImporter@273085f3] Now using external format detector for: /var/mediaext/videos/TV/Holby City/Holby City - S21E04.mkv
Fri 2/1 16:10:04.033 [LibraryImporter@273085f3] File:/var/mediaext/videos/TV/Holby City/Holby City - S21E04.mkv len=1507653508 FFMPEG Info:nice: ‘/opt/sagetv/server/ffmpeg’: Permission denied

Fri 2/1 16:10:04.033 [LibraryImporter@273085f3] File Format Parsed /var/mediaext/videos/TV/Holby City/Holby City - S21E04.mkv=MATROSKA 0:00:00 0 kbps []
Fri 2/1 16:10:04.034 [LibraryImporter@273085f3] Added:MediaFile[id=26632708 A[26632711,26632709,"Holby City - S21E04",0@0122.22:51,0,V] mask=V host=cf0856437333 encodedBy= format=MATROSKA 0:00:00 0 kbps [] /var/mediaext/videos/TV/Holby City/Holby City - S21E04.mkv, Seg0[Tue 1/22 22:51:16.999-Tue 1/22 22:51:17.000]] num=25639
Fri 2/1 16:10:04.034 [LibraryImporter@273085f3] New Library File MediaFile[id=26632708 A[26632711,26632709,"Holby City - S21E04",0@0122.22:51,0,V] mask=V host=cf0856437333 encodedBy= format=MATROSKA 0:00:00 0 kbps [] /var/mediaext/videos/TV/Holby City/Holby City - S21E04.mkv, Seg0[Tue 1/22 22:51:16.999-Tue 1/22 22:51:17.000]]
__________________
unRAID Server: Intel Core i5 7600K, 16GB DDR4, 2x512GB PCIe M.2 Cache Pool, 2x4TB SATA3 Parity Drive, 2x3TB + 1x4TB SATA Array, 1x TBS 6284 PCIe DVB-T2 Quad, 2x TBS 6205 PCIe DVB-T Quad, Cable TV from TBS2603 sat/IP, IPTV via Telly & node-ffmpeg-mpegts-proxy, unRAID 6.6.6, TVheadend for recording back end, OpenDCT, SDEPG, SageTV 9
Clients: 3 Nvidia Shields, 2 Android Miniclients (Amlogic S905X), 3 Win10 Pro PC Clients
Reply With Quote
  #8  
Old 02-01-2019, 10:22 AM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,170
BINGO
Fix the permission, rescan, and it should be fixed
Do: chmod ugo+x /opt/sagetv/server/ffmpeg

I need to add that properties setting to my troubleshooting notes

Last edited by graywolf; 02-01-2019 at 10:29 AM.
Reply With Quote
  #9  
Old 02-01-2019, 10:36 AM
rickgillyon's Avatar
rickgillyon rickgillyon is offline
Sage Icon
 
Join Date: Sep 2005
Location: Whitley Bay, England
Posts: 1,944
Yep, thanks all, that's done it.

Now I have hundreds of file that need a rescan but won't scan because they are unchanged. Any idea how I can force the importer to pick them up? Preferably without losing watched data...
__________________
unRAID Server: Intel Core i5 7600K, 16GB DDR4, 2x512GB PCIe M.2 Cache Pool, 2x4TB SATA3 Parity Drive, 2x3TB + 1x4TB SATA Array, 1x TBS 6284 PCIe DVB-T2 Quad, 2x TBS 6205 PCIe DVB-T Quad, Cable TV from TBS2603 sat/IP, IPTV via Telly & node-ffmpeg-mpegts-proxy, unRAID 6.6.6, TVheadend for recording back end, OpenDCT, SDEPG, SageTV 9
Clients: 3 Nvidia Shields, 2 Android Miniclients (Amlogic S905X), 3 Win10 Pro PC Clients
Reply With Quote
  #10  
Old 02-01-2019, 10:52 AM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,170
Do: find /var/mediaext/videos/TV -type f -name *.mkv -exec touch {} \;
That will do just the mkv file extensions. Do same for mp4 and others you want

Then do rescan.
Reply With Quote
  #11  
Old 02-01-2019, 11:17 AM
rickgillyon's Avatar
rickgillyon rickgillyon is offline
Sage Icon
 
Join Date: Sep 2005
Location: Whitley Bay, England
Posts: 1,944
Fantastic, thanks so much. WAF will be much improved...
__________________
unRAID Server: Intel Core i5 7600K, 16GB DDR4, 2x512GB PCIe M.2 Cache Pool, 2x4TB SATA3 Parity Drive, 2x3TB + 1x4TB SATA Array, 1x TBS 6284 PCIe DVB-T2 Quad, 2x TBS 6205 PCIe DVB-T Quad, Cable TV from TBS2603 sat/IP, IPTV via Telly & node-ffmpeg-mpegts-proxy, unRAID 6.6.6, TVheadend for recording back end, OpenDCT, SDEPG, SageTV 9
Clients: 3 Nvidia Shields, 2 Android Miniclients (Amlogic S905X), 3 Win10 Pro PC Clients
Reply With Quote
  #12  
Old 02-01-2019, 12:49 PM
stuckless's Avatar
stuckless stuckless is online now
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,539
The unRAID container for SageTV does reset the file permissions to the correct permissions on startup, if the files are under /var/media/tv /var/mediaext/ or var/media/videos.

But, to be sure you should make sure that the sonar container and sagetv containers are all running as the same unRAID user (set in the PUID and GUID container settings). This should ensure that you don't have ownership permissions. The fact that this just started happening... maybe the sonar container or the sagetv container changed?
Reply With Quote
  #13  
Old 02-01-2019, 03:50 PM
rickgillyon's Avatar
rickgillyon rickgillyon is offline
Sage Icon
 
Join Date: Sep 2005
Location: Whitley Bay, England
Posts: 1,944
Quote:
Originally Posted by stuckless View Post
The unRAID container for SageTV does reset the file permissions to the correct permissions on startup, if the files are under /var/media/tv /var/mediaext/ or var/media/videos.

But, to be sure you should make sure that the sonar container and sagetv containers are all running as the same unRAID user (set in the PUID and GUID container settings). This should ensure that you don't have ownership permissions. The fact that this just started happening... maybe the sonar container or the sagetv container changed?
Thanks, but it wasn't the permission of the video files, it was the permission on the ffmpeg runtime - it had lost its execute bit.

So just a chmod +x /opt/sagetv/server/ffmpeg was needed.
__________________
unRAID Server: Intel Core i5 7600K, 16GB DDR4, 2x512GB PCIe M.2 Cache Pool, 2x4TB SATA3 Parity Drive, 2x3TB + 1x4TB SATA Array, 1x TBS 6284 PCIe DVB-T2 Quad, 2x TBS 6205 PCIe DVB-T Quad, Cable TV from TBS2603 sat/IP, IPTV via Telly & node-ffmpeg-mpegts-proxy, unRAID 6.6.6, TVheadend for recording back end, OpenDCT, SDEPG, SageTV 9
Clients: 3 Nvidia Shields, 2 Android Miniclients (Amlogic S905X), 3 Win10 Pro PC Clients
Reply With Quote
  #14  
Old 06-02-2019, 01:10 PM
ddoell ddoell is offline
Sage User
 
Join Date: Feb 2009
Posts: 16
I have a similar issue with my .mp4 video home movie files but I'm not sure how the above solution might apply to me. I moved from a Windows 10 server to the NAS server in my signature about 6 months ago. My home movies are located at /var/media/Home Movies in folders by year. For folders that already existed from 2006 to 2018 regular .mpg files play successfully. However, .mp4 and .mov files play but show zero duration and fast forward/rewind is disabled.

I made a new folder for 2019 and imported two new .mp4 files and these new files play just fine. The timeline is accurate and fast forward/rewind works in increments of 15 seconds. All the folders under Home Movies seem to have the same permissions. Anybody have a suggestion on how I might get my existing .mp4 files to play with a correct duration/timeline and fast forward/rewind enabled? Sorry if I'm missing something obvious. I'm still a noob at Linux and QNAP.

Thanks.
__________________
Server: QNAP TS-253Be NAS, 2-4TB drives in Raid 1 with SageTV Docker Java 8 running in Container Station - Tuner: HDHR Connect Quatro - Clients: 1 x HD-300
Reply With Quote
  #15  
Old 06-02-2019, 01:45 PM
ddoell ddoell is offline
Sage User
 
Join Date: Feb 2009
Posts: 16
Quote:
Originally Posted by ddoell View Post
I have a similar issue with my .mp4 video home movie files but I'm not sure how the above solution might apply to me. I moved from a Windows 10 server to the NAS server in my signature about 6 months ago. My home movies are located at /var/media/Home Movies in folders by year. For folders that already existed from 2006 to 2018 regular .mpg files play successfully. However, .mp4 and .mov files play but show zero duration and fast forward/rewind is disabled.

I made a new folder for 2019 and imported two new .mp4 files and these new files play just fine. The timeline is accurate and fast forward/rewind works in increments of 15 seconds. All the folders under Home Movies seem to have the same permissions. Anybody have a suggestion on how I might get my existing .mp4 files to play with a correct duration/timeline and fast forward/rewind enabled? Sorry if I'm missing something obvious. I'm still a noob at Linux and QNAP.

Thanks.
In looking around at the detailed settings I found a command to rescan all imported media. It said to use this if your imported media had incomplete metadata. So I tried this and it seems to have fixed my problem. I haven't checked all my files yet but the 20 or so files I have played so far all worked fine. So I seem to have fixed my problem. Thanks.
__________________
Server: QNAP TS-253Be NAS, 2-4TB drives in Raid 1 with SageTV Docker Java 8 running in Container Station - Tuner: HDHR Connect Quatro - Clients: 1 x HD-300
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Imported videos timeline show 0 length DaveS SageTV Github Development 14 06-24-2017 08:03 AM
How does Sage calculate/determine show length for imported shows?? mgpaulus SageTV Software 1 07-13-2013 09:30 PM
Favorites by length of show? wayner SageTV Software 1 01-12-2009 02:47 AM
0 length movies and cannot fast forward on Imported media vorius SageTV Software 3 11-01-2008 11:44 PM
bug reporting wrong play length in 15 imported movies Please help! darksoul SageTV Beta Test Software 6 04-12-2004 07:57 PM


All times are GMT -6. The time now is 03:18 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.