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
  #1  
Old 05-17-2016, 04:44 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
Fix for recordings with audio only format detected

I just committed a change into GitHub that works around a problem where TV recordings sometimes had their format improperly detected as being audio only.

This should only be relevant to those that were using a network encoder w/ SageTV which was recording from cable directly. I know I encountered this issue on Fios (now Frontier); but not sure if it happens on other providers or not.

If you have this problem...the way to know if this fix helps you is to just run "ffmpeg -i <file>" on one of the problematic recordings, and if FFMPEG says there's a video stream...but SageTV on the Detailed Info page for the recordings does not say there is one...then this fix is for you.

After updating to this fix, to be sure it redetects the format on all your recordings to apply this fix, you also would need to set this property before you startup SageTV: "force_full_content_reindex=true"

This fix will automatically apply to any new recordings created, so you'd only need to do that once.

Here's the checkin comment which explains what it's doing in more detail:

Worked around issue where sometimes TV recordings were detected as audio only

The actual bug here is in the native format detector. However, after analyzing that, it ended up being a corner case where a certain stream type in the TS map (DC-II) was being considered video if it was a TV recording and audio otherwise because both things existed in the wild. Changing that behavior would likely have unintended side effects.

Normally, it worked around this problem because it would get a hint that something was a TV recording and then use that to prefer video when it saw the DC-II marker rather than audio. However, that hint was not being set when you were using a network encoder because then the format detection was being done through a higher level mechanism.

The workaround, which defaults to being on via the property "double_check_audioonly_tv_formats" will redo the format detection with FFMPEG when it sees that only an audio stream was detected in an MPEG file. If FFMPEG also does not detect a video stream, then it will use the originally detected internal format; but if FFMPEG does detect a video stream, then it will return FFMPEG's format instead.

I don't see any potential negative effects from making this change, but please let me know if anything comes up.


Here's an example of it working in action.

1. First it uses the internal format detector, and only finds an audio stream:

Tue 5/17 15:10:43.787 [main@de6f34] File Format Parsed-2b /var/media/tv/AmericanDad-ABoyNamedMichael-52486032-0.ts=MPEG2-TS 0:29:57 640 kbps [#0 Audio[AC3 48000 Hz 6 channels
448 kbps MAIN idx=0 id=1df8 eng]#1 Audio[AC3 48000 Hz 2 channels 192 kbps idx=0 id=1df9 spa]
{EpisodeNumber=2, AiringDuration=1800000, HDTV=true, SeasonNumber=10, Guest Voice
=Jane Krakowski, ForcedUnique=true, Voice=Seth MacFarlane;Wendy Schaal;Rachael MacFarlane;Scott Grimes;Dee Bradley Baker;Jeff Fischer, Title=American Dad, ExternalID=EP716445
0185, AiringTime=1411448400000, Genre=Comedy;Animation, CC=true, ParentalRating=TV14, OriginalAirDate=1410739200000, Stereo=true, SeriesID=185040, ShowcardID=10932944, Descri
ption=Roger moves in with Greg and Terry., EpisodeName=A Boy Named Michael}]

2. It recognizes this and invokes the new workaround:

Tue 5/17 15:10:43.787 [main@de6f34] Using external format detector because we only detected audio on the internal format...

3. Now with FFMPEG, it detects both the audio and the video stream:

Tue 5/17 15:10:43.787 [main@de6f34] Now using external format detector for: /var/media/tv/AmericanDad-ABoyNamedMichael-52486032-0.ts
Tue 5/17 15:10:44.365 [main@de6f34] File Format Parsed /var/media/tv/AmericanDad-ABoyNamedMichael-52486032-0.ts=MPEG2-TS 0:29:58 11040 kbps [#0 Video[MPEG2-Video 29.97 fps 1920x1080 16:9 18000 kbps interlaced id=1df7]#1 Audio[AC3 48000 Hz 6 channels 448 kbps idx=1 id=1df8 eng]#2 Audio[AC3 48000 Hz 2 channels 192 kbps idx=2 id=1df9 spa]{EpisodeNumber=2, AiringDuration=1800000, HDTV=true, SeasonNumber=10, Guest Voice=Jane Krakowski, ForcedUnique=true, Voice=Seth MacFarlane;Wendy Schaal;Rachael MacFarlane;Scott Grimes;Dee Bradley Baker;Jeff Fischer, Title=American Dad, ExternalID=EP7164450185, AiringTime=1411448400000, Genre=Comedy;Animation, CC=true, ParentalRating=TV14, OriginalAirDate=1410739200000, Language=eng, Stereo=true, SeriesID=185040, ShowcardID=10932944, Description=Roger moves in with Greg and Terry., EpisodeName=A Boy Named Michael}]
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #2  
Old 05-17-2016, 08:43 PM
egeller egeller is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Drexel Hill, PA
Posts: 334
Let me be the first to say thank you. This will probably decommission a rube goldberg of a work-around I have used to deal with the issue.
__________________
Server:UnRaid;2x Intel Xeon E5; SuperMicro moboard;Also:BM3000 w/ WMC; 2x Ceton ETH 6; OpenDCT
SageTV Extender:3x HD200 1x HD300 1xFireTV
Sage TV: 9.2 on Java 11, Standard STVi, Comskip Playback, Web Interface, 24 Hour Clock, SRE, Playon
All in lovely Drexel Hill, PA
Reply With Quote
  #3  
Old 05-18-2016, 04:53 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Yes, thank you. This is an annoying issue, even for those of us still using V7.
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
What format to archive recordings in? wildgoose SageTV Software 9 12-26-2011 08:27 PM
Feature Request: Re-schedule 'halt detected' recordings Mark SS SageTV Beta Test Software 4 03-14-2011 06:24 PM
Tv recordings format nissse Batch Metadata Tools 8 11-20-2010 05:08 AM
HD Recordings in Proprietary Format? jkohn SageTV Software 10 10-11-2006 09:19 PM
what format are sage recordings aoehlke General Discussion 2 05-12-2005 02:06 PM


All times are GMT -6. The time now is 05:50 PM.


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