|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
How to get DVD content length
I'm working on an issue where I can't seem to be able to pull the DVD length from the API. I was hoping someone here can provide some assistance.
Both sagex.api.MediaFileAPI.GetFileDuration(MediaFile) and sagex.api.AiringAPI.GetAiringDuration(MediaFile) return 1 for DVD's. I'm looking to get the milliseconds for the entire DVD that is being watched. Well I guess only for the main movie. Do I need to do other things with the Title and Chapter or is it just a different API that I need to hit? Thanks in advance!
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII), Clients - 2 x HD-300, 3 x MediaMVP |
#2
|
||||
|
||||
Getting a reliable length (or end time) from all possible formats is a pain... If the ones you tried fail, have a fall back using the (EndTimeAiring - StartTimeAiring)/rescaling, that should do it.
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2 TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad |
#3
|
|||
|
|||
Quote:
Thanks again!
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII), Clients - 2 x HD-300, 3 x MediaMVP |
#4
|
||||
|
||||
For the airing time: "The time is in Java time units, which are milliseconds since Jan 1, 1970 GMT "
So you would have to divide the difference by a rescaling factor of 1000 to get it back in seconds. Actually, I think they're not really using milliseconds, but an even smaller unit, but you should be able to figure it out easily with a real DVD.
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2 TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad |
#5
|
|||
|
|||
Ah, makes sense. Thanks!
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII), Clients - 2 x HD-300, 3 x MediaMVP |
#6
|
|||
|
|||
Looks like the same issue:
DVD End Time = 1303702442541 and DVD Start Time = 1303702442540 The difference is 1 millisecond. This is the same response as the duration call. Any other ideas? Thanks
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII), Clients - 2 x HD-300, 3 x MediaMVP |
#7
|
|||
|
|||
So I tried pulling the DVD end time and the DVD start time. The difference is 1 millisecond.
DVD End Time = 1303702442541 and DVD Start Time = 1303702442540 I'm keep working on it, but it doesn't seem promising. * merged *
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII), Clients - 2 x HD-300, 3 x MediaMVP |
#8
|
||||
|
||||
Try the airing.GetShow(), and see if the getShowDuration and/or air time are as useless...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2 TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad |
#9
|
|||
|
|||
Same info. I think the MediaPlayerAPI will give me the info so I'm trying that one now.
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII), Clients - 2 x HD-300, 3 x MediaMVP |
#10
|
|||
|
|||
Nope, no luck How/Why is it so hard to pull DVD duration?
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII), Clients - 2 x HD-300, 3 x MediaMVP |
#11
|
||||
|
||||
Quote:
__________________
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. |
#12
|
||||
|
||||
Quote:
One thing I was going to try: The way the API works now is to start playing the DVD and then immediately try to seek to the saved Title and Chapter. IIRC this was failing. I was thinking this may be failing because I'm trying to seek too soon and the MediaPlayer has not fully loaded the DVD. What I was going to try was putting a delay before the seeks to give the MediaPlayer time to do it's thing. If you can get that to work you still will not be at the exact playback position, but at least you'll be at the nearest chapter within the title.
__________________
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. |
#13
|
||||
|
||||
Because DVDs don't have a duration, they're made up of menus and a series of video clips that run on indefinite repeat, so there's no easy way to determine the duration of a DVD.
|
#14
|
|||
|
|||
Quote:
|
#15
|
||||
|
||||
SageTV does not report DVD duration unless it was included in its metadata (properties file). For an example of determining if the duration info is valid, look at the code around widget ID "OPUS4A-178354".
For the DVD duration shown on the OSD's timebar during playback, check the code below widget ID "BASE-52545". - 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. |
#16
|
|||
|
|||
Quote:
Quote:
Thanks
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII), Clients - 2 x HD-300, 3 x MediaMVP |
#17
|
||||
|
||||
Quote:
- 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. |
#18
|
||||
|
||||
That's probably a better idea.
__________________
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. |
#19
|
|||
|
|||
Kind of a novice here. Would this be a good way to go about waiting for the media player to be fully loaded?
Code:
if (eventName.startsWith("PlaybackStarted")) { if (sagex.api.MediaFileAPI.IsDVD(MediaFile)) { Log.getInstance().write(Log.LOGLEVEL_TRACE, "sageEvent: DVDPlaybackStarted"); while (!sagex.api.MediaPlayerAPI.IsMediaPlayerFullyLoaded()) { Log.getInstance().write(Log.LOGLEVEL_TRACE, "sageEvent: DVDPlaybackStarted: Waiting for DVD to load"); } } } Thanks in advanced!
__________________
Server - Windows Home Server: Sage 7.1.9 HVR-2250 and HD Homerun Dual Tuner, Intel Core2Duo 2.4GHz, RAM 4 GB, HD OS/Movies/Music/Pictures:500GB (SATAII) TV:1TB (SATAII), Clients - 2 x HD-300, 3 x MediaMVP |
#20
|
|||
|
|||
Quote:
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Video Length | ddaggett1 | SageTV Beta Test Software | 6 | 03-01-2011 12:54 PM |
Buffer Max Length and Duration? | ktuimala | SageTV Software | 2 | 07-23-2009 10:48 PM |
Favorites by length of show? | wayner | SageTV Software | 1 | 01-12-2009 02:47 AM |
Ethernet Cable length | viperdiablo | SageTV Media Extender | 10 | 06-13-2008 12:21 AM |
HAVA content - 16:9 content is letter and pillar boxed by sage | dwalton22 | SageTV Software | 14 | 10-16-2007 08:57 AM |