scott46953 12 Posted February 29 Share Posted February 29 I use comskip on all my recordings, the issue is... when recording 3,4,5,6 or more shows at once that end all at the same stop time. it sends them all at once to comskip, not to bad if using a very fast SSD, but even the fastest drives start to get over tasked. On any of my normal HHD's any more then 2 comskip's at once is too much maxing out the live tv drive... This then causes buffering and stalls on whatever programs that is being watched, and does not matter if the watch program is one that was being recorded. So I contacted comskip forums and asked about a que to slow down the tasks so they can go in order. I see only 1 needed to be comskip at a time and is much faster then running 8 comskips on the same drive... comskip forums says that they do not and do not plan on doing a que and that they program sending the work to comskip is supposed to do the task of que. So the question is, can emby add a que for this task? or is the question/task for the plugin for comskip? Dont want to buffer my shows, and i surely do not want to deal with failing HHDs, but i do want the comskip. I'm kinda stuck on this one unless someone knows how to build a batch for que that works with comskip... Link to comment Share on other sites More sharing options...
reneboulard 32 Posted February 29 Share Posted February 29 Have your postprocessing script create a lock file. Check if a lock file exist before starting comskip once the postprocessing script is done, erase the lock file so another postprocessing script can start. work for me I can send you an example in bash. Link to comment Share on other sites More sharing options...
reneboulard 32 Posted February 29 Share Posted February 29 This is what I use in bash #!/bin/bash TMPFOLDER="/var/lib/emby/transcoding-temp" LOCKFILE="$TMPFOLDER/lock.txt" # Temporary File for blocking simultaneous scripts from starting log_message() { # Function. Parameter 1 message to log echo $(date +"%Y-%m-%d%t%H:%M:%S") : ${1} >> /var/lib/emby/logs/media.txt } checklockfile() { # Wait for any other post-processing scripts to complete before starting r=$(( $RANDOM % 100 + 40 )); sleep $r if ls "$LOCKFILE" 1> /dev/null 2>&1; then log_message "Looks like there is another scripting running. Waiting." fi while [ true ] ; do if ls "$LOCKFILE" 1> /dev/null 2>&1; then sleep 60 else log_message "It looks like no script running so let go." break fi done } checklockfile # Wait for any other post-processing scripts to complete before starting touch $LOCKFILE # Create the lock file MYPID=$$ # Process ID for current script # Adjust niceness of CPU priority for the current process renice 19 $MYPID comskip --ini="/usr/local/sbin/comskip.ini" "$1" if [ -f "$LOCKFILE" ]; then rm -f "$LOCKFILE" # Make sure lock files is removed, just in case there was an error somewhere in the script." fi Link to comment Share on other sites More sharing options...
scott46953 12 Posted February 29 Author Share Posted February 29 I just glanced at your code, however this is a file called postprocessing.bat?? Right now in emby post processing it opens recordings compskip.bat. Are you saying I take that off and replace it with post-processing.bat? Link to comment Share on other sites More sharing options...
TMCsw 123 Posted March 1 Share Posted March 1 Hey, @scott46953Since emby does not (yet) support ‘comskip’ or ComSkipper(it’s a awesome 3rd party plugin) I doubt they would create/support such a queuing system for such (at least for now). @reneboulard gave you a bash script(linux) , that won’t work on windows(okay maybe on WSL2)… but there are many ways to do the same in Winblows (Google it). Or You could try installing the Scripter-X plugin (from the plugin catalog) and run comskip from the ‘onLiveTVRecordingStart’ event. Set it up something like this (prepend drive:path if required to Run, if required). !! Make sure you remove your ‘Post-processing application’ setting or you will run it twice !! You will need to add this line to your comskip.ini. live_tv=1 ; set to 1 if you use parallelprocessing and need the output while recording This will make comskip start running just after the recording starts and run slowly as it waits for the recording to progress. It should dramatically reduce the CPU/IO load that comskip uses as a post-process surge you are seeing as it is spread out thru the recording. As an added bonus it will be completed shortly after the recording is done. Link to comment Share on other sites More sharing options...
scott46953 12 Posted March 1 Author Share Posted March 1 TMCsw, I like that way much better... I already have live TV equals one in the comskip.ini But never seen it do anything, but now I think I'm understanding why. I need to remove my comskip from live TV setting, install the scripture x plugin, and you're saying I can Google information on this and get more detailed instructions? Just to make sure I get the right thing in the scripture x plugin... I think I got it, I will post back after I give it a shot tomorrow.. thank you so much Link to comment Share on other sites More sharing options...
scott46953 12 Posted March 1 Author Share Posted March 1 Installed scripterX plugin, but when I open the option the page is blank, and i am greeted with only a text of... Please Note: there is a known issue where after you install a package you are required to reload the packages page for the new package information to show properly. This issue will be addressed shortly. on the packages tab... So maybe I need to give it some time to load,,, I will come back to this soon as I can get it to load. Link to comment Share on other sites More sharing options...
TMCsw 123 Posted March 1 Share Posted March 1 I think you will need to wait for the author of scripterX to fix this... ...you can fallow-along/post-your-problems here: Link to comment Share on other sites More sharing options...
scott46953 12 Posted March 6 Author Share Posted March 6 I just noticed, it says Windows 10, but I am on the latest Windows 11 23H2 22631.3235 Windows Feature Experience Pack 1000.22687.1000.0 Link to comment Share on other sites More sharing options...
scott46953 12 Posted April 12 Author Share Posted April 12 On 2/29/2024 at 8:51 PM, TMCsw said: Hey, @scott46953Since emby does not (yet) support ‘comskip’ or ComSkipper(it’s a awesome 3rd party plugin) I doubt they would create/support such a queuing system for such (at least for now). @reneboulard gave you a bash script(linux) , that won’t work on windows(okay maybe on WSL2)… but there are many ways to do the same in Winblows (Google it). Or You could try installing the Scripter-X plugin (from the plugin catalog) and run comskip from the ‘onLiveTVRecordingStart’ event. Set it up something like this (prepend drive:path if required to Run, if required). !! Make sure you remove your ‘Post-processing application’ setting or you will run it twice !! You will need to add this line to your comskip.ini. live_tv=1 ; set to 1 if you use parallelprocessing and need the output while recording This will make comskip start running just after the recording starts and run slowly as it waits for the recording to progress. It should dramatically reduce the CPU/IO load that comskip uses as a post-process surge you are seeing as it is spread out thru the recording. As an added bonus it will be completed shortly after the recording is done. I finally get to try scripter X after installing the beta... I am a little confused on the setting in scripter x shouldnt it be Run "C:\Comskip\commskipRecordings.bat" or Run C:\Comskip\commskipRecordings.bat or does the "" not make any differance? also commskipRecordings.bat was the batch file I used previsiously after the recording ended emby would run it. Do I need to change this batch file to something differant or just run the same batch file? Also setting #2 "%recording.path%" is that what is entered in this variable? or do i actually put the path of the recordings? Emby says this in the recordings screen........ The following variables are supported in the command line to allow passing data to your post-processor {path}: The full path to the new recording file So shouldn't the second line say "{path}" so it changes whenever it is changed, if it ever does, in the emby settings? and of course using command CMD is obvious. maybe there is documentation on this somewhere that can be linked on this thread, not just for me, but for anyone in the future that may need it. Link to comment Share on other sites More sharing options...
scott46953 12 Posted April 12 Author Share Posted April 12 (edited) So my current issue is... I am using windows 11 and the comskip Live-processing instructions and emby_preprocessing.sh is programmed in linux Is the emby_preprocessing.sh a simlar file as my commskipRecordings.bat? never mind. Just have to download new comskipper plugin, uninstall the old comskipper plugin inside emby... install new comskipper DLL file in emby plugin folder. The instructions for all of the live com skipping is in the PDF file included with the plugin Edited April 12 by scott46953 Link to comment Share on other sites More sharing options...
TMCsw 123 Posted April 12 Share Posted April 12 Your close... ...For the "C:\Comskip\commskipRecordings.bat" the quotes are optional but would be required if the path\filename have any space(s) anywhere in them (it’s good practice to always quote them anyway). You can use the same .bat as you have for ‘Post-processing application’ as long as the comskip.ini file has the line live_tv=1 in it. The "%recording.path%" is correct for scripterx and MUST be quoted “” . As for the documentation the only place I know of is buried in the commskipper and scripterx threads. Link to comment Share on other sites More sharing options...
scott46953 12 Posted April 12 Author Share Posted April 12 (edited) The commercial skipper plugin does not specify to use the previous batch file, it says to use the comskip EXE.. However, I think that I would prefer the batch file, so that it would include the option specified.. including deleting files that are no longer needed.. I'm just trying to figure out if there's any other differences between running the batch file that it says to create or running it straight like it says in the documentation. I did forget to include the reason for the uninstall plug-in, and reinstallation is because the plug-in maker says inversion emby 4.8 the plug-in no longer works.. so reinstallation is required Edited April 12 by scott46953 Link to comment Share on other sites More sharing options...
TMCsw 123 Posted April 12 Share Posted April 12 You can doit either way it’s up to you but a .bat let’s you do more things… Is it working? When testing you only need to record a few seconds to see if comskip gets launched. Link to comment Share on other sites More sharing options...
scott46953 12 Posted April 12 Author Share Posted April 12 Yes come skip is working, task manager says it comes on when a recording starts, I also seen an edl file, before leaving the desk, 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now