Jump to content
inzombyac

MBS - Live TV Commercials file support

Recommended Posts

inzombyac

It would be nice if MBS could incorporate a Commercials.XML file generated from Comskip or ShowAnalyzer and use this to automatically skip over commercials in the web client.  Ideally, I'd like to see this work like DVRMSToolbox's DTBAddin.  You would have a setting in LiveTV for commercials location.  During a media scan, it would match the .XML file name to a recorded TV file and generate the appropriate commercial markers based in the commercials files.  When streaming from the web client, it would use this data to automatically bypass the commercials, but allow the user to go back if section was marked incorrectly.

 

Option 1: Translate the commercials file into the chapter/scene markers.  Users could manually skip to the next scene.

Option 2: Make special commercial markers and automatically skip like DTBAddin

 

Maybe this could expand later where you could have MBS scan files as well.  

  • Like 23

Share this post


Link to post
Share on other sites
comprocket

I think that it already does! I have commercial files for all of my shows, and many of them actually read the commercials.xml to create scenes. These episodes also allow for scrubbing through the timeline! I just don't understand why some have scenes and others do not, while all have commercials.xml files!

 

I can tell which ones it recognized by looking at my recorded TV and seeing which have a thumbnail. All of the ones with thumbs have scenes and allow for scrubbing. Those without thumbs do not, even though they were processed identically!

Edited by comprocket

Share this post


Link to post
Share on other sites
inzombyac

I just setup Emby TV and tried this with some recordings.  The scene markers were still at the even 5 minute intervals, not at the commercials marks.  Hoping this is added some day.

Share this post


Link to post
Share on other sites
revengineer

+1 for adding comskip support. This is needed for a viable replacement of Windows Media Center.

  • Like 1

Share this post


Link to post
Share on other sites
Luke

Wmc has that built in?

Share this post


Link to post
Share on other sites
Spaceboy

Wmc has that built in?

With babgvants dvrmstoolbox yes

Share this post


Link to post
Share on other sites
revengineer

For minimal support for this, all we need is the capability of executing a batch file after the recording is completed. emby would execute the batch file and pass the filename of the recording as a parameter. At this point commercial skipping would be supported in Kodi, which already knows how to skip the video according to the commercial start and stop times determined by the analyzer. Adding commercial skipping to the native apps is of course the desired next step.

 

BTW, I have played with nextPVR. Workaround for commercial skipping works, but its clunky and requires yet another service to run. Not a great solution and I uninstalled.

Share this post


Link to post
Share on other sites
inzombyac

While support of processing commercials should still be considered, I would be happy with the option for emby clients to support reading in commercials files and skipping over the sections marked as commercials.  There are plenty of ways to setup file watchers including dvrmstoolbox to monitor recorded tv folders.  The problem is that the Emby clients don't have support for doing anything with the commercials files.  For now the only clients that have this ability is WMC or Kodi.

Share this post


Link to post
Share on other sites
Luke

Wmc has this natively, really?

Share this post


Link to post
Share on other sites
inzombyac

Not natively. But with the DTBaddin for dvrmstoolbox.

Edited by inzombyac

Share this post


Link to post
Share on other sites
mediacowboy

I know another media solution used edl file to look for chapter markings.

 

 

Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites
Luke

Ah I see, thanks.

Share this post


Link to post
Share on other sites
blade005

Ah I see, thanks.

Luke,

 

I think what most would be happy with is the ability for Emby to read an external chapter marker file, created by another process, and we could then manually skip commercials. There will be some that probably want more, but that would be a great first step for most.

 

Currently, you either must run a process that physically cuts out commercials, which can be problematic. Or, run a process to create an external commercial file and then remux file to include chapter markers that Emby can read. Ability to read an external chapter file that matches the naming convention of the video file would be a nice addition to Emby.

  • Like 1

Share this post


Link to post
Share on other sites
mediacowboy

Luke,

 

I think what most would be happy with is the ability for Emby to read an external chapter marker file, created by another process, and we could then manually skip commercials. There will be some that probably want more, but that would be a great first step for most.

 

Currently, you either must run a process that physically cuts out commercials, which can be problematic. Or, run a process to create an external commercial file and then remux file to include chapter markers that Emby can read. Ability to read an external chapter file that matches the naming convention of the video file would be a nice addition to Emby.

Being able to read a edl, Edit Decision List, file would what I think a easy fix. I do not know what all software creates this file but I know comskip does and several years ago mediaportal was able to read this file and mark it as chapters with the ability to watch the commercials or jump them like a chapter.

 

 

They had the TV engine with the ability to launch comskip after recording was done to create the edl file and when I left mediaportal I believe they were working on making it were it worked with live TV on the fly. So say you paused a live TV stream for 10 minutes and wanted to come back and jump the commercials it would.

Edited by mediacowboy

Share this post


Link to post
Share on other sites
revengineer

Being able to read a edl, Edit Decision List, file would what I think a easy fix. I do not know what all software creates this file but I know comskip does and several years ago mediaportal was able to read this file and mark it as chapters with the ability to watch the commercials or jump them like a chapter.

 

 

They had the TV engine with the ability to launch comskip after recording was done to create the edl file and when I left mediaportal I believe they were working on making it were it worked with live TV on the fly. So say you paused a live TV stream for 10 minutes and wanted to come back and jump the commercials it would.

The ability to launch comskip or showanalyzer to create the EDL file is essentially what I am asking for. dvrmstoolbox will monitor a recording file and launch the process when the file has not changed for x minutes, where x is a variable. Why not cut out the middle man. emby knows when the recording is finished and can launch a batch files if exists, e.g., postprocessing.bat as in nextPVR. Running comskip will generate the EDL files, which contains the start and stop time of commercials. Kodi already knows how to process EDL files and can be used with the emby addin. The next step is to have the emby native video players skip the commercials using the EDL file. 

 

In summary, all we need is the infrastructure to support third-party commercial processing software. It would be crazy to reinvent the wheel and implement the commercial processor within emby. That would be a substantial effort and would drift emby of its path.

Share this post


Link to post
Share on other sites
Spaceboy

Dvrmstoolbox was also able to work on in progress recordings

Share this post


Link to post
Share on other sites
lifespeed

Comskip and dvrmstoolbox were indeed a great combination with WMC.  Implementing this functionality into Emby would be really cool, it might even be possible to leverage the existing software.

Share this post


Link to post
Share on other sites
farside847

+1 for adding some kind of commercial skip feature/plug-in

Share this post


Link to post
Share on other sites
BAlGaInTl

Can't you already run Comskip through the post recording command option in Emby Server? 

 

So it would just be a matter of having Emby read and use the file if present?

 

I've not used Comskip in a LONG time, but I agree it would be a nice feature.

Share this post


Link to post
Share on other sites
inzombyac

The post processing works well with Comskip.  The problem is that the emby clients don't support the commercials files that are created.  You have to use another client that supports EDL's such as Kodi or edit the file and physically remove the commercials.  Since commercial detection is not 100%, the latter option generally requires manual intervention.

Share this post


Link to post
Share on other sites
cpc197c

Hello!  I figured it would be better to necro this thread than to make a new one.  

 

I had this same problem, but luckily I am a programmer and just coded up something myself to handle this.  It's not the cleanest solution (or the most tested yet), but so far it works great for me!
https://github.com/SupineSnail/MKVCommercialSkip/

 

The program is built in .net 4.5.2, so you'll need to download that first.  Please see the Readme on the github page, as you'll need to supply your own comskip as the donator version is needed.

 

A quick summary of the program: It runs comskip and generates an EDL file.  I then take that file and convert it into an XML file that MKVMerge can read.  I then run MKVMerge to integrate chapters into the MKV file, and move the resulting file over the original.

Edited by cpc197c
  • Like 2

Share this post


Link to post
Share on other sites
snake98

@cpc197c  Do you know of a way to have it autoskip once you merge the chapters back in.  I"m going to install your program and give it a try.  You may want to start your own thread, I had a hard time finding this one again

Share this post


Link to post
Share on other sites
cpc197c

@cpc197c Do you know of a way to have it autoskip once you merge the chapters back in. I"m going to install your program and give it a try. You may want to start your own thread, I had a hard time finding this one again

Mkvmerge is a very powerful program. It is probably possible to ask it to cut out the commercials somehow instead of marking them as chapters, but I haven't looked into it. I didn't do that on purpose though, as comskip is not 100% accurate (the way TBS goes between shows in particular messes with it).

 

As far as I know, Emby has no built in time range capability or auto skip either, so this was the best solution I could come up with

  • Like 1

Share this post


Link to post
Share on other sites
cpc197c

I've downloaded the source code and I'm trying to add functionality for scrubber time-spans and EDL file support, but I can't seem to understand how the code is working so far. May have a deep dive at some point to find out.

So far, I have realized that I will probably need to add server functionality (either by adding in the code or a server plugin) to have some part of the REST API return EDL file data to the client. As far as I can see though, there is no way to create a client plugin (unless I have not found that in the documentation): so I would have to find where in the JS to interact with the scrubber to add a different color or something to the bar to denote a commercial zone, and add a skip button.

This would only cover the web UI though, and how the mobile / androidTV apps work with theater mode I haven't been able to figure out yet. So many repositories :D

  • Like 1

Share this post


Link to post
Share on other sites
Tur0k

Hello! I figured it would be better to necro this thread than to make a new one.

 

I had this same problem, but luckily I am a programmer and just coded up something myself to handle this. It's not the cleanest solution (or the most tested yet), but so far it works great for me!

https://github.com/SupineSnail/MKVCommercialSkip/

 

The program is built in .net 4.5.2, so you'll need to download that first. Please see the Readme on the github page, as you'll need to supply your own comskip as the donator version is needed.

 

A quick summary of the program: It runs comskip and generates an EDL file. I then take that file and convert it into an XML file that MKVMerge can read. I then run MKVMerge to integrate chapters into the MKV file, and move the resulting file over the original.

So, ever since I picked up live tv again I can't stand the commercials. I have been trying to find a way to clip commercials out in post processing.

 

This looks like what I am looking for. I read on the comskip forum that their exe can export to xml directly. Now to read up on mkvmerge command line.

 

 

Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...