SageTV Community  

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

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-16-2011, 06:36 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Coming Soon: ActiveAspectRatios

I'm going to do something a little different this time. Before posting the latest plugin I'm working on I thought I'd tell you what I was up to so I can get yor feedback and add any features I didn't think of.

My cable company letterboxes many SD shows which I like because by switching the aspect ratio to "ZoomC" on my HD300 they fill the entire screen. What I don't like is having to manually press the "Aspect" key each time I start watching a show.

It turns out that comskip can produce aspect ratio information about recordings that it processes much in the same way as it produces information about where the commercials are located. (Thank you Erik.) I'm working on a plugin that reads the aspect information produced by comskip and then dynamically changes the aspect ratio on the Sage UI. Since everybody will have their own ideas about what aspect ratio (Source, Fill, Stretch, ZoomA, ZoomB, ZoomC, etc .....) to use, users create mappings to specify what Sage AR mode to use for the aspect ratios comskip detects. For example, on my system I know that if comskip detects an aspect ratio of 1.98 this is a letterboxed show and I have that mapped to "ZoomC".

To create these mappings the user brings up a dialog (while browsing recordings) that shows what aspect ratios comskip has detected for that show and then chooses what Sage AR to use for that aspect ratio. These mappings are consistent between shows so if I map 1.98 to "ZoomC" on one show, it carries that over to all shows (so there is no need to remap each and every show.)

In order to figure out where in the show the various aspect ratios are located I've done two things:

- In the mapping dialog I show how much time is spent in each aspect ratio. So if I see that the show is 30 minutes long and 23 minutes are in aspect ratio 1.98 and 7 minutes in other aspect ratios, I'm pretty sure the main show is 1.98 and the other aspect ratios are commercials.

- If you bring up the OSD the aspect ratio detected by comskip is displayed next to the "current time" in the timeline.

There is an option to choose the default AR mode to use if no mapping exist.

There is an option to disable automatic switching on specific channels.

There is an option to disable automatic switching on specific shows.

There is an option to disable automatic switching while a recording is playing.

There is no option to always use a specific aspect ratio for a specific show or a specific channel. I've thought about adding this but I'm not sure if it's needed or not.

Since comskip sometimes finds slight variations in the aspect ratio there is an advanced option to select a "tolerance range". For example, sometimes comskip reports an aspect ratio of 1.98 and sometimes it reports 1.92. I want these both mapped to ZoomC so I set a tolerance of 5% which will then map every aspect ratio within 5% of 1.98 to the same Sage AR (ZoomC in my case).

Feedback welcome.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.

Last edited by tmiranda; 05-16-2011 at 06:39 AM.
Reply With Quote
  #2  
Old 05-16-2011, 06:46 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
I am sure some might like this. For me personally I don't ever like or want to watch anything stretched I prefer the OAR. Stretch just looks wrong in all aspects to me. Plus you get allot of chanels already stretching some shows which is unavoidable.
Reply With Quote
  #3  
Old 05-16-2011, 07:26 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by PLUCKYHD View Post
I am sure some might like this. For me personally I don't ever like or want to watch anything stretched I prefer the OAR. Stretch just looks wrong in all aspects to me. Plus you get allot of chanels already stretching some shows which is unavoidable.
I don't like anything stretched either. ZoomC works perfectly for letterboxed SD on an HD screen because it fills up the screen while preserving the aspect ratio.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #4  
Old 05-16-2011, 07:58 AM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Quote:
Originally Posted by tmiranda View Post
I don't like anything stretched either. ZoomC works perfectly for letterboxed SD on an HD screen because it fills up the screen while preserving the aspect ratio.
I'm guessing you are referring to sd content that if it had not letterboxing would be 16:9 (1.85:1)? Or maybe even 2.35:1? In other words it would be stretching vertically as well as horizontally keeping the original ratio, but filling up the screen.

Am I right?
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #5  
Old 05-16-2011, 08:13 AM
jbrandon's Avatar
jbrandon jbrandon is offline
Sage Advanced User
 
Join Date: Oct 2009
Location: Gladstone, MO
Posts: 153
I’m currently using the Automatic Aspect Ratio Mode Switcher bynielm and JREkiwi and it works most of the time but your plans sounds better because of how it will receive the information from the current broadcast via comskip.

I do believe it should be “invisible” (of at least an option) when switching due to the SO factor…

Question though – if I have comskip not running on a couple channels (PBS, TCM) can you default to the Zoom C setting? Actually PBS is not a problem because I receive it QAM in HD.

If you need testers please call on me…

Jim
Reply With Quote
  #6  
Old 05-16-2011, 10:59 AM
Spectrum Spectrum is offline
Sage Expert
 
Join Date: Aug 2006
Posts: 720
Would the plugin launch its own comskip instance or is the AR info dropped in the text files I have comskip not creating?
Reply With Quote
  #7  
Old 05-16-2011, 11:01 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by panteragstk View Post
I'm guessing you are referring to sd content that if it had not letterboxing would be 16:9 (1.85:1)? Or maybe even 2.35:1? In other words it would be stretching vertically as well as horizontally keeping the original ratio, but filling up the screen.

Am I right?
Yes. If you look at the show on a 4x3 SD set it would have black bars at the top and bottom. The same show viewed on a 16x9 HD set would have black bars on all sides. Using ZoomC on a HD set enlarges the show proportionally so it fills the entire screen without distorting the image.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #8  
Old 05-16-2011, 11:05 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by jbrandon View Post
I’m currently using the Automatic Aspect Ratio Mode Switcher bynielm and JREkiwi and it works most of the time but your plans sounds better because of how it will receive the information from the current broadcast via comskip.

I do believe it should be “invisible” (of at least an option) when switching due to the SO factor…

Question though – if I have comskip not running on a couple channels (PBS, TCM) can you default to the Zoom C setting? Actually PBS is not a problem because I receive it QAM in HD.

If you need testers please call on me…

Jim
JREkiwi's aspect mode switcher works great if all content on specific channels have a known aspect ratio. My problem is that the channels I get broadcast shows in different formats.

I'll look into adding the option to always use a specific AR mode on specific channels, that's not hard to do.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #9  
Old 05-16-2011, 11:11 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by Spectrum View Post
Would the plugin launch its own comskip instance or is the AR info dropped in the text files I have comskip not creating?
No, it will be up to you to run comskip using SJQ, CommercialDetector, comskipmonitor, etc.

If you want to start generating the aspect ratio information add the following to your comskip.ini (or edit if the lines are already in there):

verbose=10
output_aspect=1

(If that doesn't work use output_aspects=1)

You will then see files produced with the extension ".aspects". Don't forget to add this extension to your "cleanup list".

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #10  
Old 05-16-2011, 01:26 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
This is a great idea - I would find it useful.

Sorry to hijack your thread but a question on a related topic -

I have always thought that it would be useful to use Comskip for a somewhat similar purpose - determining whether our cable box is powered off. Any ideas on what to look for in the comskip output that would tell you whether you had a proper recording or whether you have a file of "black screen" caused by a powered off STB?

(The reason for this is that I would like to create a routine to make a short recording - run it through comskip to check to see whether your box is alive or not. If the box is not alive then I would send the IR command to turn the box on. My SD cable box is an SA3200 and unlike SA's HD boxes it cannot be set to turn on with a channel change. And as far as I have been able to determine there is no discrete Power On command, just a Power Toggle)
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #11  
Old 05-16-2011, 01:52 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by wayner View Post
This is a great idea - I would find it useful.

Sorry to hijack your thread but a question on a related topic -

I have always thought that it would be useful to use Comskip for a somewhat similar purpose - determining whether our cable box is powered off. Any ideas on what to look for in the comskip output that would tell you whether you had a proper recording or whether you have a file of "black screen" caused by a powered off STB?

(The reason for this is that I would like to create a routine to make a short recording - run it through comskip to check to see whether your box is alive or not. If the box is not alive then I would send the IR command to turn the box on. My SD cable box is an SA3200 and unlike SA's HD boxes it cannot be set to turn on with a channel change. And as far as I have been able to determine there is no discrete Power On command, just a Power Toggle)
What I've noticed is that if a recording is all static, or black, is that the .edl file will have very few "commercials" (0 or maybe 1) and that the .aspects file will only contain a single line. I don't think this is good enough to say the box is powered off because other good recordings will also have very few commercials and one aspect ratio.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #12  
Old 05-16-2011, 11:22 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Quote:
Originally Posted by tmiranda View Post
JREkiwi's aspect mode switcher works great if all content on specific channels have a known aspect ratio. My problem is that the channels I get broadcast shows in different formats.
FYI. You can set a specific aspect ratio on a per show basis too. Also by tuner, channel, or a combination of all of them, so you can have different ARs set for the same show on different channels.

John

Last edited by JREkiwi; 05-16-2011 at 11:24 PM.
Reply With Quote
  #13  
Old 05-17-2011, 05:36 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by JREkiwi View Post
FYI. You can set a specific aspect ratio on a per show basis too. Also by tuner, channel, or a combination of all of them, so you can have different ARs set for the same show on different channels.

John
Thanks John. I didn't know that

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #14  
Old 05-17-2011, 08:14 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Tom

What aspect would it pickup in a case like this... it is a SD show with black bars at the top and bottom?... I usually use the zoom to get rid of the black bars.

Code:
0:00:00.03  720x 480 1.51 minX=   1, minY=   1, maxX= 720, maxY= 480
0:00:40.14  720x 480 0.00 minX=   1, minY=  58, maxX= 720, maxY= 414
0:00:43.41  720x 480 2.02 minX=   1, minY=  58, maxX= 720, maxY= 414
0:04:56.86  720x 480 1.51 minX=   1, minY=   1, maxX= 720, maxY= 480
0:05:34.63  720x 480 2.26 minX=  42, minY=  98, maxX= 674, maxY= 378
0:05:42.30  720x 480 2.02 minX=   1, minY=  58, maxX= 720, maxY= 414
0:13:58.90  720x 480 1.84 minX=   1, minY=  46, maxX= 720, maxY= 438
0:14:30.73  720x 480 2.02 minX=   1, minY=  58, maxX= 720, maxY= 414
0:35:43.10  720x 480 2.61 minX=   1, minY= 102, maxX= 720, maxY= 378
0:36:13.07  720x 480 1.51 minX=   1, minY=   1, maxX= 720, maxY= 480
0:36:28.08  720x 480 2.02 minX=   1, minY=  58, maxX= 720, maxY= 414
0:37:13.06  720x 480 1.51 minX=   1, minY=   1, maxX= 720, maxY= 480
0:37:58.57  720x 480 2.02 minX=   1, minY=  54, maxX= 720, maxY= 414
0:56:28.15  720x 480 1.51 minX=   1, minY=   1, maxX= 720, maxY= 480
0:56:58.14  720x 480 2.02 minX=   1, minY=  58, maxX= 720, maxY= 414
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #15  
Old 05-17-2011, 08:58 AM
mkanet's Avatar
mkanet mkanet is offline
SageTVaholic
 
Join Date: Feb 2004
Posts: 3,359
This may be exactly what I've been looking for. I have only 2, very DVB-S based channels that show all their content in a letterboxed 16:9 screen. I tried the current aspect ratio switcher plugin, but had a few problems with it:

1. I coulnt use ZoomC setting on my PC based client (which is exactly/only AR correction I need).
2. IIRC, for channels that didnt need AR correction (basically almost all my channels/tuners), there was this clunky feel when tuning into the channels; making it obvious the AR correction plugin was checking to see whether it needed to correct AR... which they didn't. It would be great for all non AR-corrected channels to tune in/display video as if there wasn't an AR correction plugin at all. Basically, the problem was the plugin itself (when correcting AR) was very clunky-feeling. It would be amazing if there was a plugin that did this completely invisibly with no noticable performance degredation when video is first displayed; as if that's the way they were broadcasted originally.

-MKANET

Quote:
Originally Posted by tmiranda View Post
I don't like anything stretched either. ZoomC works perfectly for letterboxed SD on an HD screen because it fills up the screen while preserving the aspect ratio.
__________________
Upgraded to Comcast X1 + Netflix/Amazon Video streaming

***RIP SageTV***
Reply With Quote
  #16  
Old 05-17-2011, 04:05 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by nyplayer View Post
Tom

What aspect would it pickup in a case like this... it is a SD show with black bars at the top and bottom?... I usually use the zoom to get rid of the black bars.

Code:
0:00:00.03  720x 480 1.51 minX=   1, minY=   1, maxX= 720, maxY= 480
0:00:40.14  720x 480 0.00 minX=   1, minY=  58, maxX= 720, maxY= 414
0:00:43.41  720x 480 2.02 minX=   1, minY=  58, maxX= 720, maxY= 414
0:04:56.86  720x 480 1.51 minX=   1, minY=   1, maxX= 720, maxY= 480
0:05:34.63  720x 480 2.26 minX=  42, minY=  98, maxX= 674, maxY= 378
0:05:42.30  720x 480 2.02 minX=   1, minY=  58, maxX= 720, maxY= 414
0:13:58.90  720x 480 1.84 minX=   1, minY=  46, maxX= 720, maxY= 438
0:14:30.73  720x 480 2.02 minX=   1, minY=  58, maxX= 720, maxY= 414
0:35:43.10  720x 480 2.61 minX=   1, minY= 102, maxX= 720, maxY= 378
0:36:13.07  720x 480 1.51 minX=   1, minY=   1, maxX= 720, maxY= 480
0:36:28.08  720x 480 2.02 minX=   1, minY=  58, maxX= 720, maxY= 414
0:37:13.06  720x 480 1.51 minX=   1, minY=   1, maxX= 720, maxY= 480
0:37:58.57  720x 480 2.02 minX=   1, minY=  54, maxX= 720, maxY= 414
0:56:28.15  720x 480 1.51 minX=   1, minY=   1, maxX= 720, maxY= 480
0:56:58.14  720x 480 2.02 minX=   1, minY=  58, maxX= 720, maxY= 414
It looks like a letterboxed show. The numbers in the left column are the timestame. The next information is the native resolution (720x480). After that comes the detected aspect ratio (1.51 is 4x3, close to 2.0 is 16x9).

For this you'd "map" 1.51 to Source and 2.0 to ZoomC.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #17  
Old 05-17-2011, 04:25 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Forum Beta

Here is the first draft. It works on my test machine and my production machine, but the real world doesn't always work like my world.

I'm working on the wiki but here is the quick and dirty guide:

Edit comskip.exe and add the lines:

Code:
verbose=10
output_aspect=1
It's also probably a good idea to make sure that whatever you are using to launch comskip.exe is set to delete .log and .aspects files.

Download the attached manifest and put it in the Sage install directory on your server.

Go to the plugin manager, UI Mods, and look for ActiveAspectRatios. Install it.

There are several ways to bring up the options that are needed to configure the plugin:

- From Setup->ActiveAspectRatios
- From the recordings browser. Bring up the options for any recording and in the advanced options (right panel) you will see ActiveAspectRatios.
- Press the "Aspect" key when a recording is playing.

I suggest you start by using the second method. Recordings that have a corresponding .aspects file will be denoted by a blue icon that looks like a "screen" with a crossways bar.

Bring up the dialog and the second choice down is "Show Aspect Ratio Mappings for This Show". That dialog allows you to map ratios detected by comskip to Aspect Ratios that you have defined in SageTV. Hopefully the other options are pretty obvious.

If you are watching SD on a HD screen:
- 1.51 corresponds to a standard 720x480 broadcast. You probably want to leave the mapping to "No Set" or set it to "Source".
- 1.98 (or close, like the 2.02 in nyplayer's posted file) is letterboxed and you probably want to map that to ZoomC.

Post questions here.

Tom

Edit: Wrong file posted. See next post for the correct one.
Attached Files
File Type: zip ActiveAspectRatios.zip (17.5 KB, 152 views)
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.

Last edited by tmiranda; 05-17-2011 at 06:06 PM.
Reply With Quote
  #18  
Old 05-17-2011, 05:30 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Tom is that a manifest or a JAR. I guess I am used to an xml manifest?
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #19  
Old 05-17-2011, 06:05 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by nyplayer View Post
Tom is that a manifest or a JAR. I guess I am used to an xml manifest?
DOH. I posted the wrong file. Here is the correct one.

That's what happesn when you are trying to help kids with homework, get something to eat, and post a plugin manifest all at the same time....
Attached Files
File Type: zip SageTVPluginsDev.zip (643 Bytes, 146 views)
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #20  
Old 05-17-2011, 07:57 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by tmiranda View Post
It looks like a letterboxed show. The numbers in the left column are the timestame. The next information is the native resolution (720x480). After that comes the detected aspect ratio (1.51 is 4x3, close to 2.0 is 16x9).

For this you'd "map" 1.51 to Source and 2.0 to ZoomC.
I guess my brain is slow today but wht do you mean by "For this you'd "map" 1.51 to Source and 2.0 to ZoomC"
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
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
New Features Coming Soon...... PLUCKYHD Sage My Movies 25 08-23-2010 10:40 AM
Ion coming soon... Polypro General Discussion 5 04-09-2009 01:30 PM
Coming from BTV SageGk SageTV Software 2 03-30-2008 01:05 PM
SageTVTips.com coming soon! jbarr General Discussion 4 09-13-2006 06:19 PM


All times are GMT -6. The time now is 01:28 PM.


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