Comskip Support Forum

Comskip is a free commercial detector, browse the forum for more information
It is currently Tue Sep 25, 2018 12:32 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Wed Sep 27, 2017 12:33 pm 
Offline

Joined: Wed Sep 27, 2017 12:22 pm
Posts: 5
Hello,

I have managed to install and process ts files with Comskip using this command line:

comskip /volume1/recorded\ tv/test/tv.ts

A tv.txt file is created in the test folder and Kodi 16.3 skips the commercials well.

My issue is that I am unable to find anywhere a command to scan all files within the test folder.

As comskip is running on a Synology NAS (Linux) I am limited with the software I can install and was hoping there is a command like *.ts or *.* that would check for existing txt files and if the txt file doesn't exist it would process the *.ts file.

I am a donator and a keen user of Comskip.

thank you in advance.
Patrik


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 27, 2017 2:46 pm 
Offline
Site Admin

Joined: Sun Aug 21, 2005 3:49 pm
Posts: 3210
you have to use a command script that finds recordings, check if the comskip output files exists and if not, run comskip on the recording.
There are various for various systems but I am not aware of one special for Synology
If it can run sh or csh or something alike its not too complex to build one
I also would expect any recording program to be able to run a command when a recording finishes.
So two option:
Trigger from recording or
discover new recordings on storage


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 28, 2017 12:06 am 
Offline

Joined: Wed Sep 27, 2017 12:22 pm
Posts: 5
Thank you Erik for your prompt and helpful reply.

Have run the below script on my Synology NAS via Scheduled Tasks / User-defined scripts and it processed a test recording (test.ts) creating a test.txt and test.edl file. Tested in Kodi v16 and the commercials were skipped correctly.

but the original question still stands, is there a command/script for comskip to process all videos in a folder which do not have *.txt or *.edl as yet...?

--------------------------------------------------------------------
#!/bin/sh

INPUTVIDEO="/volume1/video/test/test.ts"
COMSKIPPATH="/volume1/@appstore/comskip/bin/comskip"
COMSKIPINI="/volume1/video/test/comskip.ini"

FlagCommercials(){
$COMSKIPPATH --ini=$COMSKIPINI "$INPUTVIDEO"
}

FlagCommercials

--------------------------------------------------------------------


Thanks to Schumi2004 Github & Shermer321 at Kodi Forums

Synology Comskip Download
https://schumi2004.stackstorage.com/s/5tqhtlJo8Lbox6w?dir=

Synology Comskip Instructions
https://github.com/SynoCommunity/spksrc/wiki/Comskip


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 04, 2017 7:55 pm 
Offline

Joined: Wed Sep 27, 2017 12:22 pm
Posts: 5
Hi Erik,

since my last post I have spent much time searching google for a script that:

1. Finds new recorded TV files not yet processed (720p/1080i .ts format) in \volume1\Recorded TV\
2. Processes the new files and creates txt file in \volume1\Recorded TV\

No transcoding or pvr functions are required as DVBlink does all that very well.

The current script I have successfully runs via Scheduled Tasks at 2am but only processes the file I specify - not very practical.... So close yet so far ;)

With your knowledge of comskip and scripts (standard Linux is fine) is there anything you can think of to achieve the above 2 tasks without additional software ?

thanks again
Patrik

Current working script on my Synology NAS:

Code:
#!/bin/sh
INPUTVIDEO="/volume1/video/test/test.ts"
COMSKIPPATH="/volume1/@appstore/comskip/bin/comskip"
COMSKIPINI="/volume1/video/test/comskip.ini"
COMSKIPLOGS="/volume1/video/test/comskip"

FlagCommercials(){
    $COMSKIPPATH --ini=$COMSKIPINI "$INPUTVIDEO"
}

FlagCommercials


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 05, 2017 5:29 pm 
Offline

Joined: Fri Oct 25, 2013 6:39 am
Posts: 10
I have the following script setup that starts transcoding/encoding my comskipped recordings. Hopefully it will give you some ideas.

Code:
#!/bin/bash
if [[ ! -f ${HOME}/tmp/.running ]]; then
    touch ${HOME}/tmp/.running
    for s in ${HOME}/tmp/output/*mac.ts; do
        INPUT="${s}"
        OUTPUT="$(basename ${INPUT} .$(echo ${INPUT##*.})).mp4"
        BASE="$(dirname ${INPUT})/$(basename ${INPUT} .$(echo ${INPUT##*.}))"
        if [[ -f ${BASE}.vprj ]]; then continue; fi
        if [[ -f ${INPUT}.processed ]]; then continue; fi
        ${HOME}/bin/test1.sh -input ${INPUT} -output ${OUTPUT} -sync -tv >${BASE}.encode.log 2>&1
        touch ${INPUT}.processed
    done
    rm ${HOME}/tmp/.running
fi


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 06, 2017 7:30 am 
Offline

Joined: Wed Sep 27, 2017 12:22 pm
Posts: 5
Thanks McGuyver I will look through it and see what I can use... What system are you using it on ?


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 06, 2017 8:03 am 
Offline

Joined: Fri Oct 25, 2013 6:39 am
Posts: 10
triks wrote:
Thanks McGuyver I will look through it and see what I can use... What system are you using it on ?


I'm using it on my main linux system.


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 15, 2017 12:34 am 
Offline

Joined: Wed Sep 27, 2017 12:22 pm
Posts: 5
Still haven't been able to find code to process all files in a directory...

So far the script I have runs perfectly and processes the named file but nowhere can I find code to process an entire directory which is a pity.

Any further pointers or advice is appreciated.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 30, 2018 6:45 pm 
Offline

Joined: Tue Jan 30, 2018 4:12 pm
Posts: 1
triks wrote:
Still haven't been able to find code to process all files in a directory...

So far the script I have runs perfectly and processes the named file but nowhere can I find code to process an entire directory which is a pity.

Any further pointers or advice is appreciated.

Great evening Erik and to other users of Comskip via a Synology NAS,

I've been reading about this topic and about the quote as above, does anyone found out how to complete this script in order process the entire directory, incl subdirectories ?
Anyone who can point us out how to extent the script like mentioned earlier within this topic:

#!/bin/sh
INPUTVIDEO="/volume1/video/test/test.ts"
COMSKIPPATH="/volume1/@appstore/comskip/bin/comskip"
COMSKIPINI="/volume1/video/test/comskip.ini"
COMSKIPLOGS="/volume1/video/test/comskip"

FlagCommercials(){
$COMSKIPPATH --ini=$COMSKIPINI "$INPUTVIDEO"
}

FlagCommercials

Thanks to all for your input.

Mans.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: pungo and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group