SageTV Community  

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

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-27-2011, 04:14 PM
Nutball Nutball is offline
Sage User
 
Join Date: Mar 2008
Posts: 36
Preferred Audio Track Format

Hey all,

I am looking for a little advise to point me in the right direction.

Basically I am planning to write a small plugin that will automatically select a particular audio format when a video is played. For example, when I play a ripped blu-ray/HD-DVD movie on the extender located in the family room, I would like Sage to select the best format possible (DTS-MA for example) since my receiver can decode all the formats. However, when playing the same movie on the extender in the bedroom, I would like Sage to select AC3 track otherwise there will be no audio.

My problem is that my wife gets ticked off when she tries to play a movie in the bedroom and gets silence. She has no desire to learn anything but the basics in Sage so everything needs to be automatic.

So...
I have been digging through the Studio manual and the API lists and it seems that DVDAudioChange when combined with GetDVDAvailableLanguages() may work.

First of all, do these functions only work with DVD formatted video or will they work with Blu-ray structures, .TS, .M2Ts, etc.. Is there a better function to call?

Second, I figure that I need listener to identify when a movie is started. Will a simple play listener work or is there something I am not thinking about?

Thanks for any help. I have only completed a few simple UI mods using studio in the past so I am a definite novice. Any guidance is most appreciated.

-Nutball
Reply With Quote
  #2  
Old 05-28-2011, 06:23 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
I haven't messed ith audio API but those look right. I would take a look at the options menu to change audio and see how it is done.

As for listener I would put it in the beforemenuload hook it should work there if not in the after menuloadhook.

If it were me I would put a options menu at the start of the film that says select audio track. That way you don't have overcomplicated formulas that could get it wrong if none of the formats get it right.

Or you could get a hd300 and it can convert dts tracks to 2.0 and you never have to worry about it!! That alone was my reason for upgrading my hd200's.
Reply With Quote
  #3  
Old 05-28-2011, 07:27 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by PLUCKYHD View Post
I haven't messed ith audio API but those look right. I would take a look at the options menu to change audio and see how it is done.
came here to say that... fire up studio while in the Mediaplayer OSD (or whatever it is called when a video is playing) menu with the options menu open for changing the audio and then see how its done...

Quote:
As for listener I would put it in the beforemenuload hook it should work there if not in the after menuloadhook.
man we must be thinking alike today came here to say that too both beforemenuload and aftermenuload are processed before video playback is started but if you do it at the end it will be after the mediafile is passed to the menu so you can do your processing there

Quote:
If it were me I would put a options menu at the start of the film that says select audio track. That way you don't have overcomplicated formulas that could get it wrong if none of the formats get it right.
well thats really easy to do... just put some code that when playback is starting to link to the options menu for audio change... if it were me id have some code to try to pick the right audio track and then only put up the options menu if the autopicking code failed... id also do the picking and parsing code in java (not studio)
Quote:
Or you could get a hd300 and it can convert dts tracks to 2.0 and you never have to worry about it!! That alone was my reason for upgrading my hd200's.
or that sounds easier to me ... we must really be thinking alike today
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #4  
Old 05-28-2011, 10:43 AM
Nutball Nutball is offline
Sage User
 
Join Date: Mar 2008
Posts: 36
Thank you both,

I will take your suggestions and pop up a simple options menu asking for a desired audio track as that seems within my limited skill set. If that goes well, I will attempt to incorporate some simple logic to preselect a particular preferred audio track. The formula should be fairly simple since I only use a few formats.

If I am not mistaken, the automatic down conversion that the HD-300 can do only applies to DTS tracks. I have many movies where the HD track is encoded in Dolby True-HD so I figured that feature would only be of limited help. I do actually have a HD-300 but it is the one extender that runs through a receiver so I haven't used the auto-conversion process much. Unfortunately my other two extenders are older models (HD-200 and HD-100). I will upgrade them eventually, but I am dragging my feet a bit until I sort a few minor issues out (java heap and music playback).

Thanks,
Nutball
Reply With Quote
  #5  
Old 05-28-2011, 10:45 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by PLUCKYHD View Post
As for listener I would put it in the beforemenuload hook it should work there if not in the after menuloadhook.
What he wants to do has nothing to do with menus being loaded. He wants to trigger it when playback starts (regardless of which menu is displayed), and there's a perfectly good MediaPlayerFileLoadComplete hook for that.
__________________
-- Greg
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
Placeshifter and audio track selection scanner95 SageTV Placeshifter 0 10-28-2010 05:07 AM
Way to choose which audio track to play? bits SageTV Media Extender 3 09-30-2010 07:47 AM
Wrong audio track streamed Nikki SageTV Placeshifter 2 05-24-2009 10:52 AM
DVB-T wrong audio track moamoa SageTV Beta Test Software 3 01-03-2007 02:09 PM
Change ac3 audio track... ikarus79m SageTV Software 3 11-19-2006 04:23 PM


All times are GMT -6. The time now is 12:57 PM.


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