![]() |
|
SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Video Conversion Time Limits
I'm starting to play around with the Video Conversions built into Sage - is there a way to have them only run at certain hours?
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient |
#2
|
|||
|
|||
My advice is to use SJQ to kick off your own transcoding jobs and use whatever software you like, such as Handbrake.
__________________
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 |
#3
|
||||
|
||||
I thought SJQ was abandoned? I used it years ago for distributed comskip processing. Is there a V9 compatible version?
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient |
#4
|
|||
|
|||
Slugger has stopped supporting it as he no longer uses Sage but it still works in V9. I have just installed it and started to get a few of my jobs converted to work on my new unRAID server.
I have a job that runs when recordings are done. If the genre indicates that it is a childrens show then the show is transcoded to H.264/MP4 via Handbrake and moved to a Videos\Kids' Shows\Show Title folder. With Handbrake and the right CPU you could also use Intel QuickSync to speed up the process.
__________________
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 |
#5
|
|||
|
|||
Quote:
![]() ![]()
__________________
Home Network: https://karylstein.com/technology.html |
#6
|
|||
|
|||
What do you mean by web plugin? Do you mean the additional SJQ menu item that shows up on the regular web UI?
I have that working via a manual process where you move a sjq.groovy file to a specific folder for the webserver. But you don't really even need that as you can do the rest of the stuff via the Sage UI in the additional menu item it creates under Settings. That is just useful to keep an eye on your queue.
__________________
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 |
#7
|
|||
|
|||
Quote:
__________________
Home Network: https://karylstein.com/technology.html |
#8
|
|||
|
|||
You can create tasks in the SageTV UI. I did it two days ago.
__________________
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 |
#9
|
|||
|
|||
Oh, you have to drill down into the clients. Is an edit task buried in there somewhere too?
![]()
__________________
Home Network: https://karylstein.com/technology.html |
#10
|
|||
|
|||
I think it is when you click on the specific clients. It may also show the number of current tasks - click on that and then you can see and edit them or create new tasks. I can't do it right now as I set up a new router last night but I don't have OpenVPN working yet so I can't access it right now.
__________________
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 |
#11
|
||||
|
||||
You can also directly edit the ini files, but it's more of a pain to follow because they are not written in a human logical order.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG |
#12
|
||||
|
||||
wayner - can you give me an example of the scripts / etc you use for your 'shrink the kids show' SJQ task?
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient |
#13
|
|||
|
|||
I actually posted it five years ago here but since then it has been somewhat improved although I rarely look at it. Shockingly for me the code is reasonably well documented. I grew up programming on a Commodore VIC-20 with 3.5KB of memory so you didn't waste bytes on comments.
This file calls a file called rename.groovy that hasn't changed since the old post in 2012. You may want to change the Handbrake parameters to whatever you like - you can just set things up in the Handbrake GUI and then the log will show you the command that it uses. You can copy this to use as the basis for your own set of parameters. That is in the line HBParams=... Beware that this code deletes the original recording file. You might want to comment out that line (the third last line) until you are happy with how things work. Code:
/* Outstanding tasks Check out cropping options */ import org.apache.commons.io.FileUtils import static groovy.io.FileType.* import java.text.SimpleDateFormat ComskipPath="C:\\comskip\\comskip.exe" //Put your comskip path here CSParams=" --verbose=0 " //Change to 1 or higher if you want output from comskip HBCLIPath='"C:\\Program Files\\Handbrake\\HandBrakeCLI.exe"' def LogFile= new File("c:\\temp\\ProcKidsShows.log") FileID= Integer.parseInt(SJQ4_METADATA.get("SJQ4_ID")) mf = MediaFileAPI.GetMediaFileForID(FileID) NumSegs=MediaFileAPI.GetNumberOfSegments(mf) Width= MediaFileAPI.GetMediaFileMetadata(mf ,"Format.Video.Width").toInteger() //This is needed as a Handbrake parameter RetName ="New file name to be returned" DestFolder="\\\\carnoustie\\videos\\Isabella's Shows\\" ShowTempName= ShowAPI.GetShowTitle(mf) ShowName=ShowTempName.replaceAll(":|\\*|\\?","_") //======================Handbrake Parameters======================================= //These paramters are for CPUs that don't have Quick Sync //HBParams=" -f mp4 -4 --deinterlace=fast -w "+Width+" --loose-anamorphic -e x264 -q 23 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0 --gain=0 --audio-copy-mask none --audio-fallback ffac3 " //These parameters are for Intel QuickSync encoding on capable CPUs HBParams=' -f mp4 --deinterlace="qsv" -w '+Width+' --loose-anamorphic -e qsv_h264 -q 24 -r 29.97 --cfr -a 1 -E av_aac -6 dpl2 -R Auto -B 112 -D 0 --gain 0 --audio-fallback ac3 --qsv-preset=balanced --h264-level="4.0" --h264-profile=main -verbosity 0' //End of Handbrake Params section=================================================== run (new File("c:\\GroovyFiles\\Temp\\rename1.groovy")) //this routine finds the new filename which is return as RetName SourceFile= MediaFileAPI.GetFileForSegment(mf, 0) SourceFileName=SourceFile.toString() SourceFileExt=SourceFileName.substring(SourceFileName.lastIndexOf('.')+1, SourceFileName.size()) LogFile.append("======================================================================================\r\n") LogFile.append("${new Date()} Log File for MediaFile $SourceFileName\r\n") LogFile.append("Extension for Source File is $SourceFileExt\r\n") LogFile.append("File width is $Width\r\n") //Check to see if Destination folder for show exists, if not, create it DestShowFolder=new File(DestFolder+ShowName) DFExists= DestShowFolder.exists() LogFile.append("Destination folder does exists? $DFExists\r\n") if (!DFExists) { LogFile.append("Destination folder does not exist so I will create it\r\n") DestShowFolder.mkdir() } DestFileName=DestFolder+ShowName+"\\"+RetName FilePrefix = DestFileName.substring(0, DestFileName.lastIndexOf('.')) FileType= DestFileName.substring(DestFileName.lastIndexOf('.')+1, DestFileName.size()) LogFile.append("File is $FileType file\r\n") if (SourceFileExt =="mp4") { LogFile.append("File is mp4 so I don't have anything to do!!!\r\n") return 0 } if (NumSegs > 1) { LogFile.append("File has more than one segment so I am aborting the process!!!\r\n") return 2 } DestFile = new File(DestFileName) //LogFile.append("Moving $SourceFileName to $DestFileName\r\n") //FileUtils.moveFile( SourceFile, DestFile) // This next section calls Comskip // It is commented out so I don't need this on kids shows, to reactivate it uncomment the next 11 or so lines InputCSFile=DestFileName def initialSize = 8192 /*CSProc=ComskipPath+CSParams+'"'+InputCSFile+'"' println (CSProc) def outStream = new ByteArrayOutputStream(initialSize) def errStream = new ByteArrayOutputStream(initialSize) def command=CSProc LogFile.append("${new Date()} Running Comskip with command $CSProc\r\n") def proc=command.execute() proc.consumeProcessOutput(outStream, errStream) proc.waitFor() LogFile.append("${new Date()} Comskip is done\r\n") */ //This next section calls Handbrake InputVidFile=SourceFileName //DestFileName is what it used to be but I no longer move the file first. OutputVidFile=FilePrefix+".mp4" HBProc=HBCLIPath+" -i "+'"'+InputVidFile+'"'+" -o "+'"'+OutputVidFile+'"'+HBParams outStream = new ByteArrayOutputStream(initialSize) errStream = new ByteArrayOutputStream(initialSize) LogFile.append("${new Date()} Running Handbrake with command $HBProc\r\n") def HBcommand=HBProc def HBproc=HBcommand.execute() HBproc.consumeProcessOutput(outStream, errStream) HBproc.waitFor() LogFile.append("${new Date()} Handbrake is finished\r\n") //LogFile.append("${new Date()} Handbrake output is $outStream\r\n") Uncomment this line and the next to troubleshoot Handbrake problems //LogFile.append("${new Date()} Handbrake error output is $errStream\r\n") FinalFile=new File(OutputVidFile) //The Section below changes the timestamp of the new file to be the same as the original file SourceTime=SourceFile.lastModified() String TSTime = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a").format(SourceTime) LogFile.append("${new Date()} Resetting timestamp of $OutputVidFile to timestamp of $SourceFileName which is $TSTime\r\n") LogFile.append("${new Date()} The original file timestamp is $SourceTime\r\n") FinalFile.setLastModified(SourceTime) //The two lines below are to reinit the variables as they seem to expire after three minutes FileID= Integer.parseInt(SJQ4_METADATA.get("SJQ4_ID")) mf = MediaFileAPI.GetMediaFileForID(FileID) DestDeleted=MediaFileAPI.DeleteFile(mf) LogFile.append("${new Date()} File $SourceFileName is deleted? $DestDeleted\r\n") LogFile.append("${new Date()} Process is now complete\r\n")
__________________
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 |
#14
|
|||
|
|||
Quote:
Mine was Commodore 64 but my favorite was the Commodore 128. Still have mine in basement and was working last I tried.
__________________
"Keep your goals away from the trolls" |
#15
|
|||
|
|||
The progress in some things is pretty remarkable. My unRAID server has 24GB of memory or more than 7,000,000 X the memory of that VIC-20.
__________________
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 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Video conversion | BBCritical | General Discussion | 3 | 08-03-2011 01:41 PM |
HD Video Conversion Problems in V7 | Ted@TNT | SageTV Software | 1 | 01-27-2011 09:21 AM |
PSP Video Conversion | Deadbolt | SageTV Software | 7 | 12-26-2006 06:40 PM |
Video Conversion options? | spacecadet | SageTV Beta Test Software | 4 | 11-28-2006 08:54 PM |