Kodi doesn't read comskip txt/EDL files
#16
Currently vnsi only supports vdr marks
Reply
#17
Not to doubt about vdr marks support with vnsi.

But username145 did mentioned that he was able to skip commercial with comskip txt using file manager? I suppose it's another mechanism.

username145 please chime in and let us know how:
1) you setup the nextscene button?
2) did you get kodi to read comskip txt?
Reply
#18
(2015-08-11, 15:40)whoisterencelee Wrote: Not to doubt about vdr marks support with vnsi.

But username145 did mentioned that he was able to skip commercial with comskip txt using file manager? I suppose it's another mechanism.

username145 please chime in and let us know how:
1) you setup the nextscene button?
2) did you get kodi to read comskip txt?

1. I bound the button on my remote to it through keyboard.xml. An easier way to do this would be with this: http://kodi.wiki/view/Add-on:Keymap_Editor
2. I never got it to read regular txt files through the recordings interface. I ended up setting comskip's output to '"vdr" and writing a crummy python script that runs comskip on any new recordings, then goes in and renames the relevant .vdr files to simply "marks". Kodi picks those up and it works great.
Reply
#19
Thanks username145.

In reply:
1) I tried the Keymap_Editor before; and NextScene cannot be set there, I looked deeper and found that the addon source no longer lets you set NextScene, see line 217

I suppose we have to set it with keyboard.xml , which is a little more difficult on an android set-top box , I will try to do it with adb push keyboard.xml

2) didn't see where you can set comskip output to vdr:
Code:
Comskip 0.81.077, made using avcodec
Public build
The commandline used was:
Z:\home\terence\comskip\wine\comskip.exe

Usage:
  comskip  [-h|--help] [-w|--debugwindow] [-n|--playnice] [--zpcut] [--zpchapter] [--videoredo] [--videoredo3] [--csvout] [--quality] [--plist] [-m|--demux] [-p|--pid=<string>] [-t|--ts] [-d|--detectmethod=<int>] [-v|--verbose=<int>] [-u|--dump=<int>] [-s|--play] [--timing] [-q|--quiet] [--ini=<file>] [--logo=<file>] [--cut=<file>] [--output=<file>] [--selftest=<int>] <file> [<file>]

  -h, --help                Display syntax
  -w, --debugwindow         Show debug window
  -n, --playnice            Slows detection down
  --zpcut                   Outputs a ZoomPlayer cutlist
  --zpchapter               Outputs a ZoomPlayer chapter file
  --videoredo               Outputs a VideoRedo cutlist
  --videoredo3              Outputs a VideoRedo3 cutlist
  --csvout                  Outputs a csv of the frame array
  --quality                 Outputs a csv of false detection segments
  --plist                   Outputs a mac-style plist for addition to an EyeTV archive as the 'markers' property
  -m, --demux               Demux the input into elementary streams
  -p, --pid=<string>        The PID of the video in the TS
  -t, --ts                  The input file is a Transport Stream
  -d, --detectmethod=<int>  An integer sum of the detection methods to use
  -v, --verbose=<int>       Verbose level
  -u, --dump=<int>          Dump the cutscene at this frame number
  -s, --play                Play the video
  --timing                  Dump the timing into a file
  -q, --quiet               Not output logging to the console window
  --ini=<file>              Ini file to use
  --logo=<file>             Logo file to use
  --cut=<file>              CutScene file to use
  --output=<file>           Folder to use for all output files
  --selftest=<int>          Execute a selftest
  <file>                    Input file
  <file>                    Output folder for cutlist

Also, any chance you can save me a little bit of time and share the py script?
Reply
#20
Set output_vdr=1 in your comskip.ini

Script will scan the specified folder and subfolders for recordings, and run comskip on any TS file that does not have a corresponding .log file (and therefore has not been processed by comskip). Also makes sure to only process files that have not been modified in the last 2 minutes, so that it ignores in-progress recordings. It's probably a horrible way of doing things, but I wrote it ages ago via google and copy/paste, and it still works for me:

Code:
import os
import subprocess
import time  
program = 'C:\Program Files (x86)\Comskip\comskip.exe'
batch = 'C:\Program Files (x86)\Comskip\comskiprename.bat'
# subextract = 'C:\Program Files (x86)\Comskip\ccextractorwin.exe'


listofiles = [os.path.join(dp, f) for dp, dn, fn in os.walk(os.path.expanduser("P:")) for f in fn]

textfiles = '.log'
tsfiles = '.ts'
listoftxt = []
listofts = []
replacedtxt = []
realfinallist = []

for entry in listofiles:
    if textfiles in entry:
        listoftxt.append(entry)
    elif tsfiles in entry:
        listofts.append(entry)


for item in listoftxt:
    replacedtxt.append(item.replace(".log", ".ts"))
  
    
finallist = [item for item in listofts if item not in replacedtxt]

currenttime = time.time()

for entry in finallist:
    statstime = os.stat(entry)
    modifiedtime = statstime.st_mtime
    if currenttime - modifiedtime > 120:
        realfinallist.append(entry)

print '----------------THESE FILES WILL BE PROCESSED-----------------'    
for entry in realfinallist:
    print entry
print '--------------------------------------------------------------'


for item in realfinallist:
    subprocess.call([program, item])


    
print 'And renaming...'
subprocess.call([batch])
print 'Done!'    
print '----------------THESE FILES WERE NEWLY PROCESSED-----------------'    
for entry in realfinallist:
    print entry

And the batch file for renaming to marks, which could easily be incorporated into the python script, don't know why I didn't do it:

Code:
P:
for /r %%x in (*.vdr) do ren "%%x" marks
Reply
#21
output_vdr=1 in comskip.ini does create the .vdr file, and renamed it to "marks" in the same directory as the .ts recording. But when I play the recording from Main Menu > VIDEOS > Files > Samba Share and press the relevant nextscene key during playback... nothing

I modified key editor addon script so that I can set the next scene key:
/data/media/0/Android/data/com.semperpax.spmc/files/.spmc/addons/script.keymap/actions.py
Code:
...
  ["Playback", [                                                                                                                                                                                                                                                                                  
    "nextscene"         , "NEXT_SCENE",
    "play"              , "Play",
...

which generates the following when I set the key in the addon:

/data/media/0/Android/data/com.semperpax.spmc/files/.spmc/userdata/gen.xml
Code:
<keymap><fullscreenvideo><keyboard><key id="61472">nextscene</key></keyboard></fullscreenvideo></keymap>


1) How does your keyboard.xml look, especially the part with the Next Scene?
2) Do you play the video file just like I did?

Debug log doesn't seem to show it read the "marks" file?
Reply
#22
The relevant part:

Code:
<FullscreenVideo>
    <keyboard>
      <key id="221">PreviousScene</key>
      <key id="223">NextScene</key>

I play recordings through Kodi's proper "recordings" window, not the file manager. If you are using the file manager, comskip's default txt output works fine, you don't need to set output to vdr or do any renaming etc. At least, that was the case when I had tried it.
Reply
#23
OK, I got it working on a desktop. Will try it on the android box tonight.

Here are some non-intuitive things I had to figure out, using the file manager method username145 mentioned Video>Files>... with comskip txt:

1) Unicode .ts file with corresponding comskip .txt file doesn't work (I had to soft link the .ts and .txt to something like test.ts test.txt)

2) Had to use addon keymap editor with some modification to get the NextScene button working, see previous msg about modifying "actions.py".

3) Goto Settings > addon > Program Addon > keymap editor > launch > edit > Full Screen Video > Playback > Next Scene > set the key > escape out > Save

4) Video > Files > ... ts file, start the video

Here is the silly part that took me a while to figure out, say I set "space" as the Next Scene key:

5) The video must be in full screen mode (this means no menu, no seek bar, no mini seek bar, etc..), just full screen video playing.

Press "space", wait... I think there is a 5 sec wait for the first skip because this is when the txt file is read

Skip happens.

Then seek bar is now showing, so pressing "space" for next scene will not work, need to "esc" out of the menu and back into full screen video.
Reply
#24
It's working on Android as well, same procedures.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi doesn't read comskip txt/EDL files0