SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 12-03-2015, 12:22 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Once in a while, I get this issue on some channels for my HDHomeRuns... there might be stream errors during prime time, but no errors during other times. I can run the file through VideoReDo's quick stream fix (or whatever it is called) and then play it fine. After a few days, the channel has no issues again.

Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #22  
Old 12-03-2015, 01:29 PM
mikejaner's Avatar
mikejaner mikejaner is offline
Sage Icon
 
Join Date: Oct 2003
Location: Chantilly VA
Posts: 2,087
Send a message via MSN to mikejaner
Quote:
Originally Posted by Narflex View Post
@mikejaner, what source are you recording these from?
HDHR Prime via SageDCT
__________________
Mike Janer
SageTV HD300 Extender X2
Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5
Reply With Quote
  #23  
Old 12-04-2015, 01:06 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
@mikejaner, OK, then the problem is likely due to the cable provider messing up the PTS timestamps when they are doing ad insertion. If the author of that program is able to detect when PTS discontinuities occur...then I can tell them how to send SageTV an event so that it stops/restart the stream at that time which would work around this issue (only downside is it'll have a half second or so gap at that point when it occurs...but that's a much better tradeoff).
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #24  
Old 12-04-2015, 02:27 PM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 2,009
Quote:
Originally Posted by Narflex View Post
@mikejaner, OK, then the problem is likely due to the cable provider messing up the PTS timestamps when they are doing ad insertion. If the author of that program is able to detect when PTS discontinuities occur...then I can tell them how to send SageTV an event so that it stops/restart the stream at that time which would work around this issue (only downside is it'll have a half second or so gap at that point when it occurs...but that's a much better tradeoff).
So, would this result in the recording being broken up into multiple files (a new file each time a PTS discontinuity occurs)?
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM
Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast/Xfinity X1 Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250, HD-PVR
Reply With Quote
  #25  
Old 12-05-2015, 12:06 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
Quote:
Originally Posted by Tiki View Post
So, would this result in the recording being broken up into multiple files (a new file each time a PTS discontinuity occurs)?
Yes it would. If someone does do this...the other case you want to account for is when you notice audio/video PIDs changing dynamically (mainly due to ad insertion). Normally this doesn't happen; but I noticed FIOS was doing it every now and then on some channels a couple years ago.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #26  
Old 12-08-2015, 09:04 AM
mikejaner's Avatar
mikejaner mikejaner is offline
Sage Icon
 
Join Date: Oct 2003
Location: Chantilly VA
Posts: 2,087
Send a message via MSN to mikejaner
Quote:
Originally Posted by Opus4 View Post
Once in a while, I get this issue on some channels for my HDHomeRuns... there might be stream errors during prime time, but no errors during other times. I can run the file through VideoReDo's quick stream fix (or whatever it is called) and then play it fine. After a few days, the channel has no issues again.

Andy
Cool VideoRedo quick stream fix did it for me too!!
It would be cool for others if there was an open source tool, possibly command line based which could do this same thing.
__________________
Mike Janer
SageTV HD300 Extender X2
Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5
Reply With Quote
  #27  
Old 12-08-2015, 10:02 AM
mikejaner's Avatar
mikejaner mikejaner is offline
Sage Icon
 
Join Date: Oct 2003
Location: Chantilly VA
Posts: 2,087
Send a message via MSN to mikejaner
Quote:
Originally Posted by Narflex View Post
@mikejaner, OK, then the problem is likely due to the cable provider messing up the PTS timestamps when they are doing ad insertion. If the author of that program is able to detect when PTS discontinuities occur...then I can tell them how to send SageTV an event so that it stops/restart the stream at that time which would work around this issue (only downside is it'll have a half second or so gap at that point when it occurs...but that's a much better tradeoff).
I put in a question to the author, so we'll see what he says. Thanks!
__________________
Mike Janer
SageTV HD300 Extender X2
Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5
Reply With Quote
  #28  
Old 12-08-2015, 11:00 AM
cgruelle cgruelle is offline
New Member
 
Join Date: Aug 2015
Location: N. KY
Posts: 3
Quote:
Originally Posted by mikejaner View Post
Cool VideoRedo quick stream fix did it for me too!!
It would be cool for others if there was an open source tool, possibly command line based which could do this same thing.
ProjectX may be what you are looking for.

http://www.doom9.org/index.html?/Dig...-fullguide.htm
Reply With Quote
  #29  
Old 12-08-2015, 12:04 PM
mikejaner's Avatar
mikejaner mikejaner is offline
Sage Icon
 
Join Date: Oct 2003
Location: Chantilly VA
Posts: 2,087
Send a message via MSN to mikejaner
Quote:
Originally Posted by cgruelle View Post
ProjectX may be what you are looking for.

http://www.doom9.org/index.html?/Dig...-fullguide.htm
I am actually testing that right now. Either it's not looking so good, or I don't know how to use it. Tried various settings, but cannot get it to correct the stream properly.
__________________
Mike Janer
SageTV HD300 Extender X2
Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5
Reply With Quote
  #30  
Old 12-09-2015, 11:29 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
I made a new thread for this here:

http://forums.sagetv.com/forums/show...578#post581578

But it seems this is really the same issue. I'm playing around with a Linux SageTV server. I have my Windows recording shares mounted via fstab. When I add them as recording directories on my Linux server the durations are all screwed up. As these files are located on a different physical machine there's no way for me to move things around. What to do?

Personally I would rather be using Linux (particularly one without GUI) as I am now since the OS has far less overhead than Windows. This poses a real problem for other people trying to move from Windows to Linux.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #31  
Old 12-09-2015, 01:09 PM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
You could try shutting SageTV down. Umounting the Windows shares. Starting up SageTV. Shutting down SageTV. Remount the Windows shares. Start up SageTV.

It's basically the same thing.
Reply With Quote
  #32  
Old 12-28-2015, 07:25 AM
lgkent's Avatar
lgkent lgkent is offline
Sage User
 
Join Date: Oct 2008
Posts: 8
bad video duration

I was able to set some break points and do some debugging. It looks like getMediaAVInf0 is getting the duration wrong when importing files larger than 1GB. If I set skip_internal_format_parser=true, ffmpeg gets the duration right, but this causes problems with audio stream detection. My intellij ide does not handle breakpoints thru jni with native code, so I need to figure out best way to debug through jni calls, any advice? I am going to try to setup eclipse to see if it will let me debug java + jni native...

My files are MPEG2-PS recored from HdHomerun tuners. I am running latest code on Ubuntu 14.04 It does not matter if they were recorded on Linux or Windows. Linux has issues detecting duration with MPEG2-PS files larger than 1GB.

Steps to repro:
1. choose a video file larger than 1GB and temporarily move it out of var/media/tv.
2. restart sagetv server so it will detect and remove video from database.
3. restore the video file from step 1.
4. restart sagetv server to re-import video and observe incorrect duration.
Reply With Quote
  #33  
Old 12-28-2015, 06:00 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
I'd say start drilling down through the JNI code and determine which part is doing the duration calculation. That should be done by getting the first and last PTS values in the file and then just doing the difference on them (with wraparound detection since PTS values are a 33 bit field so they roll over sometimes). You probably don't need a debugger so much as just adding some printf statements in the parser code to analyze this.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #34  
Old 01-01-2016, 03:04 PM
lgkent's Avatar
lgkent lgkent is offline
Sage User
 
Join Date: Oct 2008
Posts: 8
I have a provisional fix for the imported video duration issue. It's more of a 64bit include/compile problem with linux rather than a code issue. I am happy to fork and submit. Is there any formal bug tracking or additional process? Meanwhile I am going to give it some run time to see if anything else comes up.

The demuxer was getting nonsense values from lseek64() when getting the file length in DemuxSourceLength() for large video files. I added "#define _LARGEFILE64_SOURCE" in NativeCore.h before any includes and lseek64() returns good values now. I found it easier/faster to create a simple c program that used the .so lib for debugging in this case.

There no doubt needs to be some discussion if anyone has a more elegant solution, or other potential issues. This could fix other latent large file issues.
Reply With Quote
  #35  
Old 01-04-2016, 05:18 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
That sounds like a very likely fix. Just go ahead and submit the patch on GitHub (after signing the Google CLA, read the CONTRIBUTING file for details).
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #36  
Old 01-13-2016, 08:41 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
This fix works well for the MPEG-PS files from my HDHR's. My test Linux system is now picking up the durations correctly when I add my Windows recording shares to be recording folders in Linux. However, my HD-PVR ts files are not getting the correct duration. They are all showing double the actual duration.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #37  
Old 01-13-2016, 05:34 PM
lgkent's Avatar
lgkent lgkent is offline
Sage User
 
Join Date: Oct 2008
Posts: 8
This sounds like another duration issue I had with a few files. It happens with files that have incorrect last modified dates. The easy fix is to 'touch' the video file (to update last modified) and sage will correct the timestamp on import.
Ideally the last modified timestamp should be the meta-data air-date + duration. For some reason I had several files that were 50 minutes off so they imported and played, but appeared to start 50 minutes before the start time and looked like they were twice as long. If the last modified timestamp is completely out of the play window, sage will auto-correct the timestamp on import.
I don't see this as a sage bug, more of a timestamp issue with the original file. If we were to make the auto timestamp correction more sensitive it would cause issues with legitimate recordings that start early or end late.
Reply With Quote
  #38  
Old 01-14-2016, 08:45 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by lgkent View Post
This sounds like another duration issue I had with a few files. It happens with files that have incorrect last modified dates. The easy fix is to 'touch' the video file (to update last modified) and sage will correct the timestamp on import.
Ideally the last modified timestamp should be the meta-data air-date + duration. For some reason I had several files that were 50 minutes off so they imported and played, but appeared to start 50 minutes before the start time and looked like they were twice as long. If the last modified timestamp is completely out of the play window, sage will auto-correct the timestamp on import.
I don't see this as a sage bug, more of a timestamp issue with the original file. If we were to make the auto timestamp correction more sensitive it would cause issues with legitimate recordings that start early or end late.
This appears to be the problem. It appears that SageTV in Windows doesn't always set the modified date/time on the file properly and uses some other method to determine the duration.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #39  
Old 09-16-2016, 08:17 AM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
Quote:
Originally Posted by mikejaner View Post
I put in a question to the author, so we'll see what he says. Thanks!
SageDCT doesn't currently monitor timestamps in files as they are dumped, so that would need to be added for this approach to work.

If you're going to track/mess w/ timestamps, I think it would be a better approach to just ditch the original file's stamps and generate new ones while remuxing.
__________________
babgvant.com | @babgvant | Missing Remote
Reply With Quote
  #40  
Old 11-02-2016, 04:47 AM
zoop's Avatar
zoop zoop is offline
Sage Advanced User
 
Join Date: Jan 2006
Location: Elkridge, MD
Posts: 184
A slightly different but oddly similar problem...

After upgrading to v9 (current release, ubuntu linux 16.04LTS), I have a similar problem with a slightly different manifestation. On imported videos, the duration bar is always 0:00:00 and jumps immediately to "end". The video continues to play, but any attempt at seeking causes the video to restart. This occurs on both HD300s and the placeshifter client (mac). This does not appear to be happening on recorded TV shows. I have tested mkv,m4v, and avi files, the behavior is the same... I haven't checked all of my imported files, but so far there haven't been any that behave properly. Logs are attached below... If I am reading them right, Sage thinks the file is 0:00:00 in duration, but I have no idea why that would be. I have tried the "re-import" function as well, to no avail.

I have been poking around the forums for the same problem, haven't found a thread yet. Any thoughts?

thx much
Attached Files
File Type: txt sagelogs.txt (12.3 KB, 101 views)
__________________

AMD Ryzen 7 1700 w/ SageTV Server Linux V9.1.8.774 - Ubuntu 16.04LTS AMD64
-- 1x HDHomeRun Prime
-- 1x HDHR-DT
-- 1x HD-PVR
2x SageTV HD-300 Media Extenders
1x NVIDIA ShieldTV
Reply With Quote
Reply


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

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
Wrong DVD duration MovieFreak Sage My Movies 14 06-01-2011 12:09 PM
HD200 - cool, but 2 issues - memory & playback issues with hdpvr agover SageTV Media Extender 3 12-16-2008 12:50 PM
VBR MP3 duration miscalculation nielm SageTV Beta Test Software 8 01-18-2007 06:51 PM
stop playback of recording in progress opens program guide Gaurav SageTV Software 2 07-27-2006 09:49 PM
Playback progress bar inconsistant Wheemer SageTV Software 2 01-31-2005 07:11 AM


All times are GMT -6. The time now is 06:40 AM.


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