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
  #1  
Old 03-22-2008, 06:07 PM
SSDNAdmin SSDNAdmin is offline
Administrator
 
Join Date: Nov 2004
Posts: 174
[addon] BTV Command Line Tools

Author: psionic

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
Reply With Quote
  #2  
Old 03-23-2008, 06:47 PM
psionic's Avatar
psionic psionic is offline
Registered User
 
Join Date: Sep 2003
Posts: 276
Usage and Downloads

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

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

Code:
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

Code:
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.
Attached Files
File Type: zip BTVTools-20080404.zip (50.3 KB, 627 views)
File Type: zip BTVTools-src-20080404.zip (97.2 KB, 528 views)
File Type: zip BTVToolsInstaller-20080404a.zip (409.2 KB, 763 views)

Last edited by psionic; 04-04-2008 at 07:30 PM.
Reply With Quote
  #3  
Old 03-23-2008, 09:55 PM
psionic's Avatar
psionic psionic is offline
Registered User
 
Join Date: Sep 2003
Posts: 276
TODO and Changelog

TODO:
  • Investigate new utilities: BTVWMV, BTVDivx
Changelog:

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::PropertyBagHelper
20080323 -
  • 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

Last edited by psionic; 04-04-2008 at 07:33 PM.
Reply With Quote
  #4  
Old 04-04-2008, 06:06 AM
mzup mzup is offline
Registered User
 
Join Date: Oct 2004
Posts: 87
Re: [addon] BTV Command Line Tools

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.
Reply With Quote
  #5  
Old 04-04-2008, 06:46 AM
psionic's Avatar
psionic psionic is offline
Registered User
 
Join Date: Sep 2003
Posts: 276
Re: [addon] BTV Command Line Tools

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).
__________________
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
  #6  
Old 04-21-2008, 04:37 PM
vertigo3d vertigo3d is offline
Registered User
 
Join Date: Mar 2006
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.

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?
Reply With Quote
  #7  
Old 04-21-2008, 04:43 PM
vertigo3d vertigo3d is offline
Registered User
 
Join Date: Mar 2006
Posts: 3
Re: [addon] BTV Command Line Tools

Disregard previous post. This is working now.
Reply With Quote
  #8  
Old 04-21-2008, 04:59 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 vertigo3d View Post
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.
__________________
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
  #9  
Old 05-13-2008, 01:31 PM
Carey Carey is offline
Registered User
 
Join Date: Mar 2006
Posts: 59
Re: [addon] BTV Command Line Tools

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.
Attached Files
File Type: zip BTV_DescFix.zip (2.0 KB, 438 views)
__________________
BeyondTV 4.9.3, ArcSoft Decoder, Windows XP Pro SP3.
ASUS A8N-E, AMD Athlon64 3800+, 1GB RAM, 1 TB HD, 500GB HD, ATI 2600 HD PCI-E, DVD RAM GSA-4040B.
Tuners: Hauppauge HD-PVR, Hauppauge HVR-1600, Diamond PVR550 PCI, Diamond PVR600 USB
Motorola DCX3200 HD Cable Box connected with USB-UIRT
Firefly & Firefly Mini Remotes.
2 Beyond TV Link units running on EeePCs.

Last edited by Carey; 05-17-2008 at 09:16 AM.
Reply With Quote
  #10  
Old 07-07-2008, 02:34 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

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?
__________________
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
  #11  
Old 07-07-2008, 03:24 PM
psionic's Avatar
psionic psionic is offline
Registered User
 
Join Date: Sep 2003
Posts: 276
Re: [addon] BTV Command Line Tools

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.

Code:
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=
__________________
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

Last edited by psionic; 07-07-2008 at 03:28 PM.
Reply With Quote
  #12  
Old 07-07-2008, 04:30 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
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.

Code:
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.
__________________
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
  #13  
Old 07-08-2008, 01:23 PM
Carey Carey is offline
Registered User
 
Join Date: Mar 2006
Posts: 59
Re: [addon] BTV Command Line Tools

Quote:
Originally Posted by leecole View Post
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.
__________________
BeyondTV 4.9.3, ArcSoft Decoder, Windows XP Pro SP3.
ASUS A8N-E, AMD Athlon64 3800+, 1GB RAM, 1 TB HD, 500GB HD, ATI 2600 HD PCI-E, DVD RAM GSA-4040B.
Tuners: Hauppauge HD-PVR, Hauppauge HVR-1600, Diamond PVR550 PCI, Diamond PVR600 USB
Motorola DCX3200 HD Cable Box connected with USB-UIRT
Firefly & Firefly Mini Remotes.
2 Beyond TV Link units running on EeePCs.
Reply With Quote
  #14  
Old 07-08-2008, 06:32 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 Carey View Post
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.
__________________
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
  #15  
Old 07-15-2008, 09:13 PM
ColdBrew ColdBrew is offline
Registered User
 
Join Date: Sep 2005
Posts: 484
Re: [addon] BTV Command Line Tools

The installer posted here still requires .net 3.5. At least for Vista x64.
__________________
Apevia X-QPack 2, Gigabyte GA-G33M-DS2R, Intel Quad Core 6600 2.4 Ghz, 2 GIG DDR2-1066, 750 GB Seagate HDD, 4 500 GB Seagate HDD, 2 250 GB Seagate HDD, 2 Belkin Tetra USB Hubs, nVidia 8800 GT 512M, Hauppauge PVR-500, HP AVC-3610, FusionHDTV 5 USB, HDHomeRun

Windows Vista Ultimate SP1 x64, BeyondTV v4.9.1, AutoXvid
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 03:24 PM.


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