SageTV Community  

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

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-23-2012, 09:47 PM
FlyingShawn FlyingShawn is offline
Sage User
 
Join Date: Jun 2011
Posts: 59
Could I pay one of you to write some SJQ scripts for me?

Mods: If this sort of thing isn't allowed, my apologies, I couldn't find anything about it either way in the rules. Please lock the thread and let me know.

I need to set up SJQ to do some pretty specific things, but I simply don't have time to learn Groovy and do it myself. I've been trying to get around to it for months, but other things just keep getting in the way. What I'd like to ask is if it'd be possible to pay one of you Groovy ninjas to write this for me (assuming we could agree on a reasonable price). I suspect that all/most of this isn’t actually all that hard to do, it’s just that the initial learning curve on Groovy/SJQ for someone with very little programming experience is just too steep.

Here's the general idea of what I need:

My "new" Sage Server (a work-in-progress now for six months, due to this SJQ stuff and life in general) has a total of four tuners: an HDHR Dual and two Colossus cards. This means my recordings are a mix of MPEG2 .mpg files and H.264 .ts files.

The first objective is relatively simple (at least, in theory):
On my old HTPC, I used the "showsqueeze" feature of BeyondTV to make a Zune-compatible copy of all of my recordings, which I then synced to my laptop on the road via Windows Live Mesh (I travel for work, so this helps me keep caught up even when I don't have a connection (ruling out Placeshifter as an option)). I've heard on here that the video converting capability built into Sage isn't very well done, so the output quality is pretty low. I'd like to have SJQ start a conversion job immediately after each show is completed (so I can get it synced over as quickly as possible), creating a copy of all Favorites recordings as either a .wmv or .mp4 conforming to the ZuneHD specifications (the hardest part, as I see it, is preserving the metadata in the file so the Zune software can get specific season/episode numbers and descriptions directly from the file), and then dropping it into a folder for Live Mesh to sync over. Maybe use a Handbrake CLI for this, since I'd be able to go in and tweak the settings later on?

The second objective is just to run Comskip on the original recordings. I know there are pre-made scripts available for that already, but since I haven't had time to figure out the other steps, I haven't put any effort into implementing this. Ideally, I'd like to be able to automatically cut the commercials out of the recordings (I figure that'll save me ~25% on storage space for each file), but I know that's extremely difficult to implement reliably, so I’d like to discuss it and not consider it totally essential.

The third objective is to store the original copies in a more space friendly manner for long-term storage:

For the Colossus recordings, that should be a lot easier, since they're already H.264. If feasible, I'd like to strip them of extra audio streams/closed captioning files and make them just regular .mp4 files to further save on space, but since I'm not sure how much space those things take, I'm not sure that's essential. Even if we didn't do anything to alter the Colossus files, I'd at least want to make sure the Zune conversion happened and Comskip was run before moving it out of the Recording directory to a second directory (either a storage drive or a folder where Amahi would pick it up and move it to a Greyhole array)

The other half of the third objective is the MPEG2 files from the HDHR. Simply put, I'd like to convert them to MP4 (H.264/x.264) to save space. It seems like it'd be simple enough to pass the file to Handbrake (or, MUCH more preferably, something that utilizes the QuickSync functionality of my i5-2500k processor to convert it significantly faster without a huge quality loss), but I really have no idea how to restore the internal metadata to the converted file.

I'm thinking that it might be best to split each of these three objectives (well, four, since the third one is two separate things) into separate SJQ plugins instead of one giant monstrosity so that we don't program ourselves into a corner and it's easier to tweak/modify/add-on-to later. If each step created a "done" text file, the next steps could each start by checking to make sure the prior step is complete so they don't get out of sequence.

Considering what little programing experience I do have (a huge AutoHotKey script to do some very similar things in BeyondTV and a little HTML) and what I've been able to understand from some sample SJQ scripts I've seen, I think I could probably figure out what was going on in a SJQ script and tweak it here and there after you're done (so I wouldn't require long-term support for it), but I simply don't have the time to learn Groovy from the ground up to write it all from scratch myself.

So, how about it SJQ ninjas? Is this something that could be done at a reasonable cost? If you’re interested or have questions, please let me know.

If it helps, here are the full specs on the system:
Win7 64
SageTV v7
Core-i5 2500k (using the built-in GPU, at least for now)
8GB RAM
System disk on a 96GB SSD
WD 1TB Black "Cache" drive (temporarily the main recording drive, will probably set up a Greyhole disk array in an Amahi VM to transfer files to the storage drives later)
7GB total space across 3 storage drives (these will be managed by Windows/Sage until I get the Amahi VM set up)
HDHR Dual (connected via a gigabit switch)
2x Colossus
Reply With Quote
  #2  
Old 01-24-2012, 06:12 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Shawn, this wouldn't run within Sage, but I believe you can do everything you are looking to do, automated as much as possible, with a purchase of the VideoRedo software, and then download and setup the free application called "VAP."

http://www.videoredo.net/msgBoard/forumdisplay.php?f=41

What you are looking to do does take some mild technical setup, and should be within reach with the VAP software, including your comskip, filename filtering, and final file encoding.
Reply With Quote
  #3  
Old 01-25-2012, 12:03 AM
FlyingShawn FlyingShawn is offline
Sage User
 
Join Date: Jun 2011
Posts: 59
Quote:
Originally Posted by KryptoNyte View Post
Shawn, this wouldn't run within Sage, but I believe you can do everything you are looking to do, automated as much as possible, with a purchase of the VideoRedo software, and then download and setup the free application called "VAP."

http://www.videoredo.net/msgBoard/forumdisplay.php?f=41

What you are looking to do does take some mild technical setup, and should be within reach with the VAP software, including your comskip, filename filtering, and final file encoding.
Sounds like that has a lot of potential! My two primary concerns with an outside-Sage solution like that are:

1) Does it have the ability to retain the internal metadata throughout the process?

2) Once it starts processing a file, does Sage lose track of it until VAP is done with it and it's re-imported (in other words, would I be unable to watch it from the time the recording finishes and VAP starts on it until Sage sees the completed file on an Import Directory scan?)?
Reply With Quote
  #4  
Old 01-25-2012, 12:13 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Actually, the sage built-in converter uses ffmpeg, and can be configured for pretty much any quality settings you want. It is certainly a lot simpler to use than SJQ.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #5  
Old 01-25-2012, 01:43 AM
FlyingShawn FlyingShawn is offline
Sage User
 
Join Date: Jun 2011
Posts: 59
Quote:
Originally Posted by Fuzzy View Post
Actually, the sage built-in converter uses ffmpeg, and can be configured for pretty much any quality settings you want. It is certainly a lot simpler to use than SJQ.
So, you're suggesting to use the built-in conversion to make my Zune files, then use SJQ or VAP (as suggested above) to manage the rest of the converting?

It'd be nice to stay within Sage/SJQ for management/metadata purposes, but I'm certainly open to exploring a workflow like this. I guess the VAP question still hinges on metadata.
Reply With Quote
  #6  
Old 01-25-2012, 03:16 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
What other conversion needs to be done?
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #7  
Old 01-25-2012, 03:42 PM
FlyingShawn FlyingShawn is offline
Sage User
 
Join Date: Jun 2011
Posts: 59
Essentially the workflow requires two conversions/post processing actions to be performed automatically on each Favorite:

1)A low-quality, Zune-compatible copy of the file is made to sync to my system while I'm on the road.

2)The original HD recording is Comskipped and either converted (to MP4, in the case of MPEG2 files) or VideoReDo'd (in the case of H.264 files) to be more space-efficient for long-term storage and viewing on the HTPC

I could use the built-in converter to perform that first step, as you suggested, but I haven't found any way to have it automatically perform both conversion actions on each Favorite.
Reply With Quote
  #8  
Old 01-25-2012, 06:49 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Quote:
Originally Posted by FlyingShawn View Post
Sounds like that has a lot of potential! My two primary concerns with an outside-Sage solution like that are:

1) Does it have the ability to retain the internal metadata throughout the process?

2) Once it starts processing a file, does Sage lose track of it until VAP is done with it and it's re-imported (in other words, would I be unable to watch it from the time the recording finishes and VAP starts on it until Sage sees the completed file on an Import Directory scan?)?
No idea. I use VAP to autorun Videoredo's comskip software and QSF, and then it sits and waits for me to manually adjust the commercial cuts, I adjust to my liking, and then it finishes processing the core files, then per folder - converts according to my various filters (for example, my 1080i TV shows require a deinterlacing config, while my 720p shows don't, not to mention the resolution variations).

The developer of VAP is active almost daily in the forum I linked to, sign up and ask. If it's not there yet, he will very likely add it.
Reply With Quote
  #9  
Old 01-26-2012, 12:22 AM
FlyingShawn FlyingShawn is offline
Sage User
 
Join Date: Jun 2011
Posts: 59
Quote:
Originally Posted by KryptoNyte View Post
No idea. I use VAP to autorun Videoredo's comskip software and QSF, and then it sits and waits for me to manually adjust the commercial cuts, I adjust to my liking, and then it finishes processing the core files, then per folder - converts according to my various filters (for example, my 1080i TV shows require a deinterlacing config, while my 720p shows don't, not to mention the resolution variations).

The developer of VAP is active almost daily in the forum I linked to, sign up and ask. If it's not there yet, he will very likely add it.
I signed up and posted this thread:
http://www.videoredo.net/msgBoard/sh...ad.php?t=29666

Still no answer on if/how it handles Sage metadata, but since the second step of my workflow so closely resembles what you're describing of yours, I'm optimistic about VAP working for me.
Reply With Quote
  #10  
Old 01-27-2012, 07:15 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Well, might not be the right fit, but I have yet to find a little custom package, that has the power and flexibility to do this much, with a developer that is this interested in finding solutions to ... well, whatever video file you can throw at him.

On a sidenote, if you're looking to hire an engineer, and you ask them what they do for a living, if their answer doesn't include "I solve problems," then you're not speaking to an engineer.

Reply With Quote
  #11  
Old 01-28-2012, 09:20 AM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Shawn, I'll try to keep the VAP conversation going over in that forum. If anyone else that's reading this has [even a small] understanding of SageTV metadata, and whether it's embedded in the mpg files or not, please pipe up.
Reply With Quote
  #12  
Old 01-28-2012, 06:44 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
SageTV recordings, that are recorded directly by SageTV v7+, have metadata stored in them, but it is proprietary, and that metadata is not used by any other program.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #13  
Old 01-29-2012, 08:16 AM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Okay, guess that answers that. Thanks, Fuzzy.
Reply With Quote
  #14  
Old 01-30-2012, 12:14 PM
FlyingShawn FlyingShawn is offline
Sage User
 
Join Date: Jun 2011
Posts: 59
Quote:
Originally Posted by Fuzzy View Post
SageTV recordings, that are recorded directly by SageTV v7+, have metadata stored in them, but it is proprietary, and that metadata is not used by any other program.
When I was using BTV, there was a "Metadata Extractor" command line tool available for download that would export the proprietary metadata to an xml file and then could be used to re-embed that data back into a file (say, a Handbrake output file). Is there anything like that available for Sage?

I'm assuming there's some similar capability available to SJQ, but don't know how to use it (hence my reason for starting this thread).
Reply With Quote
  #15  
Old 01-31-2012, 04:09 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
There are a few tools that can output the data from the sage database to either an XML file, a .MY file, or a .properties file (each a different format, but all text readable). Sage, by default, can be set-up to output to .properties files, but only on a change to the metadata, not on the initial recording.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripts: SageTV backup scripts (dailly config, full weekly, full manual) robogeek SageTV Customizations 50 01-24-2012 07:24 AM
Scripts: Content for PlayOn and Online Services menu robogeek SageTV Customizations 34 12-29-2009 12:03 PM
/opt/sagetv/scripts references slamduncan SageTV Linux 1 05-12-2007 12:29 PM
Scripts to modify XMLTV data. grooves12 SageTV EPG Service 3 12-31-2006 11:50 PM
init scripts ChePazzo SageTV Linux 0 12-16-2006 12:28 PM


All times are GMT -6. The time now is 08:03 PM.


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