Comskip with HDhomerun DVR

Help and support with third-party TV software.
Windows Media Center, J River Media Center, Next PVR, MythTV, InstaTV, etc.
Deihmos
Posts: 58
Joined: Sun Jul 08, 2012 9:25 pm

Comskip with HDhomerun DVR

Post by Deihmos » Thu May 16, 2019 3:05 pm

I have HDhomerun DVR on a Linux server and I am looking for a way to use comskip. Has anyone done this? I use the HDhomerun app for recording and would like to setup comskip to monitor the folder then strip commercials. I can't seem to find a solution.

techpro2004
Posts: 601
Joined: Tue Oct 06, 2015 1:25 pm

Re: Comskip with HDhomerun DVR

Post by techpro2004 » Thu May 16, 2019 7:25 pm

The only way that I know of to do this is with the donator version of mcebuddy. Unfortunately, this is windows only. A lot of things have to be correct in order for the dvr to play the shortened file such as metadata, codec, container and extension.

NedS
Silicondust
Posts: 381
Joined: Mon Dec 10, 2018 12:38 pm

Re: Comskip with HDhomerun DVR

Post by NedS » Thu May 16, 2019 11:43 pm

I've been eyeballing setting this up when I have some time: https://github.com/erikkaashoek/Comskip

techpro2004
Posts: 601
Joined: Tue Oct 06, 2015 1:25 pm

Re: Comskip with HDhomerun DVR

Post by techpro2004 » Fri May 17, 2019 7:55 am

NedS: That will only output a file saying where in the recording the commercials are. It will not remove the commercials from the recordings and the hdhomerun dvr can not read those files to skip over the commercials automatically. The only solution is to use mcebuddy.

rpcameron
Posts: 845
Joined: Fri Mar 25, 2016 9:55 am

Re: Comskip with HDhomerun DVR

Post by rpcameron » Fri May 17, 2019 8:09 am

techpro2004 wrote:
Fri May 17, 2019 7:55 am
NedS: That will only output a file saying where in the recording the commercials are. It will not remove the commercials from the recordings and the hdhomerun dvr can not read those files to skip over the commercials automatically. The only solution is to use mcebuddy.
Not quite. Comskip can also out a variety of files, including for VideoReDo and Ffmpeg. I know when using the Ffmpeg output option, you can use it to automatically insert chapter marks into your MP4 or MKV containers; you could also probably use it cut the commercials and repackage it as MPEG-TS, but you may run into issues because SD's DVR adds extra header information into their TS that slightly differs from the raw stream.

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

Re: Comskip with HDhomerun DVR

Post by Ken.F » Fri May 17, 2019 8:59 am

Comskip can output .txt files that Kodi can use for automatic commercial skipping. I personally don't trust Comskip enough to use it for making permanent cuts. I use VideoReDo on Windows or Avidemux on Linux to edit my keepers.

NedS
Silicondust
Posts: 381
Joined: Mon Dec 10, 2018 12:38 pm

Re: Comskip with HDhomerun DVR

Post by NedS » Fri May 17, 2019 9:05 am

Detecting the commercials is the hardest part. Once you have those time stamps, one can use a script to make the right ffmpeg commands and end up with a new video file, minus commercials (maybe even re-encode those big mpeg2 files down to h.264 at the same time, if desired). rpcameron brings up a good point about needing to preserve the correct metadata/headers for playback within the HDHR app, but it all seems very doable at first glance.

Sammy2
Posts: 605
Joined: Wed Jun 06, 2012 11:49 am

Re: Comskip with HDhomerun DVR

Post by Sammy2 » Fri May 17, 2019 9:06 am

I use MCEBuddy with ComSkip and HandBrake invoked. I only mark commercials to create chapters easily skipped by Emby. I do this because too many times the last few seconds to minutes of my wife's shows were truncated and it is much easier to do this than to spend countless hours tweaking ComSkip Settings. I'm not sure but IDK if this will work with HDHomeRun Output or not.

BTW, I'm thinking of not re-encoding to h.264/mkv but rather back to mpeg2/mkv if possible because HandBrake puts a pretty hard hit on my CPU even though I have H/W Acc selected in MCEBuddy. My processor is well above 85% on all four cores and the temps push into the mid to high 80's too. This causes lag issues in Emby and I'm not too found of such high temps on my CPU too. This is a 3rd Gen i5 4690k Devil's Canyon Haswell so it really is no slacker, so to speak.
Last edited by Sammy2 on Fri May 17, 2019 3:38 pm, edited 1 time in total.

techpro2004
Posts: 601
Joined: Tue Oct 06, 2015 1:25 pm

Re: Comskip with HDhomerun DVR

Post by techpro2004 » Fri May 17, 2019 2:10 pm

NedS: there clearly is interest in skipping commercials. Why not add support to read the output of comskip into the hdhomerun dvr?

Billi23
Posts: 94
Joined: Mon Mar 20, 2017 8:08 pm
Device ID: 1323AADB

Re: Comskip with HDhomerun DVR

Post by Billi23 » Fri May 17, 2019 4:11 pm

Channels DVR does this, but it's not HDHR DVR.

NedS
Silicondust
Posts: 381
Joined: Mon Dec 10, 2018 12:38 pm

Re: Comskip with HDhomerun DVR

Post by NedS » Fri May 17, 2019 4:27 pm

techpro2004 wrote:
Fri May 17, 2019 2:10 pm
NedS: there clearly is interest in skipping commercials. Why not add support to read the output of comskip into the hdhomerun dvr?
I'm not a programmer, so I can't promise anything or really comment on how easy or hard it would be to add the feature. I'd certainly welcome any feature that would limit my exposure to commercials :)

Deihmos
Posts: 58
Joined: Sun Jul 08, 2012 9:25 pm

Re: Comskip with HDhomerun DVR

Post by Deihmos » Tue May 21, 2019 8:04 pm

techpro2004 wrote:
Fri May 17, 2019 7:55 am
NedS: That will only output a file saying where in the recording the commercials are. It will not remove the commercials from the recordings and the hdhomerun dvr can not read those files to skip over the commercials automatically. The only solution is to use mcebuddy.
Plex and even Channels DVR has comskip enabled on linux so it is possible. Plex strips the commercials completely. I just don't have the skills to implement it on linux.

ACraigo
Posts: 483
Joined: Sat Jul 28, 2018 3:32 pm
Device ID: 1062E8EE
Location: Deep Canyon in WV (by God)

Re: Comskip with HDhomerun DVR

Post by ACraigo » Wed May 22, 2019 2:03 am

NedS wrote:
Fri May 17, 2019 4:27 pm
techpro2004 wrote:
Fri May 17, 2019 2:10 pm
NedS: there clearly is interest in skipping commercials. Why not add support to read the output of comskip into the hdhomerun dvr?
I'm not a programmer, so I can't promise anything or really comment on how easy or hard it would be to add the feature. I'd certainly welcome any feature that would limit my exposure to commercials :)
A plan to implement Comskip looks good on paper and is just what MANY people want to hear... but...
You'll NEVER, repeat, NEVER get it to a reliable state - enough to pass it along to your customer base without constant cries that: "This Dam Thing Doesn't Work Right"!

I use it all the time from within MCEBuddy and it does, pretty much, what it's supposed to. "Pretty Much" being the key phrase here. It ain't perfect and it's never going to be perfect. There are simply too many variables to incorporate it into your product. You'll end up wasting a LOT of time and you'll NEVER get it working to a point where it's not a magnum PITA for you.

If you doubt my word on this - Check The Channels Forum. They have probably been in 'Tweek Mode' for 6 months.

Every channel and broadcaster has their own method to lead into and come back from an ad block. You'll tweek until you're blue in the face to get it 'pretty good' on one channel and then it won't work very well on another. It'll drive you bonkers, I'm telling ya, cause I've been there and I'm bonkers!

MCEBuddy Veterans already know Comskip (or that other one) isn't a science by any means. We set it so it's "Adequate", in that it works when it works and if we set it up right it doesn't hack out big portions of the program - and even catches 'Most' of the ads... on a good day, on some channels, maybe.

That's as good as it gets, but is the hand grenade approach to automated ad removal something SD should offer?
Not in a million years.
Leave that up to the user base to deal with - and after they have for a short time they'll know why you're not doing it for them.

;)

I'm pretty sure the latest donator version of Buddy will mark the commercials (chapters - I think). It'll be hard enough trying to get your player to skip those automatically - if that's the plan - even then I'd research very carefully, test thoroughly and double check for water in that pool before you leap in.

gtb
Expert
Posts: 3985
Joined: Thu Oct 06, 2011 1:00 pm
Location: Sunnyvale, CA USA

Re: Comskip with HDhomerun DVR

Post by gtb » Wed May 22, 2019 7:00 am

ACraigo wrote:
Wed May 22, 2019 2:03 am
A plan to implement Comskip looks good on paper and is just what MANY people want to hear... but...
You'll NEVER, repeat, NEVER get it to a reliable state - enough to pass it along to your customer base without constant cries that: "This Dam Thing Doesn't Work Right"!
The solution (by the big players) that works reasonably well uses various combinations of heuristics, AI, and human validation to create an accurate skip-list for the network feeds (usually available a few hours after broadcast). In other words, spending real money and providing a paid service (or value add to an existing service to keep you as a subscriber). There has been, from time to time, considerations to crowd-source such information, but they have tended to fall apart rather quickly when the real world complexity of such a general solution was considered.

Sammy2
Posts: 605
Joined: Wed Jun 06, 2012 11:49 am

Re: Comskip with HDhomerun DVR

Post by Sammy2 » Wed May 22, 2019 8:15 am

I use ComSkip within MCEBuddy and have it set to mark the end of a commercial block as a chapter before invoking HandBrake to re-encode to h.264/mkv and then Emby sets them up as chapters. On my remote I click the "UP" directional arrow and a BIF screen grab shows up for each chapter. I then skip to that chapter and playback resumes. If there's an error in spotting a commercial I can back up a bit to view that which may have been skipped. This works great as ComSkip is about 95% accurate and this way chunks of your recording does not go into nether-land.

Post Reply