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
  #81  
Old 10-31-2016, 11:54 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
I would have thought you would want
Code:
"c:\program files\Sagetv\My Sage Stuff\runmakemkv.cmd" %1
John
Reply With Quote
  #82  
Old 10-31-2016, 12:05 PM
RBraverman's Avatar
RBraverman RBraverman is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 230
Quote:
Originally Posted by JREkiwi View Post
I would have thought you would want
Code:
"c:\program files\Sagetv\My Sage Stuff\runmakemkv.cmd" %1
John
And you would have thought correctly, caught that (and changed my post) - still doesn't work.

It seems to call the ToMKV.cmd, which just stares at me, wagging it's tongue at me.

******************** Update *********************

This is what I'm seeing from the trigger file command window that opens (a pause can be SO helpful):

c:\Program Files\SageTV\My Sage Stuff\ToMkv.cmd ""

No input file.
__________________
Core2Duo 3.0, 8gig Memory, Win7 x86, LOTS O' Storage tucked into an Antec Case.
OLD aTI Remote Wonder running RW Keymaster
Sage V9.2.2
2 Sage Clients V9.2.2
2 HD-100 Placeshifters - not connected.

Last edited by RBraverman; 10-31-2016 at 01:55 PM.
Reply With Quote
  #83  
Old 10-31-2016, 06:52 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by RBraverman View Post
Can we ignore my previous, above posts?

I've read through this thread several times and I MUST be missing something. As my Win7 HTPC goes to sleep in the middle of conversions, I wrote an external cmd to to use handbrake, (I haven't set it up to hold off on multiple requests, but in time; well here it is:

SETLOCAL ENABLEEXTENSIONS
powercfg -change -standby-timeout-ac 0
powercfg -change -hibernate-timeout-ac 0
powercfg -change -monitor-timeout-ac 0

"c:\program files\Handbrake\HandBrakeCLI" -i %1 -o %1.mp4 -E Copy -e x264 -q 23 -o %~n1.mp4

copy "%~dpnx1.properties" "%~dpn1.mp4.properties"


powercfg -change -standby-timeout-ac 10
powercfg -change -hibernate-timeout-ac 0
powercfg -change -monitor-timeout-ac 0


I trigger that with:

@call "c:\program files\Sagetv\My Sage Stuff\runmakemkv" > %1 with or with out the "> %1" (I saw that in one of the posts - doesn't make sense but ... I'll try anything.

Reading more, I changed the trigger to: Start "c:\program files\Sagetv\My Sage Stuff\runmakemkv.cmd" %1

With or with out the trigger file it fails and if I look at a file created in the My Sage Stuff directory with the same name, I do not see the file name - as if it hasn't been passed.

What am I missing? Missed? Didn't see? Read? etc.,?
Those powercfg commands don't look right. I think it should be:
Code:
powercfg /change standby-timeout-ac 0
, etc. the standby-timeout-ac and so on are parameters, not options, so no / or - in front of it.
__________________
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
  #84  
Old 11-01-2016, 07:08 AM
RBraverman's Avatar
RBraverman RBraverman is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 230
Quote:
Originally Posted by Fuzzy View Post
Those powercfg commands don't look right. I think it should be:
Code:
powercfg /change standby-timeout-ac 0
, etc. the standby-timeout-ac and so on are parameters, not options, so no / or - in front of it.
Naw, this version uses dashes, works a treat.

It's the passing of the filename I'm having a problem with.
__________________
Core2Duo 3.0, 8gig Memory, Win7 x86, LOTS O' Storage tucked into an Antec Case.
OLD aTI Remote Wonder running RW Keymaster
Sage V9.2.2
2 Sage Clients V9.2.2
2 HD-100 Placeshifters - not connected.
Reply With Quote
  #85  
Old 11-01-2016, 07:30 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by RBraverman View Post
Naw, this version uses dashes, works a treat.

It's the passing of the filename I'm having a problem with.
Okay.. I thought you said the problem was it was going to sleep during the encode. The path issues - you've got them all over the place it looks like.

Code:
"c:\program files\Handbrake\HandBrakeCLI" -i %1 -o %1.mp4 -E Copy -e x264 -q 23 -o %~n1.mp4
                                          ^^^^^
                       -i (input) Full Path as entered: c:\recs\movie.mpg
                                                ^^^^^^^^^
                                     -o (output) Full Path as entered + .mp4: c:\recs\movie.mpg.mp4
                                                          ^^^^^^^
                                                   -E (Audio Encoder): Copy
                                                                  ^^^^^^^
                                                            -e (video encoder): x264
                                                                          ^^^^^
                                                                   -q (quality): 23
                                                                                ^^^^^^^^^^^
                                                                       -o (output) filename + .mp4: movie.mp4
You've got more than one output option, and both seem wrong. You need to get rid of one o them, and make the other correct (including a path).

Code:
"c:\program files\Handbrake\HandBrakeCLI" -i "%~dpnx1" -E Copy -e x264 -q 23 -o "%~dpn1.mp4"
__________________
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
  #86  
Old 11-01-2016, 07:34 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Also, I see your step to copy the properties file, but if you are dealing with sagetv recordings, the properties file may not contain all the metadata for a recording, so this might not be a the full 'backup' you think it is. the .properties file is written to anytime metadata is changed for a mediafile. But metadata put in the file as it is recorded is not reflected there. So info from Sage's EPG, for instance, will be stored in the .mpg file, and then extra info from Phoenix, for instance, will be duplicated in the .properties file. It's enough of a backup of metadata if the recording is left untouched, but running the recording through handbrake will strip that info out of it.
__________________
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
  #87  
Old 11-01-2016, 08:48 AM
RBraverman's Avatar
RBraverman RBraverman is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 230
Quote:
Originally Posted by Fuzzy View Post
Also, I see your step to copy the properties file, but if you are dealing with sagetv recordings, the properties file may not contain all the metadata for a recording, so this might not be a the full 'backup' you think it is. the .properties file is written to anytime metadata is changed for a mediafile. But metadata put in the file as it is recorded is not reflected there. So info from Sage's EPG, for instance, will be stored in the .mpg file, and then extra info from Phoenix, for instance, will be duplicated in the .properties file. It's enough of a backup of metadata if the recording is left untouched, but running the recording through handbrake will strip that info out of it.
Lemme clarify, when I use the encode/convert within SageTV, it sleeps in the middle of an encode, so I put together this so I could call it, have it shut off all power configs, run it, then reset them - but it appears that I'm having problems getting the file passed to it.

I wasn't aware that the metadata was actually IN the file, but this does add some to the converted file and as I can't use the built-in version, well, this is what I'm left with.

This does work when a file is dropped on it, just not through "External Programs".
__________________
Core2Duo 3.0, 8gig Memory, Win7 x86, LOTS O' Storage tucked into an Antec Case.
OLD aTI Remote Wonder running RW Keymaster
Sage V9.2.2
2 Sage Clients V9.2.2
2 HD-100 Placeshifters - not connected.
Reply With Quote
  #88  
Old 11-01-2016, 09:01 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Interesting that it is sleeping during the built-in conversion - It thought that was one of the earlier things fixed once sage went open source.
__________________
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
  #89  
Old 11-01-2016, 09:02 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by RBraverman View Post
Lemme clarify, when I use the encode/convert within SageTV, it sleeps in the middle of an encode, so I put together this so I could call it, have it shut off all power configs, run it, then reset them - but it appears that I'm having problems getting the file passed to it.

I wasn't aware that the metadata was actually IN the file, but this does add some to the converted file and as I can't use the built-in version, well, this is what I'm left with.

This does work when a file is dropped on it, just not through "External Programs".
Have you tried the fix I posted above? When you 'drop' a file onto it, I think it executes it from the folder the file was dragged from, so the path missing from the output entry wouldn't be a problem.
__________________
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
  #90  
Old 11-01-2016, 09:49 AM
RBraverman's Avatar
RBraverman RBraverman is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 230
Quote:
Originally Posted by Fuzzy View Post
Have you tried the fix I posted above? When you 'drop' a file onto it, I think it executes it from the folder the file was dragged from, so the path missing from the output entry wouldn't be a problem.
OK, just realized what you on about until now: I did SO many itinerations of this that I didn't realize that I still had set TWO output files.

So this is what I have now:

"c:\Program Files\Handbrake\HandBrakeCLI.exe" -i "%~dpnx1" -E Copy -e x264 -q 23 -o %~dpnx1.mp4

Again works when dropped on, but when ( through a trigger file) within SageTV, I get a popup stating that it started, dutifully I then tap OK, and I get, for my effort, that it failed.
__________________
Core2Duo 3.0, 8gig Memory, Win7 x86, LOTS O' Storage tucked into an Antec Case.
OLD aTI Remote Wonder running RW Keymaster
Sage V9.2.2
2 Sage Clients V9.2.2
2 HD-100 Placeshifters - not connected.
Reply With Quote
  #91  
Old 11-01-2016, 12:53 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Right, I've gone back over your "corrected" post and try this.

"c:\Program Files\SageTV\My Sage Stuff\ToMkv.cmd"
Code:
@echo off
C:
cd "c:\Program Files\SageTV\My Sage Stuff"
start "MakeMKV" /MIN /LOW /WAIT runmakemkv.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
and "c:\program files\Sagetv\My Sage Stuff\runmakemkv.cmd"
Code:
c:
C:\Windows\System32\powercfg -change -standby-timeout-ac 0
C:\Windows\System32\powercfg -change -hibernate-timeout-ac 0
C:\Windows\System32\powercfg -change -monitor-timeout-ac 0

cd "c:\program files\Handbrake"
HandBrakeCLI" -i "%1" -E Copy -e x264 -q 23 -o "%~dpn1.mp4"

copy "%1.properties" "%~dpn1.mp4.properties" 

C:\Windows\System32\powercfg -change -standby-timeout-ac 10
C:\Windows\System32\powercfg -change -hibernate-timeout-ac 0
C:\Windows\System32\powercfg -change -monitor-timeout-ac 0
John
Reply With Quote
  #92  
Old 11-01-2016, 01:40 PM
RBraverman's Avatar
RBraverman RBraverman is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 230
Quote:
Originally Posted by JREkiwi View Post
Right, I've gone back over your "corrected" post and try this.

"c:\Program Files\SageTV\My Sage Stuff\ToMkv.cmd"
Code:
@echo off
C:
cd "c:\Program Files\SageTV\My Sage Stuff"
start "MakeMKV" /MIN /LOW /WAIT runmakemkv.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
and "c:\program files\Sagetv\My Sage Stuff\runmakemkv.cmd"
Code:
c:
C:\Windows\System32\powercfg -change -standby-timeout-ac 0
C:\Windows\System32\powercfg -change -hibernate-timeout-ac 0
C:\Windows\System32\powercfg -change -monitor-timeout-ac 0

cd "c:\program files\Handbrake"
HandBrakeCLI" -i "%1" -E Copy -e x264 -q 23 -o "%~dpn1.mp4"

copy "%1.properties" "%~dpn1.mp4.properties" 

C:\Windows\System32\powercfg -change -standby-timeout-ac 10
C:\Windows\System32\powercfg -change -hibernate-timeout-ac 0
C:\Windows\System32\powercfg -change -monitor-timeout-ac 0
John
John appreciate the effort, but there is obviously something wrong on my end. (Removed/added the quote after HandbrakeCLI) and it still will not work. It does dropping a file on it, but in STV it'll say "started" (when I alt tab out there is nothing) and then - again - when I click OK it immediately fails.

If you want to still spend time on this that would be greatly appreciated, but as I can not get this to even open a cmd window, don't think it's worth it anymore - I'll just drag and drop outside STV.
__________________
Core2Duo 3.0, 8gig Memory, Win7 x86, LOTS O' Storage tucked into an Antec Case.
OLD aTI Remote Wonder running RW Keymaster
Sage V9.2.2
2 Sage Clients V9.2.2
2 HD-100 Placeshifters - not connected.
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
External Command Tuner Plugin for Linux stuckless SageTV Linux 36 05-16-2017 03:11 PM
STV Import: External Apps for the Default STV (v4.0.3 18/November/2007) JREkiwi SageTV Customizations 51 03-30-2011 10:47 PM
External BluRay plugin for BDMV on Disc Fuzzy SageTV Customizations 34 05-04-2010 12:50 AM
Plugin to drive random apps on server tedson SageTV Customizations 0 07-13-2009 08:39 PM
External tuner plugin and subchannel jchiso Hardware Support 0 11-30-2005 10:35 PM


All times are GMT -6. The time now is 01:21 PM.


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