PDA

View Full Version : [addon] BTV Command Line Tools


SSDNAdmin
03-22-2008, 06:07 PM
Author: psionic (http://forums.snapstream.com/vb/private.php?do=newpm&u=4361)

Short Description: A couple of command line tools to interact with BTV
Long Description: This is a collection of command line tools that expose some of the functionality of the web interface for scripting purposes.
Version Number: n/a
Status: n/a
Last Updated: 3/1/2008
Homepage: n/a
Installation Instructions: Unzip into any folder
Release Notes:
License: Public Domain
Requirements: BTV 4.8.1


Download BTVTools.rar (http://www.snapstream.com/ssdn/submissions/psionic/BTVTools.rar)

psionic
03-23-2008, 06:47 PM
Included utilities:
BTVMetaData - Allows you to extract or import the metadata from BTV recordings
StreamSnip - Allows you to initiate a streamsnip job on an HD recording from the command line without knowing the recording's major and minor channels or the correct stream information.
BeyondTVLibrary.dll - Dawonderer's great library with helpful updates from Fonceur.You'll find the source code for these utilities in btvtools-src-yyyymmdd.zip. The project files are for Visual Studio 2008 and they are targeted for .NET 2.0.

Usage Information

Common Options:

All utilities accept the following options:--server=dnsname_or_ip:port - specify the BTV server and port
--license=btvlicense - give a BTV or Link license key to use
--user=username - login username
--password=password - login password
If these options are not defined, the utilities will try to use the BTV server on the local machine (localhost) at the default port (8129). They will also use a blank username and password as well as a dummy license key.

BTVMetaData

BTVMetaData --mode=[extract|import] <options> "c:\the\recording.mpg"-- OR --

BTVMetaData <options> [extract|import] "c:\the\recording.mpg"BTVMetaData Options:--mode=[extract|import] - specify either extract or import
Notes:
If you specify a server other than the local machine (localhost), the program will try to locate the recording on the server. The filename that you specify on the command line should be from the client perspective (i.e. UNC paths are OK).
BTVMD will create the metadata XML in the same folder as the recording and with the same name, except using the .xml file extension.
If security is enabled, the user you specify must have the EditShowPermission.StreamSnip

StreamSnip <options> "c:\the\target\hd-recording.tp"StreamSnip Options:--dest=c:\destination\folder - Where the snipped recording should go
--replace - BTV should replace the existing recording with the snipped recording
Notes:
If security is enabled, the user you specify must have EditShowPermission and CreatePostProcessPermission.

psionic
03-23-2008, 09:55 PM
TODO:
Investigate new utilities: BTVWMV, BTVDivxChangelog:

20080404a - (installer only)

Changed the installer to check for .NET 2.0 instead of .NET 3.5. If 20080404 installed .NET 3.5 on your system, it shouldn't cause any problems -- all .NET versions can coexist on the same machine without any problems. 20080404 -
MSI Installer installs all DLLs instead of ILMerge'ing them
Renamed MetaDataExtractor to BTVMetaData to differentiate between it and MDE for BTV pre 4.8.1
Added MSI Installer with Install Directory in Registry (HKLM\Software\BTVTools\Home)
StreamSnip updated to accept UNC paths
Removed a few remaining dependencies on BeyondTVLibrary::PropertyBagHelper20080323 -
Added BTVUtils::BTVToolBase to standardize options and interfaces
Now using ILMerge to pack BTVUtils.dll and Gnu.Getopts.dll into the EXE assemblies
Internal changes to make .exe's smaller

mzup
04-04-2008, 06:06 AM
Does metadataextractor work with 4.8.1 only? I have 4.7.1 and get an error:
The underlying connection was closed: An unexpected error occurred on a send.

I do not have authentication enabled and I am running it on the localhost.
I do notice that the seesion name comes up with http://un:localhost. Don't know if that is the way it should be, of course.

psionic
04-04-2008, 06:46 AM
Yes. All of the utilities require BTV 4.8.1 or higher. Running them on a lesser version has unknown results (most likely a nasty error).

vertigo3d
04-21-2008, 04:37 PM
I have been using BTVMetaData on new recordings with Beyond TV 4.8. Everything gets filled in when importing except the Episode Description.

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.

Is anyone else having this problem?

vertigo3d
04-21-2008, 04:43 PM
Disregard previous post. This is working now.

psionic
04-21-2008, 04:59 PM
I have been using BTVMetaData on new recordings with Beyond TV 4.8. Everything gets filled in when importing except the Episode Description.

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.

Is anyone else having this problem?

Previous versions of my MetaDataExtractor/BTVMetaData used Fonceur's PropertyBagHelper implementation to handle metadata. That implementation auto-renamed EpisodeDescription to Description. The current and all future versions of BTVMetadata use my own SmartBag implementation that doesn't do any property renaming.

If you find any instance of this happening again, please let me know.

Carey
05-13-2008, 01:31 PM
I think BTVMetaData.exe is a great tool, and exactly what I was looking for. It saved me having to create something similar myself to resolve my problem of using an outside media compression tool. Great job!

I've always been disappointed with the quality of the BTV built in ShowSqueeze, and the often out-of-sync audio it creates. And the H.264 ShowSqueeze is very slow compared to other media conversion tools out there. My solution is using MediaCoder to H.264/MP4 (or DivX Pro Compressor) for archiving shows I want to keep long term.

I created a VBscript that makes use of psionic's BTVMetaData.exe tool to transfer the show's description/details to the new compressed recordings I've made using MediaCoder. It then re-uses the chapters file for commercial skip if it's available, sets the lock on the recording to keep BTV from erasing the show when space is needed, and then deletes the original recording.

I've attached my vbscript for anyone that might find it helpful that is doing something similar. The script requires only 4 constants edited for your own use. The script design assumes that the new recording has a different file type extension, as I'm converting from MPEG (.mpg) to H.264 (.mp4). The script is well commented.

I currently use the script from the SendTo context menu. After copying the new compressed recording to my BTV server folder, I right click the original recording in Windows Explorer, select the script from the SendTo menu and it does the rest. Saving several manual steps and having to use the commandline.

P.S. Updated script attachment 2008-05-17 to fix errors in script.

leecole
07-07-2008, 02:34 PM
Originally Posted by kandlg View Post
Hi Lee,

I upgraded to 4.8.2 and am having problems with the episode data. I installed the command line tools, but am getting the following error with every conversion and there is no episode data in the converted file:

2008-07-07 15:08:59 : EpisodeData.exe Posted with D:\Beyond TV\Shows\The Shield-(On Tilt)-2008-07-07-0.avi
2008-07-07 15:08:59 : EpisodeData.exe - Version:3.3.1.29
2008-07-07 15:08:59 : EpisodeData.exe Beyond TV Recording
2008-07-07 15:08:59 : EpisodeData.exe MetaData program: C:\Program Files\BTVTools\BTVMetaData.exe
2008-07-07 15:08:59 : EpisodeData.exe - ReTryCount=1 Delay=60
2008-07-07 15:09:09 : MetaDataExtractor 07/07/2008 03:08:59 PM Description: General error: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: An incorrect password was entered.
at SnapStream.BeyondTV.WebServices.BTVLicenseManager. LogonHelper(String networkLicense, String username, String password, Boolean allowLocal, Boolean useAuthTicket)
at SnapStream.BeyondTV.WebServices.BTVLicenseManager. Logon(String networkLicense, String username, String password)
--- End of inner exception stack trace ---
2008-07-07 15:09:09 : EpisodeData.exe exiting with RC=Failed

Any ideas?

Thanks,
Kelly

EpisodeData calls BTVMetaDataExtractor without a password. I assume BTVMetaData uses a TCP/IP session to logon using the BTV license key as a password??????
Any idea?

psionic
07-07-2008, 03:24 PM
All of the command line utilities that I put out can take a username, a password, and the btv license key. If any of them are missing, it uses "dummy" values. The dummy values work fine on the local machine with security turned off.

Usage:
MetaDataExtractor --mode=[extract|import] <options> "c:\the\target\recording.mpg"

Options:
--mode=[extract|import]
--server=dnsname_or_ip:port
--license=btv_license_string
--user=username
--password=password

so, if BTV is on the local machine, WITH security enabled, this should work, provided the user has created a BTV user called 'autoxvid' with the password 'mysecret' that has the appropriate access rights (EditShow):

btvmetadata --mode=extract --user=autoxvid --password=mysecret "C:\tv\Law and Order - blahblah.mpg"

Lee, you might want to expose these options in AutoXvid.ini. "BTVServer=", "BTVUser=", "BTVPassword", "BTVLicense", etc. You can either specify the defaults (shown below) on the command line or omit them to let BTVMetaData automatically use them.

The defaults are:
--server=localhost:8129
--user=
--password=
--license=

leecole
07-07-2008, 04:30 PM
All of the command line utilities that I put out can take a username, a password, and the btv license key. If any of them are missing, it uses "dummy" values. The dummy values work fine on the local machine with security turned off.

Usage:
MetaDataExtractor --mode=[extract|import] <options> "c:\the\target\recording.mpg"

Options:
--mode=[extract|import]
--server=dnsname_or_ip:port
--license=btv_license_string
--user=username
--password=password

so, if BTV is on the local machine, WITH security enabled, this should work, provided the user has created a BTV user called 'autoxvid' with the password 'mysecret' that has the appropriate access rights (EditShow):

btvmetadata --mode=extract --user=autoxvid --password=mysecret "C:\tv\Law and Order - blahblah.mpg"

Lee, you might want to expose these options in AutoXvid.ini. "BTVServer=", "BTVUser=", "BTVPassword", "BTVLicense", etc. You can either specify the defaults (shown below) on the command line or omit them to let BTVMetaData automatically use them.

The defaults are:
--server=localhost:8129
--user=
--password=
--license=
I am looking at exposing UserData and Password.

Carey
07-08-2008, 01:23 PM
Originally Posted by kandlg View Post
Hi Lee,

I upgraded to 4.8.2 and am having problems with the episode data. I installed the command line tools, but am getting the following error with every conversion and there is no episode data in the converted file:

2008-07-07 15:08:59 : EpisodeData.exe Posted with D:\Beyond TV\Shows\The Shield-(On Tilt)-2008-07-07-0.avi
2008-07-07 15:08:59 : EpisodeData.exe - Version:3.3.1.29
2008-07-07 15:08:59 : EpisodeData.exe Beyond TV Recording
2008-07-07 15:08:59 : EpisodeData.exe MetaData program: C:\Program Files\BTVTools\BTVMetaData.exe
2008-07-07 15:08:59 : EpisodeData.exe - ReTryCount=1 Delay=60
2008-07-07 15:09:09 : MetaDataExtractor 07/07/2008 03:08:59 PM Description: General error: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: An incorrect password was entered.
at SnapStream.BeyondTV.WebServices.BTVLicenseManager. LogonHelper(String networkLicense, String username, String password, Boolean allowLocal, Boolean useAuthTicket)
at SnapStream.BeyondTV.WebServices.BTVLicenseManager. Logon(String networkLicense, String username, String password)
--- End of inner exception stack trace ---
2008-07-07 15:09:09 : EpisodeData.exe exiting with RC=Failed

Any ideas?

Thanks,
Kelly

EpisodeData calls BTVMetaDataExtractor without a password. I assume BTVMetaData uses a TCP/IP session to logon using the BTV license key as a password??????
Any idea?

FYI,

I use these command line tools quite often. I'm on version 4.8.2 and they are still working fine for me.

I use the following to import:

btvmetadata --mode=import --server=machinename:8129 "x:\filename.mp4"

And this to export:

btvmetadata --mode=extract --server=machinename:8129 "x:\filename.mpg"

I don't use a password on BTV though.

leecole
07-08-2008, 06:32 PM
FYI,

I use these command line tools quite often. I'm on version 4.8.2 and they are still working fine for me.

I use the following to import:

btvmetadata --mode=import --server=machinename:8129 "x:\filename.mp4"

And this to export:

btvmetadata --mode=extract --server=machinename:8129 "x:\filename.mpg"

I don't use a password on BTV though.
There's nothing wrong with the Command Line Tools. AutoXvid uses the Command Line Tools, but I hadn't implimented any way to allow a user to password protect. I posted this entry from AutoXvid's forum before I realized what I needed to do to handle it. I uncovered UserName and Password in AutoXvid to allow for this now.

ColdBrew
07-15-2008, 09:13 PM
The installer posted here still requires .net 3.5. At least for Vista x64.

psionic
07-16-2008, 03:31 PM
The installer posted here still requires .net 3.5. At least for Vista x64.

*shrug* ... beats me ... all binaries utilize .NET 2.0 as does BTV. Let it install if you want to .. it won't hurt anything.

Hmm... Vista xanything should have .NET 3.5 installed from the factory.

leecole
07-30-2008, 11:10 AM
Would you consider adding a ShowSqueeze program that would schedule a recording to ShowSqueeze?

psionic
10-06-2008, 04:37 PM
Would you consider adding a ShowSqueeze program that would schedule a recording to ShowSqueeze?

I'll put it on the list. I'm bombarded at work and at school, so it might be awhile.

In my spare time, I've been trying to fix an edge case that BTVMetaData throws a NullReferenceException when importing the metadata.xml (BTV doesn't find the show to edit).

leecole
12-09-2008, 07:47 PM
BeyondTv 4.9.1 latest version, MetaDataExtractor crashes, but there appears to be no system log entry.
Any ideas??

leecole
12-11-2008, 02:50 PM
BeyondTv 4.9.1 latest version, MetaDataExtractor crashes, but there appears to be no system log entry.
Any ideas??
Never mind! A reboot takes care of the problem.......

kmitch
01-03-2009, 09:03 AM
Can you add Try...Catch blocks around the main sections of the program. in doing some testing, it looks like an unhandled exception gets back to the OS, and causes Doctor Watson (DW20.exe) to come up and try to send an error report to Microsoft.

dk96m
01-14-2009, 07:11 PM
how do we edit this to add in the username and pw when security is enabled. When security is enabled, metadata crashes, when I disabled it, it worked again. I do not know how to edit this. Consider me a newb when it comes to this part. Thanks

leecole
01-14-2009, 07:25 PM
how do we edit this to add in the username and pw when security is enabled. When security is enabled, metadata crashes, when I disabled it, it worked again. I do not know how to edit this. Consider me a newb when it comes to this part. Thanks
[Episode]
UserName= xxxxxxxxxxxxxx
PassWord= xxxxxxxxxx

psionic
01-23-2009, 11:52 PM
Never mind! A reboot takes care of the problem.......

Sorry for the non-response Lee. I've been off the grid for a while and I'm just getting everything going again.

psionic
01-23-2009, 11:54 PM
how do we edit this to add in the username and pw when security is enabled. When security is enabled, metadata crashes, when I disabled it, it worked again. I do not know how to edit this. Consider me a newb when it comes to this part. Thanks

Lee's quite right. For the command line switch, you can look at this post (http://forums.snapstream.com/vb/showpost.php?p=284064&postcount=2) for usage instructions or execute the program with no options.

leecole
06-08-2009, 06:26 AM
Lee's quite right. For the command line switch, you can look at this post (http://forums.snapstream.com/vb/showpost.php?p=284064&postcount=2) for usage instructions or execute the program with no options.
If you have any time,
Would you consider adding a ShowSqueeze program that would schedule a recording to ShowSqueeze?
In AutoXvid, I would like to offer the option of using either AutoGK or BTV to do encoding after cutiing commercials.

queler
08-23-2009, 02:23 PM
Does anyone know how to do anything with the values for date and time that are in the XML file, without using .net. I'm using the command line tools as a poor mans BTVShowInfo using VBA and Excel (I'm too far removed from decent coding skills) and I randomly get errors using BTVShowInfo. I can't figure out a way to decipher the datetime values without using .net, anyone know how to do it?

leecole
08-23-2009, 03:02 PM
Does anyone know how to do anything with the values for date and time that are in the XML file, without using .net. I'm using the command line tools as a poor mans BTVShowInfo using VBA and Excel (I'm too far removed from decent coding skills) and I randomly get errors using BTVShowInfo. I can't figure out a way to decipher the datetime values without using .net, anyone know how to do it?I have never heard or read any explanation, but I believe that it is milliseconds added to a specific date. The DOS system clock is a counter of milliseconds since a particular date (I don't know what that date is, 1960/01/01 00:00:00 perhaps?). You could calculate it by calculating the number of milliseconds in a single year and dividing that into a field that you know the value of.
That is the way I used in the AutoXvid package.

Kilrsat
08-23-2009, 03:30 PM
"Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)."

leecole
08-23-2009, 06:12 PM
"Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)."

Good! That sounds like an official answer. I was way off, in my implimitation, I just used the left most 11 bits, since I only needed to the nearest minute, and not knowing the start date, I just took one of the original recordings I ever made and used the recording date to calculate my own "magic number" to represent that recording date.

queler
08-24-2009, 12:15 PM
"Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)."

So that sounds like it's FILETIME (http://msdn.microsoft.com/en-us/library/ms724284%28VS.85%29.aspx). 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 (http://www.cpearson.com/excel/FileTimes.htm)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?

queler
08-24-2009, 08:29 PM
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.

queler
08-25-2009, 06:20 AM
Here's the VBA/VB6 solution, maybe it will be helpful to others. It uses date functions found here (http://www.cpearson.com/excel/FileTimes.htm), hex functions here (http://www.vbaexpress.com/kb/getarticle.php?kb_id=307), and longtounsigned here (http://support.microsoft.com/kb/189323).

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

bobbo
09-08-2009, 08:52 PM
Here's a much simpler date/time conversion using VBScript (and no external functions):

'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"

leecole
11-27-2009, 08:54 AM
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.

psionic
11-27-2009, 12:19 PM
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).

leecole
11-27-2009, 12:55 PM
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.

tscales
01-30-2010, 11:27 AM
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?

tscales
01-30-2010, 11:33 AM
Never mind. File name has to be fully qualified

The_Keymaker
02-14-2010, 09:25 PM
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

jeff_dwork
07-07-2010, 04:55 PM
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

tracytax5
01-07-2012, 01:23 PM
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?

tracytax5
01-07-2012, 01:23 PM
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.

tracytax5
01-07-2012, 01:24 PM
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).

empty1969
09-21-2012, 10:51 PM
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