SageTV Community  

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

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-10-2005, 04:05 PM
ajuhawk's Avatar
ajuhawk ajuhawk is offline
Sage Aficionado
 
Join Date: Sep 2004
Posts: 330
Arrow SageEncoder v0.4.2 01/29 - Encode .mpg to .wmv streaming files & divx

SageEncoder v0.4.2 - Jan 29, 2006

Use SageEncoder to Encode .mpg files into .wmv files. SageEncoder also generates .html files with the .wmv file embedded for internet viewing of your SageTV recordings. Further encoding formats will be added upon request.

New for v0.2.4 - Divx output support!

Features:
  • Integrated Web Encoding - Sage Encoder (v0.2.0 or greater) can be integrated with Neilm's Webserver to allow the user to select which files will be encoded via the Sage Recordings page.
  • Directory monitor - monitors for new files to encode by checking every 5 minutes for new files (.VPrj files (thus it is required that you use comskip and output these files) if not using the "Use Job File Trigger" option or .mpg.xml files - from the job folder - if this option is selected).
  • Trigger monitor - only encodes certain .mpgs instead of all recordings, if desired.
  • Log file - makes sure that files are only encoded once.

Installation Instructions:

1) Install Windows Media Encoder 9 to the default location (C:\Program Files\Windows Media Components\Encoder). If needed, this can be downloaded from here. Also make sure that you have the .NET Framework 1.1 installed - go to windows update if you do not have it.

2) Download and Unzip SageEncoder into "C:\Program Files\Windows Media Components\Encoder" It is important that the "Sage Encoder - Core Files.zip" is unzipped in the encoder directory or the html files will not be generated correctly.

Note: "Sage Encoder - Core Files.zip" contains the files that are not changing. The exe only zip should be downloaded standalone with each version update.

3) Optional - If you desire to run Sage Encoder from Cayars STV (or another STV with dynamic menus), move encode.cmd to "C:\Program Files\Frey Technologies\SageTV\STVs\OriginalV2\cayars\External" or similiar location (depending upon your installation). If you placed SageEncoder.exe in another location (other than the encoder directory above), you will need to modify this batch file. Then once you have all of this done, in Cayars Ultimate STV you can add a menu item to point to encode.cmd.
a) Right Click in the menu/submenu you want to add the encoding option.
b) Choose Add New Menu Item > External Program
c) Then, for external program, use: cmd.exe
d) Then for arguments/parameters use: /C "C:\Program Files\Frey Technologies\SageTV\STVs\OriginalV2\cayars\External\Encode.cmd"
(you can copy this line, then use the Paste From Clipboard option)
e) Then enter the menu title/text to show: ie, Encode and Publish
f) Then once your done, right click again and now Save Menu Definition File.

4) Optional - Divx output installation - to enable divx encoding you must go to the setup menu and tell it where virtualdub.exe resides on your computer. You must also save SE.vcf into the same directory as SageEncoder.exe. I recommend that you go into virtualdub and save your own, custom SEdivx.vcf (provided in core files v3 and above) file with the settings you prefer as the default one I provide may not work with your codecs. If you do not have virtualdub, you will need to download it from here.

5) Run SageEncoder.exe. Select the "Setup" menu and change the directories to match your setup. Click "save settings" and then "close"

6) Select the desired run configuration on the main screen. For help click on "Help" & "Quick Help" for more details. click "save settings" to save the settings for the future.

7) Press "start" or close the program and call it from inside the STV with the menu setup above. If you want to continually monitor for new files to encode, I recommend selecting "run at intervals".

Installation for web encoding interface:

1) Setup and install Neilm's Webserver (if not all ready installed) using the directions provided. Please make make sure the web server is working correctly before continuing.
2) download "Neilm's Web Server changes v1.zip" below and unzip into your Sage directory (usually C:\Program Files\Frey Technologies\SageTV). You should be prompted about overwriting 2 files (servlet.properties & RecordingsServlet.class), select yes.
3) restart sage (and sage service if using that), which in turn restarts the webserver.
4) go to the recordings page, you should note checkboxes next to each file and a "Set Encode Flag" button at the bottom. Check the files you want to encode and press "Set Encode Flag", a new files with the extension .mpg.wse should be added in your recordings directory for each file you had a checkbox next too.
5) run Sage Encoder with "Allow Web Triggers" checked (saving settings after selecting). The file(s) you previously selected from the web page should now be encoded.

Updates:

Version 0.1.4 - April 11, 2005 - Added ability to change WMEncoder and VideoReDo locations based upon your setup. This can be found under the Setup menu. Default locations will be used if you don't change them. Also made it so that the log will only be updated if the file is "successfully" encoded.

Version 0.1.5 - April 12, 2005 - Fixed problem if C:\ isn't your windows drive.

Version 0.2.0 - April 22, 2005 - Fixed bugs with 2nd output directory and now copies the .mpg.xml files to the output directory so they can be saved. Added the following features: "Web Interface" - this allows the selection of which files will be encoded via Neilm's webserver, Close on Completion - if not running as a loop this will close the program when it's done, GUI responsiveness - GUI now remains fully responsive while encoding files, minimized status - when minimized the sys tray icon will show the user what's going on, Sage Encoder Priorities - priority level of Sage Encoder now matches the gui options.

Version 0.2.1 - April 24, 2005 - Added function that allows wmv files to be added to the webpage (Tools menu option). This function can also be used to regenerate the web pages if desired. Also changed the way directories are built for sorting if the .mpg.xml file is present. Other minor bug fixes.

Version 0.2.2 - April 27, 2005 - Added ability to use up to 3 input directories. Other minor bug fixes and optimizations.

May 1, 2005 - Updated the webserver revisions to work with Neilm's latest v1.4 release (tested). Previous version works with v1.1 (tested). If you use v1.1-1.3 of Neilm's you'll have to experiment to see which one works for you.

Version 0.2.3 - May 3, 2005 - fixed bug with using web trigger and the 2nd and 3rd input directories.

Version 0.2.4 - July 6, 2005 - added beta support for divx output files. You must go into the setup menu and point to your virtualdub executable and have SE.vcf (the virtual dub settings script) saved in the same directory as SageEncoder or this WILL NOT work.

Version 0.3.0 - July 16, 2005 - Divx output now supported session to session (i.e. the checkbox state is saved). Added no process times for when SageEncoder will NOT process files.

Dec. 11, 2005 - New version of Neilm's webserver (2.0+) has SageEncoder support built in. To use the feature, set the property "nielm/webserver/enableSageEncoderOpts=true" in your sage.properties file to enable. Many thanks to Neilm for including this support!

Version 0.4.1 - January 25, 2006 - This version addresses many of the requests that have come up. You can now disable wmv output and/or the webpage output. You can also customize the arguments that are passed to virtual dub or change it to use an entirely different program. Can't remember what all else I changed so give it a try and see what's new.

Version 0.4.2 - January 29, 2006 - Bug fix: Fixed error of not saving certain front panel settings, fixed processing error when not using the "do not process" mode.

Thanks to seamonkey420 for the original idea that this program is based off of.
Attached Files
File Type: zip Neilm's Web Server changes v1.zip (8.0 KB, 752 views)
File Type: zip Neilm's Web Server changes v1.4.zip (8.2 KB, 810 views)
File Type: zip Sage Encoder - Core Files v3.zip (3.2 KB, 1027 views)
File Type: zip Sage Encoder b0.3.0 exe only.zip (23.6 KB, 782 views)
File Type: zip Sage Encoder b0.4.2 exe only.zip (25.5 KB, 741 views)

Last edited by ajuhawk; 01-29-2006 at 06:17 PM.
Reply With Quote
  #2  
Old 04-10-2005, 04:06 PM
buzzerbee's Avatar
buzzerbee buzzerbee is offline
Sage Advanced User
 
Join Date: Apr 2004
Location: Ohio
Posts: 201
Let me be the first to say THANKS!
__________________
---------------
The Antec = AMD Barton 2500+, 1 GB RAM, Epox 8rda+, WinXP Pro, PVR-250, ATI Radeon 9600XT, SageTV 2.2.8
Reply With Quote
  #3  
Old 04-10-2005, 05:47 PM
Dorien Dorien is offline
Sage User
 
Join Date: Mar 2005
Posts: 59
Thanks! Now to give it a try!

Quote:
Originally Posted by ajuhawk
SageEncoder v0.1.3 - April 10, 2005
Reply With Quote
  #4  
Old 04-10-2005, 07:43 PM
Dorien Dorien is offline
Sage User
 
Join Date: Mar 2005
Posts: 59
So far so good. A link problems seem to be gone now. Going to do a big batch tonight and see how it turns out! I'll let you know.
Reply With Quote
  #5  
Old 04-10-2005, 08:03 PM
gotuitdan gotuitdan is offline
Sage Advanced User
 
Join Date: Apr 2004
Posts: 105
Hello,

I'm trying to use this, but having some issues.

I've tried it two ways:
1. From a remote computer with WM9 encoder (installed on H, sourcing the sage files located on a mapped drive (V and trying to save the wmv files to the local primary drive (H. SageEncode notes that none of the files are processed, but it doesn't ever start processing them.

2. From the Sage server with WM9 encoder (installed on the primary drive, F, sourcing the sage files on D:\recs and trying to save the wmv files to D:\smallrecs. SageEncode gives me an error (SageEncodeError1.jpg). If I try to turn on "Auto Start", I get SageEncodeError2.jpg

One thought was if something could be hard-coded to the C: drive? Any other ideas?

Even so... Great idea, and I can't wait to get it working! :-)
Attached Images
File Type: jpg SageEncodeError1.jpg (41.9 KB, 882 views)
File Type: jpg SageEncodeError2.JPG (14.6 KB, 705 views)
Reply With Quote
  #6  
Old 04-10-2005, 08:29 PM
ajuhawk's Avatar
ajuhawk ajuhawk is offline
Sage Aficionado
 
Join Date: Sep 2004
Posts: 330
Quote:
Originally Posted by gotuitdan
Hello,

I'm trying to use this, but having some issues.

I've tried it two ways:
1. From a remote computer with WM9 encoder (installed on H, sourcing the sage files located on a mapped drive (V and trying to save the wmv files to the local primary drive (H. SageEncode notes that none of the files are processed, but it doesn't ever start processing them.

2. From the Sage server with WM9 encoder (installed on the primary drive, F, sourcing the sage files on D:\recs and trying to save the wmv files to D:\smallrecs. SageEncode gives me an error (SageEncodeError1.jpg). If I try to turn on "Auto Start", I get SageEncodeError2.jpg

One thought was if something could be hard-coded to the C: drive? Any other ideas?

Even so... Great idea, and I can't wait to get it working! :-)
I have the WM9 encoder hard coded to the default location (as stated in my first post). I've thought of making this a variable, so I'll do that and post a new version tomorrow night. In the meantime, you could always install it to c:

Edit: in the first one you note that SageEncoder says it's not processing anything. This is true in 2 cases. 1) you're using the "Job file trigger" and it's not finding the trigger or 2) it's not finding any .VPrj files that match the .mpg files in the directory.

Last edited by ajuhawk; 04-10-2005 at 09:06 PM.
Reply With Quote
  #7  
Old 04-10-2005, 08:31 PM
ajuhawk's Avatar
ajuhawk ajuhawk is offline
Sage Aficionado
 
Join Date: Sep 2004
Posts: 330
Quote:
Originally Posted by Dorien
So far so good. A link problems seem to be gone now. Going to do a big batch tonight and see how it turns out! I'll let you know.
Glad to hear it! I really thought I'd fixed that in the last version...guess I should keep notes
Reply With Quote
  #8  
Old 04-11-2005, 05:44 AM
RedCoat999's Avatar
RedCoat999 RedCoat999 is offline
Sage Aficionado
 
Join Date: Aug 2003
Posts: 371
Can you play back these wmv files through Sage? I thought wmv and wma formats were not going to be supported?
__________________
Happy Sage customer since 2003

Proud owner of a HD200 connected to a 47" LCD. Loving Sage 7 and Phoenix
Reply With Quote
  #9  
Old 04-11-2005, 06:19 AM
gotuitdan gotuitdan is offline
Sage Advanced User
 
Join Date: Apr 2004
Posts: 105
Thanks for the reply... On my Sage Server, I unfortunately have no C-drive to install the encoder to... WinXP made my DVD-Recorder the C-drive... My hard drives are D, F (primary), and G...

In the case where SageEncoder wasn't processing anything, it *was* finding the files and listing the .VPrj files that matched. It then said "none processed" and "waiting 5 minutes" (probably for the check for new files interval). I'm guessing that nothing ever got encoded because it was looking for the encoder on the wrong drive (H: on this machine, not c...

Either way, it the location of the encoder install were a variable, it just may solve all of my problems. ... At least the ones that relate to re-encoding MPG to WMV... ;-)

thanks again!


Quote:
Originally Posted by ajuhawk
I have the WM9 encoder hard coded to the default location (as stated in my first post). I've thought of making this a variable, so I'll do that and post a new version tomorrow night. In the meantime, you could always install it to c:

Edit: in the first one you note that SageEncoder says it's not processing anything. This is true in 2 cases. 1) you're using the "Job file trigger" and it's not finding the trigger or 2) it's not finding any .VPrj files that match the .mpg files in the directory.
Reply With Quote
  #10  
Old 04-11-2005, 01:13 PM
Dorien Dorien is offline
Sage User
 
Join Date: Mar 2005
Posts: 59
Nope, Sage can not read this files. This project falls more in line with making files streamable (So you can watch them on the road or away from home). It makes the files and all the html pages need to link them up. Then you take the Shows_index.html and somehow serve it up on the web. I currently using the webserver made by cayars to do this. I thought since that solutions was already in place I would like to try it. I have it working now. My particular solutions isn't the best and I know there is a different way to skin this cat from the additional reading that I have done. But this way does work. Here is what I posted in a different thread.


03-28-2005, 09:57 PM
Dorien
Sage Expert Join Date: Mar 2005
Posts: 36

Yeah. Actually it dawn on me while reading all his little help files. There is one that specifically says

"Serving other files with Sage Web Server
The webserver can serve any files on your system, all you need to do is build a directory structure under the

SageTV/webserver/webroot

directory containing these files"

And then I knew I was onto something. If it could serve up any file then why not a HTML file? I went to the webroot and made another share named "stream"(anything you want really / eg ..webserver\webroot\stream) and then told the batch file(wme.bat) to place it shows_index.html and sub folder in there. I tried having it in the root and it work well until the batch file tried to create a new html in that directory. Not sure what happen but it got all goofed up with the redirect for the webserve page so I just made another sub directory.

To test I just restarted the service and this time instead of typing
http://192.168.1.101:8080/sage/Home in the address link I used
http://192.168.1.101:8080/stream/shows_index.html And it worked!

Ok but that's only half of it. Then I remember reading somewhere else he had write a way to add links into his webserve page. One of the ways was to add a URL link like so

Menu layout and items
The menu bar that sits at the top of the screen is read from a text file in

SageTV/webserver/menu.properties

The layout of this file is pretty simple: each [group] is a drop-down menu, and each

Name=address row is a menu item

Menu items can be to any valid URL, so you can even add bookmarks to external sites,

eg: IMDB=http://www.imdb.com/

Note that any changes to menu.properties will require a restart of the Sage process that is running the webserver (SageTV or SageTV Service)

So basically I told it to

Streams=http://192.168.1.101:8080/stream/shows_index.html

and saved. Tested and that worked too. Now there might be a cleaner way to do this. But this was a way that was already available and I have 0 problems with its results. It just took a while of looking over all those white papers. Hope this helps and I wasnt to unclear.

Oh and one more thing. If you are behind a router like me just do some port forwarding (open ports) for 8080 or whatever port you specified other than default in webserve. Also wanted to add that if you are trying to reach this from the internet then you will need to put the IP of your modem gets to reach it. In my case I use the IP that my router to gets from my ISP. Then do the port forwarding to for 8080 to the 192.168.1.101 system which is my pvr. So basically on the net the request comes to my modem -> then hits my router -> then my router sees that all requests coming in on 8080 need to goto my pvr boxs.


PS Only 2 more things on my wish list right now.

1)Episode names the way they look in SAGE. Like having Eps # instead of the 12434634 that broadcasters like to indentify their shows with.
2)Having it sort by show title instead of date. I think this will make it much easier once it starts to get a little bigger.

And since Im thinking of it. What happen to files that get removed? Will links stay and just become dead? Just curious. Guess I could find out but dont want to delete anything just yet

--------------------------------------------------------------------------------
Last edited by Dorien : 03-29-2005 at 10:53 AM.





Quote:
Originally Posted by RedCoat999
Can you play back these wmv files through Sage? I thought wmv and wma formats were not going to be supported?
Reply With Quote
  #11  
Old 04-11-2005, 05:29 PM
gotuitdan gotuitdan is offline
Sage Advanced User
 
Join Date: Apr 2004
Posts: 105
Quote:
Originally Posted by ajuhawk
Edit: in the first one you note that SageEncoder says it's not processing anything. This is true in 2 cases. 1) you're using the "Job file trigger" and it's not finding the trigger or 2) it's not finding any .VPrj files that match the .mpg files in the directory.
Ok, so I installed SageEncoder on the non-Sage Server machine on the C: drive. Every 5 minutes, I get the following:

4/11/2005 7:18:26 PM: Starting loop...
V:2020-5086761-0.VPrj
V:24-Day4900PM1000PM-4952076-0.VPrj
V:30MinuteMeals-WeeknightCelebration-5000116-0.VPrj
V:CrossingJordan-SkinBone-4948099-0.VPrj
V:ER-BackintheWorld-4936595-0.VPrj
V:House-Detox-3773881-0.VPrj
V:LawOrder-TheSixthMan-3778412-0.VPrj
V:LawOrderCriminalIntent-Beast-5032127-0.VPrj
V:LawOrderTrialbyJury-41Shots-4202532-0.VPrj
V:SmartSolutions-SoulFood-5004925-0.VPrj
No files processed.
Loop completed...waiting 5 minutes

(The list is edited down for brevity's sake.)

Even so, no files are ever seemingly processed... The current registry settings are attached as as image. WM9 Encoder is located at the proper C: location, although H: is the primary/system drive.

I've tried switching autoStart, firstRun, priority, and useTimer...

I'm not using videoRedo...

Ideas?

Thanks!
Attached Images
File Type: jpg sageencodreg1.JPG (19.7 KB, 667 views)
Reply With Quote
  #12  
Old 04-11-2005, 05:42 PM
ajuhawk's Avatar
ajuhawk ajuhawk is offline
Sage Aficionado
 
Join Date: Sep 2004
Posts: 330
Quote:
Originally Posted by gotuitdan
Ok, so I installed SageEncoder on the non-Sage Server machine on the C: drive. Every 5 minutes, I get the following:

4/11/2005 7:18:26 PM: Starting loop...
V:2020-5086761-0.VPrj
No files processed.
Loop completed...waiting 5 minutes

Ideas?

Thanks!
I'm currently looking through the code, but I had one thought, check the log and delete everything out of it, this may have been populated when you ran it before but didn't have the encoder in the correct directory. If that doesn't work let me know...I'm still stepping through (and I think I'll change the way the log works)
Reply With Quote
  #13  
Old 04-11-2005, 06:13 PM
gotuitdan gotuitdan is offline
Sage Advanced User
 
Join Date: Apr 2004
Posts: 105
Quote:
Originally Posted by ajuhawk
I'm currently looking through the code, but I had one thought, check the log and delete everything out of it, this may have been populated when you ran it before but didn't have the encoder in the correct directory. If that doesn't work let me know...I'm still stepping through (and I think I'll change the way the log works)
Hmmm. Maybe this is a hint? My log is always empty. Nothing ever gets written to it. The file is created and always stays at size "0"...

dan.
Reply With Quote
  #14  
Old 04-11-2005, 06:19 PM
ajuhawk's Avatar
ajuhawk ajuhawk is offline
Sage Aficionado
 
Join Date: Sep 2004
Posts: 330
Quote:
Originally Posted by gotuitdan
Hmmm. Maybe this is a hint? My log is always empty. Nothing ever gets written to it. The file is created and always stays at size "0"...

dan.
If that's the case then it's not finding any .Vprj files that match a .mpg file... can you confirm that there is at least one .mpg file that exactly matches a .Vprj file except for the extensions?
Reply With Quote
  #15  
Old 04-11-2005, 06:48 PM
eobiont eobiont is offline
Sage Advanced User
 
Join Date: Aug 2004
Location: Denver
Posts: 130
This is a pretty cool project.

What would make even cooler is if it could be made to encode and play back on the fly. That is it would list your Recorded TV directory in HTML and when you click on a file it would transcode and send that video to the remote computer.
Reply With Quote
  #16  
Old 04-11-2005, 07:06 PM
ajuhawk's Avatar
ajuhawk ajuhawk is offline
Sage Aficionado
 
Join Date: Sep 2004
Posts: 330
Quote:
Originally Posted by eobiont
This is a pretty cool project.

What would make even cooler is if it could be made to encode and play back on the fly. That is it would list your Recorded TV directory in HTML and when you click on a file it would transcode and send that video to the remote computer.
The only problem I see with this idea is the amount of time it actually takes to encode the file. But I may see about doing something like this at some point...
Reply With Quote
  #17  
Old 04-11-2005, 07:10 PM
Dorien Dorien is offline
Sage User
 
Join Date: Mar 2005
Posts: 59
Quote:
Originally Posted by eobiont
This is a pretty cool project.

What would make even cooler is if it could be made to encode and play back on the fly. That is it would list your Recorded TV directory in HTML and when you click on a file it would transcode and send that video to the remote computer.

http://www.orb.com/ does all that. I just don't like going threw another site or having no control of the quality of the vid.
Reply With Quote
  #18  
Old 04-11-2005, 07:29 PM
gotuitdan gotuitdan is offline
Sage Advanced User
 
Join Date: Apr 2004
Posts: 105
All of the .Vprj files have matching .mpg files, I believe...

See attached image for some filename examples...

Also, I tried deleting the log file between some of the runs to no effect. It simply recreated the zero-length file.

thanks...!

Quote:
Originally Posted by ajuhawk
If that's the case then it's not finding any .Vprj files that match a .mpg file... can you confirm that there is at least one .mpg file that exactly matches a .Vprj file except for the extensions?
Attached Images
File Type: jpg videodirectory1.JPG (45.6 KB, 622 views)
Reply With Quote
  #19  
Old 04-11-2005, 07:30 PM
gotuitdan gotuitdan is offline
Sage Advanced User
 
Join Date: Apr 2004
Posts: 105
Also, note that orb.com requires an uplink fast enough for the file being streamed... *Most* of us don't have 2.5-3Mbit *up*links, which causes the need for compression prior to streaming in any case...



Quote:
Originally Posted by Dorien
http://www.orb.com/ does all that. I just don't like going threw another site or having no control of the quality of the vid.
Reply With Quote
  #20  
Old 04-11-2005, 07:34 PM
ajuhawk's Avatar
ajuhawk ajuhawk is offline
Sage Aficionado
 
Join Date: Sep 2004
Posts: 330
Quote:
Originally Posted by gotuitdan
All of the .Vprj files have matching .mpg files, I believe...

See attached image for some filename examples...

Also, I tried deleting the log file between some of the runs to no effect. It simply recreated the zero-length file.

thanks...!
yeah, those look fine...
I'll keep thinking about it and see if I think of anything...in the meantime check out v0.1.4 (posted in message #1), you should be able to run this on your normal machine setup now.

Last edited by ajuhawk; 04-11-2005 at 07:59 PM.
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


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


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