EDL/ComSkip discussion

Kodi Community Development

Moderator: TVJunkie198

Post Reply
jhford
Posts: 80
Joined: Mon May 21, 2018 3:56 pm

EDL/ComSkip discussion

Post by jhford » Tue Aug 13, 2019 10:28 am

djp952 wrote:
Sun Aug 11, 2019 8:34 pm
jhford wrote:
Tue Aug 06, 2019 1:41 pm
You're the boss, hug-mate. :oops: But it seems Option One might be an improvement.
I have come around to your line of thinking on this matter and will be making a change to treat everything but "Movies" and "Sporting Events" as if they were "Series". The HDHomeRun DVR engine does not currently place anything else into sub-directories, so it turns out Edit Decision List (EDL) support is also broken for "Specials" and "News". Annoyance coupled with a broken feature is more than enough to make me change my mind :)
I've never used EDL and don't know it's purpose or methodology.

ddejager
Posts: 125
Joined: Tue May 06, 2014 2:26 pm
Location: Glen Arbor, MI

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by ddejager » Tue Aug 13, 2019 11:15 am

Is there any documentation for how to use EDL?

Online
djp952
Posts: 1014
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Tue Aug 13, 2019 4:01 pm

No :) I've had it as a todo for so long it's fallen off the list. I also don't want to get involved with trying to recommend how to set up the necessary bits and pieces to generate the files, it can be one of those "holy war" topics that are best avoided.

But -- it's actually pretty simple in practice. Edit Decision Lists can be used to tell Kodi how you want to edit a video during playback. For a PVR I think it's only real purpose is to cut out commercials. To make it work you need to find some piece of software that can scan the MPG file and generate a "ComSkip" format EDL file that indicates the positions of the video that should be cut out. Here is what the inside of a properly formatted .EDL file that the PVR can use looks like:

Code: Select all

172.06	306.82	0
686.57	911.48	0
1386.30	1566.98	0
1952.18	2012.94	0
If you turn on EDL in the PVR, it will look for a file with the exact same name as the .MPG file in the same directory. So you have to configure the DVR so that the HDHomeRun share is visible to Kodi (typically going to be an SMB share), and tell the PVR where that share is. If the PVR finds the file, it will load it and pass that information onto Kodi. Adding the share into Kodi is non-intuitive, you need to go into someplace like Videos and "Add Network Location..." first, then it will be selectable in the PVR options.

I don't personally like EDL in Kodi and don't use it myself other than occasionally testing the feature. Kodi 18 has a bug of some kind with CUT indicators so I added an option to implicitly change those to COMSKIP instead. COMSKIP works a bit differently than you might intuitively expect, but it does work.

I also have an option in there to flatten the EDL hierarchy; what this means is that instead of expecting the .EDL file to be in the same directory as the .MPG, you can put all the .EDL files into one directory. The file name still needs to match the .MPG, though. My experience with the toolset I chose to use when testing always missed the start and end of the commercials by a reliable amount so I added options where you can add implicit padding to the values before they are reported to Kodi.

Given that we are on SiliconDust's forum here I really don't want to go into details about setting up such a thing since EDL is undoubtedly going to be used to bypass commercials and I don't know how SD feels about that. It wouldn't be cool of me regardless (and as mentioned, I don't want to start a holy war over which software works best). So while I won't be providing any links to additional information, I'm sure a quick Google search or two would help answer the "how to" portion if you are interested. Hope you understand, I may have already gone too far by posting a sample .EDL file up there :D

jasonl
Silicondust
Posts: 14749
Joined: Sun Oct 28, 2007 9:23 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by jasonl » Tue Aug 13, 2019 4:26 pm

No issues on our side if you want to share other ways for people to enhance the use of their HDHomeRun, though I would suggest any further discussion take place as a new thread rather than derailing this one. If there is interest in further discussion I can split these last few posts off into a separate thread.

ddejager
Posts: 125
Joined: Tue May 06, 2014 2:26 pm
Location: Glen Arbor, MI

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by ddejager » Tue Aug 13, 2019 5:56 pm

Personally I'd love to try out the automated comskip and would like to discuss options a bit more if @djp952 is willing and has a bit of time to do so. I do know how to set up and use a share in Kodi as I've done so for other Kodi add-ons for my photo library. I also don't want any "wars" but I would be interested in people's views on the pros/cons of various comskip options in a different thread.

usafle
Posts: 49
Joined: Sun Sep 17, 2017 5:51 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by usafle » Tue Aug 13, 2019 6:04 pm

I'd like to +1 about comskip info. I've seen it discussed, but never had the geek knowledge to figure out how to do it. I also see some sort of Docker that runs in UnRaid that converts .ts files to .mp4 automatically after a recording takes place, but I don't know why someone would want to do that either lol

Online
djp952
Posts: 1014
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Tue Aug 13, 2019 6:07 pm

Works for me! Thank you for the offer Jason, let's do it!

jasonl
Silicondust
Posts: 14749
Joined: Sun Oct 28, 2007 9:23 pm

Re: EDL/ComSkip discussion

Post by jasonl » Tue Aug 13, 2019 6:08 pm

Done.

Ken.F
Posts: 2175
Joined: Fri Apr 05, 2013 9:20 am
Device ID: 1041A706, 1043EB32, 104BAD9E, 13168DC5, 1322A7AC
Location: West Rockhill, PA

Re: EDL/ComSkip discussion

Post by Ken.F » Tue Aug 13, 2019 6:14 pm

Thanks for splitting this off. I've used comskip .txt files with Kodi to skip commercials in the regular libraries but I never could get any kind of comskip output files files to work with the PVR. I'm pretty sure I had my edl directory configured correctly in the PVR client.

usafle
Posts: 49
Joined: Sun Sep 17, 2017 5:51 pm

Re: EDL/ComSkip discussion

Post by usafle » Tue Aug 13, 2019 6:15 pm

Jason's the MAN! Not only did he purge the other thread, he put all the related discussion in here! Impressive!

Online
djp952
Posts: 1014
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: EDL/ComSkip discussion

Post by djp952 » Tue Aug 13, 2019 8:04 pm

Ken.F wrote:
Tue Aug 13, 2019 6:14 pm
Thanks for splitting this off. I've used comskip .txt files with Kodi to skip commercials in the regular libraries but I never could get any kind of comskip output files files to work with the PVR. I'm pretty sure I had my edl directory configured correctly in the PVR client.
The PVR code is pretty finicky about finding the files.

What I do is reconstruct what the .MPG file name would be based on the metadata provided by the DVR engine (my logic may not be infallible here), then replace the .MPG extension with .EDL and see if it can be found. I log whether or not the file was found and what path it was looking for in the Kodi log. If you want to find out what the issue is, if you turn EDL back on and post the log (snippet?) it's most likely going to be that what the PVR decided to look for isn't correct.

EDL is an ill-supported feature on my part (guilty as charged), but it definitely does work if the stars align properly :)

Ken.F
Posts: 2175
Joined: Fri Apr 05, 2013 9:20 am
Device ID: 1041A706, 1043EB32, 104BAD9E, 13168DC5, 1322A7AC
Location: West Rockhill, PA

Re: EDL/ComSkip discussion

Post by Ken.F » Tue Aug 13, 2019 8:20 pm

djp952 wrote:
Tue Aug 13, 2019 8:04 pm
What I do is reconstruct what the .MPG file name would be based on the metadata provided by the DVR engine (my logic may not be infallible here), then replace the .MPG extension with .EDL and see if it can be found.
That might be it. My files get re-named before I run comskip on them so the .edl files would be different than the original recording file name. I'll have to play around with it this week and see if I can get it working.

Online
djp952
Posts: 1014
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Tue Aug 13, 2019 8:23 pm

ddejager wrote:
Tue Aug 13, 2019 5:56 pm
Personally I'd love to try out the automated comskip and would like to discuss options a bit more if @djp952 is willing and has a bit of time to do so. I do know how to set up and use a share in Kodi as I've done so for other Kodi add-ons for my photo library. I also don't want any "wars" but I would be interested in people's views on the pros/cons of various comskip options in a different thread.
I've used both MCEBuddy and comskip for this to date, but in regard to testing the PVR feature itself I used straight up comskip (http://www.comskip.org/). I never set up any services/daemons to automatically do it, so I'm rather useless in that regard, but I can share my experience with comskip.

It was easy enough to send a path into the comskip engine and generate the .edl file for a recording (again I've only done this manually to date). Manually copying that file to the same folder as the .MPG file lives and making sure I had set "Report CUT indicators as COMBREAK indicators" in the PVR options, I had acceptable results. My complaint would be that it just wasn't accurate enough. My expectation would have been a more precise CUT when the program switched into and out of a commercial break, but it was pretty close. Other engines may do a better job finding the right millisecond. For me, it's been easier to just skip the commercials manually during playback rather than setting something up to scan all those MPEG files and generate the EDL realtime.

I think it's important for everyone to know that unless something changes on the Kodi 18 "Leia" side of the house, you really want to enable "Report CUT indicators as COMBREAK indicators" in the PVR configuration options. "CUT" is what you probably want, but it just doesn't work right in Leia. IIRC it does work properly in Krypton.

Online
djp952
Posts: 1014
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: EDL/ComSkip discussion

Post by djp952 » Tue Aug 13, 2019 8:24 pm

Ken.F wrote:
Tue Aug 13, 2019 8:20 pm
djp952 wrote:
Tue Aug 13, 2019 8:04 pm
What I do is reconstruct what the .MPG file name would be based on the metadata provided by the DVR engine (my logic may not be infallible here), then replace the .MPG extension with .EDL and see if it can be found.
That might be it. My files get re-named before I run comskip on them so the .edl files would be different than the original recording file name. I'll have to play around with it this week and see if I can get it working.
Let me know if the logic involved with generating that file name would be helpful. To date it seems to work, but again it may not be infallible. Not many people have ventured into enabling EDL.

CLorox
Posts: 35
Joined: Thu Sep 01, 2011 8:50 am
Device ID: 13107370,131A76C0
Location: MA

Re: EDL/ComSkip discussion

Post by CLorox » Thu Aug 29, 2019 3:30 pm

I miss comskip and haven’t had it reliably working well for family since SageTV and WMC as a Kodi backend.

Is the HDHomeRun non-Kodi / native app honoring edl files from comskip if they are in the same directory as the DVR video files?

Can it (enhancement request?).

Post Reply