SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations

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 11-23-2011, 07:23 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
Batch Video Converter for the HTPC Crowd - Removes Commercials

I realize there are probably a bazzillion frontends out there for Handbrake to convert videos to the iPhone and iPod and there is built-in functionality to SageTV, but how many of those frontends cater to the HTPC crowd? I have created a very simple frontend for HandbrakeCLI/mp4box that originally catered to my personal need of being able to convert videos to my iPhone while cutting out all the commercials that have already been detected through SageTV.

I should be posting it to Github or some place similar over the weekend. Just to break it down here is the short list of current features:

*Very easy to use interface

*Can automatically remove commercials when a Comskip or ShowAnalyzer generated EDL file is present

*Shows total progress on Taskbar in Windows 7

Todo:

*Add functionality to automatically retrieve and set metadata information and poster image from thetvdb.org and other sources

*Try to figure out a better way to encode video. Since I am using HandBrakeCLI the --start-at command takes a significant time hit as it is seeking the start position for each section of video derived from the EDL file. Not a problem at the beginning of the video or for a shorter show but probably doubles the encode time after about the halfway mark in an hour show. There just has to be a better way.

I have included a screenshot.

I am very excited about this program. It really did come together out of personal desire and actually has its roots in some batch files I created as a "frontend" for HandBrakeCLI. I believe this has turned into something great for what it is. If anyone is interested in getting this before I am able to post it publicly please PM me.

Update 1:

Version 1.0 is uploaded to Google Code.
*Added ability to enable/disable video auto cropping

Version 1.5
*Adds thetvdb.com for some metadata and poster retrieval and themoviedb.org for poster retrieval.
*Added requirement of AtomicParsley? for adding metadata to resulting M4V file.
*SageTV v7 recordings required for best results, otherwise filename must be in "Series Name - SxxExx? - Episode Name" format

Version 1.5.1
*Fixes metadata retrieval from SageTV recordings. I had to make sure erroneous "characters" were removed. Probably a result of reading a binary file byte for byte while converting each byte to an ASCII character. This resulted in some strange and obsolete control characters being inserted and preventing things from working correctly.

Version 1.5.5
*Includes many bug fixes for metadata retrieval.
*Moves metadata retrieval before encoding so the user is provided with a list of possible titles if no exact match is found.

Version 1.5.6
*Adds ability to import converted videos directly into iTunes.
*Optionally allows the deletion of converted video once iTunes import complete.

Version 1.5.7
*Moved the selection of the encoding profile to the Settings dialog.
*Added encoding profiles for the iPhone 4 (960x640), iPad (1024x768), iPad 2/AppleTV 2 (1280x720). The iPad profile can also be used for the iPad 2 if you desire to have a 1:1 pixel match to the LCD. I specified the 1280x720 profile as iPad 2 since the device is capable of 720p playback.

Version 1.6
*Updated EDL code so that Comskip files are now supported. Thank you to Alex for the code.
*Changed the way settings are saved so that they don't get lost between version.
*Lot's of bug fixes.

Download at: http://code.google.com/p/batch-video-converter/
Attached Images
File Type: png BatchVideoConverter.png (14.0 KB, 275 views)
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD

Last edited by Taddeusz; 07-21-2012 at 03:41 PM. Reason: Announce v1.0 Availability
Reply With Quote
  #2  
Old 11-23-2011, 08:00 AM
farscapesg1 farscapesg1 is offline
Sage Advanced User
 
Join Date: Mar 2005
Posts: 200
Interesting. I may have to take a look at this for my kid's shows. That is the only thing I encode to the mp4 format to work on my iPhone. Everything I watch gets encoded to .mkv and transferred to my HP Touchpad ($150 firesale edition) using MediaShrink.

The progress bar is a nice touch. That is one thing that I miss on Mediashrink. Back during the v1/v2 (can't remember which) it showed the file progress, but that was removed in the later versions so I never know for sure how long a video will take to encode.
Reply With Quote
  #3  
Old 11-23-2011, 08:23 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
I forgot to mention that if there is significant interest in my program I could probably add support for other device profiles and file types. I do want to keep it as simple as possible though. I don't want to get it overloaded with all kinds of advanced features and just stick with basic device profiles.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #4  
Old 11-23-2011, 09:03 AM
farscapesg1 farscapesg1 is offline
Sage Advanced User
 
Join Date: Mar 2005
Posts: 200
That's a good idea, unfortunately I'm too much of a tweaker at heart I actually use mutliple configurations for Mediashrink depending on what I'm encoding.
* Kids shows get encoded at medium quality to MP4 so they will play on my iPhone during car trips.
* My shows get encoded at HQ in mkv for storage (just to save space until I watch it) or transfer to my Touchpad.
* My wife's talk shows (uggg) get encoded at medium quality, and I'm going to test out leaving the commercials to save me time. Until moving to Sage v7, I was using showanalyzer and while pretty accurate, there were some detection issues and if I'm encoding a file without commercials I want that to be precise.. so I have been editing each file before encoding to get the commercial cuts perfect.
*DVDs get encoded at HQ with no commercial cut detection

Of course, this currently is all configured with DirMon2 so I just drop the edited files into the corresponding folders and the next time it scans it starts the processing.
Reply With Quote
  #5  
Old 11-23-2011, 10:51 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 6,576
One other useful feature IMHO is the ability to move TV shows to folders named after the show and, perhaps, rename the file to remove the show title.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #6  
Old 11-23-2011, 11:16 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
Quote:
Originally Posted by wayner View Post
One other useful feature IMHO is the ability to move TV shows to folders named after the show and, perhaps, rename the file to remove the show title.
However, depending on how you have iTunes configured neither matter since it will automatically place the file in its library structure and rename it appropriately.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #7  
Old 11-24-2011, 08:00 AM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
TheRenamer will rename and move your files around if you choose:

http://www.therenamer.com/

Just make sure you set Sage to include sxxexx in the filename. It works on most files. Some recordings Sage still won't capture sxxexx info.

TheRenamer is a pretty sweet and easy program! It will nest by show and by season and various combinations...
Reply With Quote
  #8  
Old 11-26-2011, 12:42 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
Ok, I've uploaded the executable to Google Code at:

http://code.google.com/p/batch-video-converter/

Please let me know if you have any questions or suggestions. Keep in mind I want to keep this as easy to use as possible and not get overloaded with features. That way even your wife or kids can use it if they so desire.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #9  
Old 11-26-2011, 05:19 PM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
It might be nice for the ease to be able to designate the directories to look in for shows. Maybe the import path for recordings or something. That way if the wife had to do it she could just click add and it would give her direct access to the correct location.
Reply With Quote
  #10  
Old 11-27-2011, 07:40 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
Not really sure how to do that. I guess I would have to design my own open file dialog.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #11  
Old 12-06-2011, 03:28 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
I haven't made it public yet as it's not quite finished but I do have some news. thetvdb.com portion of the automatic metadata code is essentially complete. It needs some error checking and such but otherwise works as long as thetvdb is available at the time.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #12  
Old 12-07-2011, 02:48 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
Ok, I've noticed something with EDL files that I'm not sure I can account for in my code. Basically EDL files created with ShowAnalyzer are slightly different from those of comskip. The difference is that if the end of a video contains no commercial block ShowAnalyzer places a zero length commercial break there to indicate the end of the file. Comskip does not.

I use these data points to determine how to encode the end of the file (specifying a start point with no end point). Without this data I have no way to determine whether the end contains no commercial block and just let HandBrake encode to the end. Unless there's another way I can figure out the time length of the file there's no way I can think of for me to make that determination.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #13  
Old 02-29-2012, 10:13 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
Uploaded a new version to Google Code. I just realized that I've never updated my posts since I put 1.0 up on Google Code. Batch Video Converter now retrieves metadata. The latest version fixes some bugs and improves metadata retrieval so that the user is given the option to pick from a list of possible titles if no exact match can be made. Not heard a whole lot of feedback lately but it's in a state that I like and I haven't had a whole lot of time to do much with it. This latest addition was due to a frustration with movies that have colons or other characters in them that prevent exact title matches. Let me know what you think.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #14  
Old 03-13-2012, 02:53 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
Uploaded a new version to Google Code. Finally adds the ability to import videos directly to iTunes and also optionally delete the converted file from the output path after import.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #15  
Old 03-14-2012, 01:02 PM
ChaOConnor's Avatar
ChaOConnor ChaOConnor is offline
Sage Aficionado
 
Join Date: Nov 2008
Location: Bel Air, MD
Posts: 355
Thanks for the update! One minor request, could you please add a profile for iPad, especially now the new iPad is coming out on Friday?
__________________
Server: AMD Phenom II X6 1090T 3.2GHz, ASRock 890FX Deluxe4 890FX, PNY Optima 8GB DDR3 1333
Media Storage: Rosewill RSV-S4-X 4 Bay Enclosure w/ 4 x 3TB via unRAID
Capture: HDHomerun Prime, HDHomerun x 2
Software: Sage Server 7.1.9 on Windows 7 (Virtualized in ESXi)
Clients: i3-2105, ASRock Z68 Pro3-M, 4GB DDR3 1600, 64GB SATA III (OS), 2TB WD Green (Recording), PNY GT 430 // 2 x HD-300
Reply With Quote
  #16  
Old 03-14-2012, 02:34 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
Quote:
Originally Posted by ChaOConnor View Post
Thanks for the update! One minor request, could you please add a profile for iPad, especially now the new iPad is coming out on Friday?
Done, and a bit more.

I've moved the profile selection to the settings dialog where it probably should have gone to begin with and then added several new profiles for the iPhone 4, iPad, and the iPad 2/AppleTV 2.

I hope these are agreeable changes.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #17  
Old 03-15-2012, 08:29 AM
ChaOConnor's Avatar
ChaOConnor ChaOConnor is offline
Sage Aficionado
 
Join Date: Nov 2008
Location: Bel Air, MD
Posts: 355
You'd da man! Thank you!
__________________
Server: AMD Phenom II X6 1090T 3.2GHz, ASRock 890FX Deluxe4 890FX, PNY Optima 8GB DDR3 1333
Media Storage: Rosewill RSV-S4-X 4 Bay Enclosure w/ 4 x 3TB via unRAID
Capture: HDHomerun Prime, HDHomerun x 2
Software: Sage Server 7.1.9 on Windows 7 (Virtualized in ESXi)
Clients: i3-2105, ASRock Z68 Pro3-M, 4GB DDR3 1600, 64GB SATA III (OS), 2TB WD Green (Recording), PNY GT 430 // 2 x HD-300
Reply With Quote
  #18  
Old 07-21-2012, 03:40 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
Version has been updated to 1.6. Lots of bug fixes. Now works with Comskip EDL files.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #19  
Old 07-24-2012, 07:07 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,922
If anyone has downloaded the latest version you need to go back and re-download it. I had to put up a new one that fixed a small bug that I have no idea how it got there.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Video converter for .ts files (free today!) larryf The SageTV Community 0 04-17-2009 06:48 AM
Video to VGA converter any good ? dflachbart Hardware Support 3 02-23-2007 03:06 PM
Audio Quality - Football crowd noise... briands SageTV Software 6 10-02-2005 09:22 AM
Sony XBR TV setup using component video converter heckheck Hardware Support 0 07-30-2005 08:23 AM


All times are GMT -6. The time now is 07:48 PM.


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