Assembla home | Assembla project page
 

Automatic Aspect ratio Switcher

Often you have video sources that use a variety of aspect ratios:

  • 4x3 shows
  • 16x9 shows letterboxed (with top/bottom black bars)
  • 16x9 anamorphic shows (vertically stretched with no black bars) labelled as 4x3 (usually encoded from a STB)
  • 16x9 anamorphic shows labelled with a 16x9 AR (usually DVD's, or Digital TV captures)
  • 4x3 non-square pixel AVIs (eg 720x480)
  • 16x9 non-square pixel AVIs (eg 720x480)

In Sage this often means switching aspect ratio depending on which channel/source the show was recorded from, with each aspect ratio set up to resize the video to the correct proportions.

See AspectRatios for more discussions of how to set up Sage to handle various aspect ratios...

This plugin allows these Aspect Ratio settings to be stored per:

  • show title
  • channel
  • capture device

or any combination of these, so that when the show is played back, the aspect ratio is switched automatically

http://sageplugins.sourceforge.net/nielm_modules/autoaspect/autoaspect1.jpg

The aspect ratio is chosen on a 'best match' basis, which means that the following priorities are used to find a matching automatic aspect ratio

  1. title/channel/capture device
  2. title/channel
  3. title/capture device
  4. title
  5. channel/capture device
  6. channel
  7. capture device

When a show playback is started, a small popup will be displayed showing the aspect ratio selected and the reason why. This popup can be disabled in the configuration page.

Installation

  • Download the STV and Java zip file, and unpack the contents into your SageTV directory ( normally C:\Program Files\SageTV\SageTV) taking care that the file paths are preserved.
    This will create !STVs/SageTV3/autoaspect_import.stvi, JARs/nielm_sageutils.jar and JARs/nielm_autoaspect.jar
  • Restart SageTV (or SageTV Client)

== Customisation = =

Customisation can be performed in several ways...

New Automatic aspect ratios can be added while viewing a TV show:

  • press Options/ESC/Right-click, or press Select/Enter twice to bring up the playback options menu
  • Select the Aspect ratio mode... - The new Aspect Ratio mode dialog is shown.

http://sageplugins.sourceforge.net/nielm_modules/autoaspect/autoaspect3.jpg

  • Select the required aspect ratio for this show.
  • Select 'Add automatic aspect ratio for..."
  • now you prompted whether this automatic aspect ratio is for:
    shows with this title
    shows on this channel
    shows on this capture device
    or any combination of these.
  • the same Aspect Ratio Mode options dialog allows you do enable/disable the automatic aspect ratio function, and access the detauled configuration page.

New Automatic Aspect rations for channels and capture devices can also be added from the detailed configuration page.

http://sageplugins.sourceforge.net/nielm_modules/autoaspect/autoaspect2.jpg

This menu page can be accessed from:

  • Detailed Setup / Customise / Automatic Aspect Ratio Settings
  • Playback options menu / Aspect Ratio Mode / Modify Automatic AR settings
  • or if using the dynamic menus plugin, add a new menu page 'Auto Aspect Settings by Nielm'

The existing automatic aspect ratios can also be modified and deleted from this page, as can the automatic aspect ratios for imported videos, and whether to display the debug popup when the AR is auto-set

Note that the automatic Aspect ratios are displayed in priority order.

Advanced Customisation

The actual selecting and switching of automatic aspect ratios is performed by a Java class defined by the properties item: nielm/autoaspect/handler, which needs to implement the net.sf.sageplugins.autoaspect.Handler interface.

This class can be customised to add advanced rules if required. The net.sf.sageplugins.autoaspect.DefaultHandler class can be used as a base to add behaviour.

Stored configuration

The following properties file settings are used:

nielm/autoaspect/DVD=Source
nielm/autoaspect/ImportedVideo=Source
nielm/autoaspect/NonMpgTvFilesAr=Source
nielm/autoaspect/customARfile=custom_aspect_ratios.dat
nielm/autoaspect/debug_ar_setting=true
nielm/autoaspect/debug_ar_timeout=3000
nielm/autoaspect/defaultTV=Source
nielm/autoaspect/handleNonMpegTvFiles=false
nielm/autoaspect/handler=net.sf.sageplugins.autoaspect.DefaultHandler

The automatic aspect ratios are stored in the file:
custom_aspect_ratios.dat
in the SageTV program directory (unless overridden by the properties file setting).

The autoaspect plugin does not support simultaneous access from multiple clients running in the same directory -- each will overwrite the other's settings if an AR mode is modified.


History

v 1.3 - 9/Oct/2007 for SageTV 6 * (STV update only) Converted to XML-STV, set default for non-MPG TV files to be same as MPG

v 1.2 - 15/Nov/2005 for SageTV 4 * (Java update only) Fixed bug where title-only Auto AR modes were not matched

v 1.1 - 15/Nov/2005 for SageTV 4


Licence

This Plugin is licenced under the BSD licence, which basically means that you can do what you like with it, so long as you give me credit, you get no warantee/guarantee of fitness for purpose, and cannot blame me if things go wrong!

All source code can be found in CVS at Sourceforge "Don't try to outweird me, three-eyes. I get stranger things than you free with my breakfast cereal." - Zaphod Beeblebrox in "Hithiker's Guide to the Galaxy" http://compraviagra.blog.espresso.repubblica.it/compra_viagra_e_cialis/

Cialis generic

cialis informazioni viagra generico italia acquista propecia http://buycialis.cc/it/item/generic_propecia.html http://microsoftontheissues.com/cs/members/Buy-Tramadol-Online.aspx http://community.tasteofhome.com/members/BuyCialis/default.aspx http://buycialisonline.tv/product.php?prod=butalbital http://www.spreadfirefox.com/user/269138?buy-cialis sNhSQCT viagra e cialis buy fioricet Cialis 0csznBN online tramadol

I'd probably settle for a vampire if he were romantic enough.

Couldn't be any worse than some of the relationships I've had.

-- Brenda Starr

canadian buy cialis order viagra http://www.maclife.com/user/buy_cialis_com http://microsoftontheissues.com/cs/members/BuyViagra.aspx brand levitra tramadol sVhDyFV http://us.cyworld.com/buylevitra1 http://community.icontact.com/users/buy-tramadol fioricet online prescription vendita viagra di marca http://community.icontact.com/users/buyfioricet http://forum.teamplay.it/index.php?automodule=blog&blogid=45&compra-viagra-online-cialis# "They misunderestimated me."

George W. Bush November 6, 2000 Comment made in Bentonville, Arkansas. ordering Cialis buy viagra http://community.post-gazette.com/members/BuyCialis/default.aspx http://buyviagraonline.gather.com/ brand levitra buy cheap tramadol online xc12zO8 http://buylevitra.gather.com/ http://www.aboutus.org/RelievePain.org order fioricet for headache viagra cialis http://community.post-gazette.com/members/Buy-Fioricet-Online/default.aspx http://www.megadirectory.it/SHOPPING/Compra-Viagra-Italia-Acquista-Viagra-Originale-e-Generico-Online-Spedizione-Gratuita-l1511.html