SnapStream Forums

Go Back   SnapStream Forums > SnapStream Developer Network > Beyond TV Downloads
Register FAQ Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #31  
Old 08-24-2009, 12:15 PM
queler queler is offline
Member
 
Join Date: Oct 2005
Posts: 41
Re: [addon] BTV Command Line Tools

Quote:
Originally Posted by Kilrsat View Post
"Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)."
So that sounds like it's FILETIME. I'm a little unclear how to get it into that struct defined there, to use any tools to manipulate it. I tried using these tools here but I wasn't able to either get or set any filetime's that made sense. For example, I was able to see what a particular time field was with btvshowinfo, but converting that into a filetime didn't get me the value that was in the xml file.

I really just want to be able to set the sortabletime field with the command line tools, is there a way to read or write these XML files with date/time values other than the jumble of integers?
Reply With Quote
  #32  
Old 08-24-2009, 08:29 PM
queler queler is offline
Member
 
Join Date: Oct 2005
Posts: 41
Re: [addon] BTV Command Line Tools

OK I answered my own question kinda. i really haven't programmed in a while. For anyone else trying to do this. You have to convert the filetime string into hex, and divide the hex in to two 32 bit strings, then convert each hex string to longs in order to populate the two words.
Reply With Quote
  #33  
Old 08-25-2009, 06:20 AM
queler queler is offline
Member
 
Join Date: Oct 2005
Posts: 41
Re: [addon] BTV Command Line Tools

Here's the VBA/VB6 solution, maybe it will be helpful to others. It uses date functions found here, hex functions here, and longtounsigned here.

Code:
Function date2ft(d As Date) As String
    Dim ft As FileTime
    Dim hHex As String
    Dim lhex As String
    
    Call SerialTimeToFileTime(d, ft)
    hHex = DecToHex(LongToUnsigned(ft.dwHighDateTime))
    lhex = DecToHex(LongToUnsigned(ft.dwLowDateTime))
    Do Until Len(hHex) >= 8
         hHex = "0" & hHex
    Loop
    Do Until Len(lhex) >= 8
        lhex = "0" & lhex
    Loop
    'now both high and low hexes are 8 chars=32 bit
    date2ft = Application.WorksheetFunction.Text(HexToDec(hHex & lhex), "0")
End Function
Reply With Quote
  #34  
Old 09-08-2009, 08:52 PM
bobbo bobbo is offline
Registered User
 
Join Date: Nov 2005
Posts: 15
Re: [addon] BTV Command Line Tools

Here's a much simpler date/time conversion using VBScript (and no external functions):

Code:
'adjusted for EST, change -4 to +2 for GMT
dateResult = DateAdd("h", intTargetStart/36000000000 + 2, "1/1/1601")
strDate = Year(dateResult) & "-" & Month(dateResult) & "-" & Day(dateResult)
strTime = FormatDateTime(dateResult,3)
Example:
intTargetStart = 128963268000000000
strDate = "2009-09-08"
strTime = "09:00:00 PM"
Reply With Quote
  #35  
Old 11-27-2009, 08:54 AM
leecole's Avatar
leecole leecole is offline
l33t Member
 
Join Date: Nov 2002
Location: Cary, NC
Posts: 2,614
Re: [addon] BTV Command Line Tools

I am attempting to add mp4 support to EpisodeData.exe.
I get this error:
System.Web.Services.Protocols.SoapException:
Server was unable to process request. ---> System.NullReferenceException:
Object reference not set to an instance of an object.
at SnapStream.BeyondTV.WebServices.BTVLibrary.GetMedi aByFullName(String authTicket, String fullName)
--- End of inner exception stack trace ---

Here is what the xml looks like:
<?xml version="1.0" encoding="utf-8"?>
<episode-properties>
<property name="Recommendation">False</property>
<property name="Duration">5600000000</property>
<property name="FileFormat">H.264/MPEG-4</property>
<property name="StationCallsign">WNCN</property>
<property name="EpisodeDescription">[Edited] Actor Robert Pattinson (``The Twilight Saga: New Moon'').</property>
<property name="Title">The Ellen DeGeneres Show</property>
<property name="UniqueChannelID">000000000000007000000012010 </property>
<property name="TargetStart">129032208000000000</property>
<property name="EPGID">EP5992701093</property>
<property name="EpisodeTitle">#1093 </property>
<property name="Description"></property>
<property name="InProgress">False</property>
<property name="UserID"></property>
<property name="OriginalAirDate">20091120</property>
<property name="DisplayTitle">The Ellen DeGeneres Show</property>
<property name="Length">524832798</property>
<property name="DVDReady">True</property>
<property name="MovieYear"></property>
<property name="Channel">7</property>
<property name="Editable">TRUE</property>
<property name="TZBias">300</property>
<property name="Actors">Robert Pattinson</property>
<property name="TargetDuration">36000000000</property>
<property name="ActualStart">129032233669531250</property>
<property name="Rating"></property>
<property name="Genre">Talk</property>
<property name="FullName">G:\Movies and TV\TV\the ellen degeneres show-2009-11-20-0_cut.mp4</property>
<property name="ReadOnly">False</property>
<property name="Managed">False</property>
<property name="Name">G:\Movies and TV\TV\the ellen degeneres show-2009-11-20-0_cut.mp4</property>
<property name="Folder">BTV</property>
<property name="LastWriteTime">129032253828125000</property>
<property name="LastExistsTime">129038073389062500</property>
<property name="Added">129032233676406250</property>
<property name="AddedBias">300</property>
<property name="TSIndexFilename">H:\BTV\ts0.index.dat</property>
<property name="ParentGUID">746e40fd-39d9-4b11-83d9-94c12a1639d4</property>
<property name="SrtExists">False</property>
<property name="DisplayText">The Ellen DeGeneres Show</property>
<property name="SortableName">the ellen degeneres show</property>
<property name="SortableTime">129032053669531250</property>
<property name="Watched"></property>
<property name="LastPosition"></property>
</episode-properties>

Can you tell me what I am doing wrong?
It appears to me that BeyondTV is in fact updating it's library, but EpisodeData thinks the operation failed because of the error that gets logged.


I may have figured this out myself:
I had the new fields
Folder
TSIndexFilename
wrong. I needed to update them.
__________________
Lee L. Cole
Sometimes I sits and thinks
and sometimes, I just sits

AUTOXVID - Check this out:
AutoXvid Manual -
http://docs.google.com/Doc?docid=0AU...dHc2Y2Q4&hl=en

Last edited by leecole; 01-26-2010 at 11:39 AM.
Reply With Quote
  #36  
Old 11-27-2009, 12:19 PM
psionic's Avatar
psionic psionic is offline
Registered User
 
Join Date: Sep 2003
Posts: 276
Re: [addon] BTV Command Line Tools

Quote:
Originally Posted by leecole View Post
I am attempting to add mp4 support to EpisodeData.exe.
I get this error:
System.Web.Services.Protocols.SoapException:
Server was unable to process request. ---> System.NullReferenceException:
Object reference not set to an instance of an object.
at SnapStream.BeyondTV.WebServices.BTVLibrary.GetMedi aByFullName(String authTicket, String fullName)
--- End of inner exception stack trace ---

Here is what the xml looks like:
<?xml version="1.0" encoding="utf-8"?>
<episode-properties>
<property name="Recommendation">False</property>
<property name="Duration">5600000000</property>
<property name="FileFormat">H.264/MPEG-4</property>
<property name="StationCallsign">WNCN</property>
<property name="EpisodeDescription">[Edited] Actor Robert Pattinson (``The Twilight Saga: New Moon'').</property>
<property name="Title">The Ellen DeGeneres Show</property>
<property name="UniqueChannelID">000000000000007000000012010 </property>
<property name="TargetStart">129032208000000000</property>
<property name="EPGID">EP5992701093</property>
<property name="EpisodeTitle">#1093 </property>
<property name="Description"></property>
<property name="InProgress">False</property>
<property name="UserID"></property>
<property name="OriginalAirDate">20091120</property>
<property name="DisplayTitle">The Ellen DeGeneres Show</property>
<property name="Length">524832798</property>
<property name="DVDReady">True</property>
<property name="MovieYear"></property>
<property name="Channel">7</property>
<property name="Editable">TRUE</property>
<property name="TZBias">300</property>
<property name="Actors">Robert Pattinson</property>
<property name="TargetDuration">36000000000</property>
<property name="ActualStart">129032233669531250</property>
<property name="Rating"></property>
<property name="Genre">Talk</property>
<property name="FullName">G:\Movies and TV\TV\the ellen degeneres show-2009-11-20-0_cut.mp4</property>
<property name="ReadOnly">False</property>
<property name="Managed">False</property>
<property name="Name">G:\Movies and TV\TV\the ellen degeneres show-2009-11-20-0_cut.mp4</property>
<property name="Folder">BTV</property>
<property name="LastWriteTime">129032253828125000</property>
<property name="LastExistsTime">129038073389062500</property>
<property name="Added">129032233676406250</property>
<property name="AddedBias">300</property>
<property name="TSIndexFilename">H:\BTV\ts0.index.dat</property>
<property name="ParentGUID">746e40fd-39d9-4b11-83d9-94c12a1639d4</property>
<property name="SrtExists">False</property>
<property name="DisplayText">The Ellen DeGeneres Show</property>
<property name="SortableName">the ellen degeneres show</property>
<property name="SortableTime">129032053669531250</property>
<property name="Watched"></property>
<property name="LastPosition"></property>
</episode-properties>

Can you tell me what I am doing wrong?
It appears to me that BeyondTV is in fact updating it's library, but EpisodeData thinks the operation failed because of the error that gets logged.


I may have figured this out myself:
I had the new fields
Folder
TSIndexFilename
wrong. I needed to update them.
Lee,

It usually throws this error when it asks BTV to lookup the metadata by filename. It doesn't give me much opportunity to tell whether the metadata wasn't found because the record is locked, or it simply can't find the show. BTV does some sort of locking just after a show completes recording and if the Library service is updating the metadata. I don't see a way to (1) detect a lock and (2) wait until the lock is finished (it could lead to a race condition). Because of these issues, I've taken the approach of fail early and retry.

I double checked my code and I'm not doing anything to require or expect .mpg or .tp file extensions. Any new fields in the metadata should be passed through during export and passed back to BTV during import. There's only a few fields that I rely on (Name is one of them).
__________________
BTV Server: Dell Vostro 420 Tower, Intel Core2 Quad Q6600, 4GB RAM, AMD Radeon HD 3450, 1TB WD (Recording), 750MB LaCie (Storage)
Tuners: 2 x Hauppauge HVR-2250 Hybrid, 1 x V-Box Cat's Eye USB HDTV, 1 x Silicon Dust HDHomeRun Hybrid
Television: 60" Sony Grand Wega SXRD HDTV [1080i/1920x1080/DVI-HDMI]
BTV Link: Dell Optiplex 745 USFF, Dell UltraSharp 2007FPW [16x9]

BTV Command Line Tools Usage & Download
Reply With Quote
  #37  
Old 11-27-2009, 12:55 PM
leecole's Avatar
leecole leecole is offline
l33t Member
 
Join Date: Nov 2002
Location: Cary, NC
Posts: 2,614
Re: [addon] BTV Command Line Tools

Quote:
Originally Posted by psionic View Post
Lee,

It usually throws this error when it asks BTV to lookup the metadata by filename. It doesn't give me much opportunity to tell whether the metadata wasn't found because the record is locked, or it simply can't find the show. BTV does some sort of locking just after a show completes recording and if the Library service is updating the metadata. I don't see a way to (1) detect a lock and (2) wait until the lock is finished (it could lead to a race condition). Because of these issues, I've taken the approach of fail early and retry.

I double checked my code and I'm not doing anything to require or expect .mpg or .tp file extensions. Any new fields in the metadata should be passed through during export and passed back to BTV during import. There's only a few fields that I rely on (Name is one of them).
I have double checked it. The problem I had was because, in the last BTV release, BTV has added two new fields to their MetaData. Both fields are related to the file path. One is Folder, which now holds the Beyond TV folder name, and the other, is TSIndexFilename which is the hard drive and path to the folder.
I hadn't noticed that these fields existed, so I wasn't changing them when I moved a recording to another folder. This was causing the Error. I have fixed these problems in the latest version of EpisodeData.exe.
__________________
Lee L. Cole
Sometimes I sits and thinks
and sometimes, I just sits

AUTOXVID - Check this out:
AutoXvid Manual -
http://docs.google.com/Doc?docid=0AU...dHc2Y2Q4&hl=en
Reply With Quote
  #38  
Old 01-30-2010, 11:27 AM
tscales tscales is offline
l33t Member
 
Join Date: Nov 2003
Location: North Liberty, Iowa
Posts: 3,683
Re: [addon] BTV Command Line Tools

I'm getting the error on getbyfilename. 4.9.2 on local machine.

Perhaps I'm downloading the wrong version of the tools? Which link is right?
__________________
  • Hyper-V Server - Dell Precision T7400 - Dual X5472 Quad Core 64GB
    • VMedia1 - Virtual - 25TB
    • VHD - Virtual - HDHR Prime
    • VPVR - Virtual - HDPVR
    • VSFD - Virtual - Essentials Domain Controller
  • Hyper-V Replica - Dell Precision T7400 - Dual X5460 Quad Core 16GB
  • Playroom - Dell 540s - Sharp 60" 1080P
  • Master Bedroom - Dell XPS410 - Samsung 46" 1080p
  • Guest - Dell XPS410 - Vizio 37" 1080P
Reply With Quote
  #39  
Old 01-30-2010, 11:33 AM
tscales tscales is offline
l33t Member
 
Join Date: Nov 2003
Location: North Liberty, Iowa
Posts: 3,683
Re: [addon] BTV Command Line Tools

Never mind. File name has to be fully qualified
__________________
  • Hyper-V Server - Dell Precision T7400 - Dual X5472 Quad Core 64GB
    • VMedia1 - Virtual - 25TB
    • VHD - Virtual - HDHR Prime
    • VPVR - Virtual - HDPVR
    • VSFD - Virtual - Essentials Domain Controller
  • Hyper-V Replica - Dell Precision T7400 - Dual X5460 Quad Core 16GB
  • Playroom - Dell 540s - Sharp 60" 1080P
  • Master Bedroom - Dell XPS410 - Samsung 46" 1080p
  • Guest - Dell XPS410 - Vizio 37" 1080P
Reply With Quote
  #40  
Old 02-14-2010, 09:25 PM
The_Keymaker The_Keymaker is offline
Junior Member
 
Join Date: Feb 2010
Posts: 4
Re: [addon] BTV Command Line Tools

I have BTV v 4.9.2 and Metadataextractor works for me when I use local filepaths like, "K:\PVR Recordings\recordingName.mpg" but NOT when I use UNC file paths like "\\Dataserver\PVR Recordings\recordingName.mpg"

Has anyone else had this problem?

Regards
Reply With Quote
  #41  
Old 07-07-2010, 04:55 PM
jeff_dwork jeff_dwork is offline
Registered User
 
Join Date: Feb 2005
Posts: 12
Re: [addon] BTV Command Line Tools

Where can I find the most recent version of the tools? The only files I see to download are from 4/4/2008.

Thanks,
jeff
Reply With Quote
  #42  
Old 01-07-2012, 01:23 PM
tracytax5 tracytax5 is offline
Registered User
 
Join Date: Jan 2012
Posts: 3
Re: [addon] BTV Command Line Tools

I have been using BTVMetaData on new recordings with Beyond TV 4.8. Everything gets filled in when importing except the Episode Description.

Is anyone else having this problem?
Reply With Quote
  #43  
Old 01-07-2012, 01:23 PM
tracytax5 tracytax5 is offline
Registered User
 
Join Date: Jan 2012
Posts: 3
Re: [addon] BTV Command Line Tools

also this I checked the XML file created and noticed that the EpisodeDescription field is blank. However, the Description field has what appears to be the Episode Description.
Reply With Quote
  #44  
Old 01-07-2012, 01:24 PM
tracytax5 tracytax5 is offline
Registered User
 
Join Date: Jan 2012
Posts: 3
Re: [addon] BTV Command Line Tools

I double checked my code and I'm not doing anything to require or expect .mpg or .tp file extensions. Any new fields in the metadata should be passed through during export and passed back to BTV during import. There's only a few fields that I rely on (Name is one of them).
Reply With Quote
  #45  
Old 09-21-2012, 10:51 PM
empty1969 empty1969 is offline
Junior Member
 
Join Date: Dec 2006
Posts: 16
Re: [addon] BTV Command Line Tools

I have been having an issue when the metadata contains non standard letters. I have extracted the xml file from a movie and one of the actors name is Clémence Poésy. After importing back into another file the name gets converted to Clémence Poésy. I can add this character into a filed through the web interface, but I do not have access to all the fields.

Thanks

Empty
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Command Line DRH Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 2 09-05-2003 01:11 AM
command line options? cadet Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 3 06-22-2003 11:08 AM


All times are GMT -6. The time now is 09:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
©2004-2009 Snapstream Media
You Rated this Thread: