Jump to content

Commercial Removal


Recommended Posts

jasonmcroy

Hmm...

Let's check your MCEBuddy settings. Go to Conversion Tasks---->Change and check this screen:

1151521921_InkedMCEBuddyScreenshot_LI.thumb.jpg.b47ae789d55c045315bb52fd61c24fde.jpg

Do you have the two circled areas checked? If not, do that.

Now, at the bottom of that same screen, hit the button that says "Expert Settings"

1667744549_InkedMCEBuddyExpertSettings_LI.thumb.jpg.b53854601674159cfb82921ed6434966.jpg

Do you have these two boxes checked? If not, check those and save everything.

If you didn't have these areas checked, that should be your issue. So, try to run another recording and see if that works now.

Link to post
Share on other sites
sross44

Both of those were checked already. Not sure if it's how Emby is processing the information or what, but something is off as those are already checked. 

Link to post
Share on other sites
jasonmcroy

Gotcha. 

When you process the recording in MCEBuddy do you remux it to another format or leave it as it is? 

Link to post
Share on other sites
sross44

I had it set to MKV Uncompressed. I'm trying MKV normal for a recording that's about to end

 

Link to post
Share on other sites
Dan_Austin

First, thanks go out to ShotToTheDome for his efforts to document this and Jad3675 for commenting on it in a current thread.

I didn't think commercial cutting was working/supported on Linux, so hadn't given it much thought.  After dealing with quirks on my distro I have it working with Nvidia hardware acceleration and x265 out put.  Tests are shoing a 20% savings just on commercial cut and a further 80% converting to x265. (2.7GB original, 1.9GB com cut, 375MB X265).  Quality is excellent, performance is silly fast.  A 30 minute program converts in about 2.5 minutes.  Going back to x264 might be faster still.

One question that I did have after all of this, is should the post recording library refresh happen after the post processing script finishes?  Logs suggest that the refresh triggers immediately after the post-processing is launched.

I reworked the Linux script to be BASH based and thinking to add some error-checking/retry logic.  I have had only one failure, and with no changes the problem file worked on the second try.  

Edit-  Actually 2.5 minutes and 375MB is for x264.  I re-encoded the same file with just changing to x265, closer to 4 minutes and only about 25MB smaller.  Interestingly the commercial scan takes about 40% of the total time, and tuning comskip.ini is not making a measurable difference.  Good enough for now.

Edited by Dan_Austin
Link to post
Share on other sites
jasonmcroy
6 minutes ago, sross44 said:

I had it set to MKV Uncompressed. I'm trying MKV normal for a recording that's about to end

 

I think you mean MKV Unprocessed - That setting should work fine, that is what I use as well.

Link to post
Share on other sites
sross44
8 minutes ago, jasonmcroy said:

I think you mean MKV Unprocessed - That setting should work fine, that is what I use as well.

Yeah sorry.... it's been a long day lol. Well whatever was going on it wasn't working. So hoping I can get it going somehow. I want to be able when a commercial hits to be able to skip forward to the next "chapter" effectively skipping commercials. 

Link to post
Share on other sites
jasonmcroy

Yeah, it's much nicer that way. Not sure what else to guide you on. Seems like you have the settings correct.

Link to post
Share on other sites
sross44

Could it be something in Emby? That emby isn't doing properly when the media is added to the folder? I really appreciate your help btw. Thank you 

Link to post
Share on other sites
jasonmcroy

Not sure to be honest. We're getting above my level of knowledge now. :)

Link to post
Share on other sites
sross44
3 minutes ago, jasonmcroy said:

Not sure to be honest. We're getting above my level of knowledge now. :)

Haha. I appreciate the honesty! What do you have for your library settings for your recorded shows that Emby reads? Just seeing if it's something simple... I think I have everything right though 

Link to post
Share on other sites
jasonmcroy
59 minutes ago, sross44 said:

Haha. I appreciate the honesty! What do you have for your library settings for your recorded shows that Emby reads? Just seeing if it's something simple... I think I have everything right though 

Well, at the moment I am not doing any recording via Emby. I am recording from another DVR then using MCEBuddy to move the files from that folder to my Emby folder so that may be one difference.

Link to post
Share on other sites
sross44

Yes but emby is still scanning the files that you put in the folders before you view them. So I’m wondering if it’s more of that than anything. Who knows at this point lol

Link to post
Share on other sites
Sammy
7 hours ago, sross44 said:

Yes but emby is still scanning the files that you put in the folders before you view them. So I’m wondering if it’s more of that than anything. Who knows at this point lol

I set MCEBuddy to not do it's thing for 30 minutes after the recording ends and then I have a script to clean up everything Emby did already, which Emby will do again once the file is moved to its library location by MCEBuddy. You can also set Emby to not scan right away and do it just on the schedule each night but I'd prefer something else which isn't available and maybe @Luke or @softworkz could implement this.. Setting the scan to occur maybe 30 minutes after the file is done recording or after a file is placed in a library.

Link to post
Share on other sites
sross44
3 hours ago, Sammy said:

I set MCEBuddy to not do it's thing for 30 minutes after the recording ends and then I have a script to clean up everything Emby did already, which Emby will do again once the file is moved to its library location by MCEBuddy. You can also set Emby to not scan right away and do it just on the schedule each night but I'd prefer something else which isn't available and maybe @Luke or @softworkz could implement this.. Setting the scan to occur maybe 30 minutes after the file is done recording or after a file is placed in a library.

I'll try to have it not scan right away, see if that helps. Maybe that's my issue. That it's pulling things prior to the file going back in. Agreed if that's the problem an implementation on Emby's side, like setting the option to 2 hours after files are added would be great. 

Link to post
Share on other sites
sross44
On 10/13/2020 at 8:59 PM, Sammy said:

MCEBuddy automagically does this. Just set it to mark the commercials as chapters, run chapter image extraction in Emby and skip through them while watching.

@Sammy could you walk me through how you have your set up working? Something really is missing for me and it's not working as I want it to. Any help would be mostly appreciated. 

Edited by sross44
Link to post
Share on other sites
sross44

Still been messing around with it and nothing. I can get it to work if I have MCEBuddy remove the commercials, but I don't trust it to not cut part of the show. So I am still looking for a way to be able to FF through chapters, effectively skipping commercials. Hopefully someday Emby can just read the EDL file and have a "skip ads" option. I think a lot of people really would welcome this for recordings. Even if we have to create the EDL file on our own via a program or script. 

Link to post
Share on other sites
jad3675
23 hours ago, sross44 said:

Still been messing around with it and nothing. I can get it to work if I have MCEBuddy remove the commercials, but I don't trust it to not cut part of the show. So I am still looking for a way to be able to FF through chapters, effectively skipping commercials. Hopefully someday Emby can just read the EDL file and have a "skip ads" option. I think a lot of people really would welcome this for recordings. Even if we have to create the EDL file on our own via a program or script. 

On the linux side there comchap (https://github.com/BrettSheleski/comchap) that uses comskip to generate edl files and then redoes videos using ffmpeg to insert chapter markers. I use it for recorded TV and it works pretty well.

Link to post
Share on other sites
Sammy
On 10/26/2020 at 6:32 PM, jasonmcroy said:

Hmm...

Let's check your MCEBuddy settings. Go to Conversion Tasks---->Change and check this screen:

1151521921_InkedMCEBuddyScreenshot_LI.thumb.jpg.b47ae789d55c045315bb52fd61c24fde.jpg

Do you have the two circled areas checked? If not, do that.

Now, at the bottom of that same screen, hit the button that says "Expert Settings"

1667744549_InkedMCEBuddyExpertSettings_LI.thumb.jpg.b53854601674159cfb82921ed6434966.jpg

Do you have these two boxes checked? If not, check those and save everything.

If you didn't have these areas checked, that should be your issue. So, try to run another recording and see if that works now.

 

This should do it on the MCEBuddy side but is Emby creating the chapter markers during thumbnail extraction / BIF creation? How to check if it is?

 @Luke @softworkz

Link to post
Share on other sites
sross44

Sorry I thought I responded.... but I do have everything properly done on the MCEBuddy side. So I think Emby is creating the the chapter markers instead of using the one’s that MCEBuddy does. @Luke is that correct in how it works? 

Link to post
Share on other sites
Dan_Austin

I was seeing the same behavior.  The logs made it clear that Emby does not wait on the post-processing script to complete before extracting bif images and setting chapters.

To cope, I reworked my script to move the recording to a temp location as the first step, process it, then move the MKV and original file renamed with '-orig' appended so that version would not be processed by Emby, but I would still have it while tuning comskip.  If the temp location is on the same file system the move is immediate.  This may still cause a file not found error in Emby when it looks for the original recording, but has not seemed to cause any lasting issues.

If suggestions for the new LiveTV feature set are being accepting, it would be worth having Emby wait on post-processing before processing a recording, or support a mechanism to block processing, like an ignoreme file in the library to suspend  processing while media manipulation is occuring, especially helpful for Libraries with RTM enabled.

Link to post
Share on other sites
ebr
4 hours ago, Dan_Austin said:

The logs made it clear that Emby does not wait on the post-processing script to complete before extracting bif images and setting chapters

There is really no way for Emby to know when your post-processing routine is "finished" so something would have to be developed to somehow enable that through messaging or something.  However, blocking our normal processing waiting on an external entity to report back would be a dangerous route for us - allowing things to get messed up pretty easily I'm afraid.

So it is a bit of a tricky situation.

Link to post
Share on other sites
cayars

Probably the best thing to do is turn off real-time bif generation for the recording library and let those bif files be generated during the nightly process after any commercial cutting has been completed.

  • Like 1
Link to post
Share on other sites
Dan_Austin

Exit codes, process watchdog/timeout code, documentation(see exit codes).  I get that a poorly written script, perhaps due to lack of documentation, could be dangerous.  But then again a poorly written script could delete and entire library and even allowing post-processing scripts is inherently dangerous...

I did consider turning off RTM and using an API call to trigger a scan, but the little documentation I found to help with that suggested it would be difficult to impossible.  AND I am not sure RTM makes a difference, it appeared to me in testing that a scan was triggered after a recording completed as part of the recording process.

Since I had just go through it, I figured confirming for sross44 that what he was seeing was normal might help him pick a work-around.

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...