Jump to content

Remove commercials


revengineer

Recommended Posts

revengineer

I have a need to remove commercials from emby recorded TV files in mkv container. I run comskip in post-processing and have an EDL file for each recording. I have been waiting for a long time for emby to interpret the EDL file but am now giving up the wait. I would now like to strip the commercials from the recordings with another tool. Two questions:

 

Is there a way of doing that without purchasing MCEBuddy?

 

Is there a way to do this without re-encoding the video?

  • Like 1
Link to comment
Share on other sites

lightsout

I use mcebuddy but I thought you don't have to pay. I can't remember. I know I did to support them.

 

And it does not re-encode. Or doesn't have to. I just let it remux a .TS but I think it can do an untouched mkv

 

 

Sent from my iPhone using Tapatalk

Edited by lightsout
Link to comment
Share on other sites

BillOatman

I agree that Emby respecting a EDL file would be fantastic.

 

I used ffmpeg to strip the commercials.  Unfortunately it won't read a EDL file directly so I created a windows app to take the EDL file, create a series of clips of the show content minus commercials, then concat the resulting clip files.  I suspect that is what MCEBuddy does as well.

 

It worked, but the scene transitions were harsh (never did figure out how to get ffmpeg to fade between clips).  Been a long time since I have used it.  It was much easier to just fast forward, or download the shows with the commercials already removed.  Plus if comskip made a mistake it chopped off show content.

 

Truly, the solution is for Emby to respect a EDL file if present and skip ahead. That way if comskip makes a mistake, you can still watch the content.

Edited by BillOatman
Link to comment
Share on other sites

revengineer

After searching for a while I ended up buying MCEBuddy. While I think cost for this small utility is on the high side, it is still cheaper than my time . Now, I am not quite sure how to set it up to work with emby. My previous postprocessing simply modified the recorded file in place. I am not sure this is possible with MCEBuddy. Do we have an emby integration/setup guide for this anywhere?

Link to comment
Share on other sites

revengineer

I use mcebuddy but I thought you don't have to pay. I can't remember. I know I did to support them.

 

And it does not re-encode. Or doesn't have to. I just let it remux a .TS but I think it can do an untouched mkv

 

 

Sent from my iPhone using Tapatalk

If you have settings to strip commercials without reencoding, please let me know.

Link to comment
Share on other sites

lightsout

If you have settings to strip commercials without reencoding, please let me know.

It's basically ran totally separate from Emby. Like you said it just deals with the files where they are. Basically I have it watch my recording folder.

 

When a show is dropped in there in does it's thing. I set the output file to "unprocessed .TS". This way it strips the commercials and just remuxes the file. No transcoding.

 

You can also select unprocessed mkv to have it do the same but drop it in an mkv.

 

You can have it overwrite the original file. I personally have the new file saved elsewhere as i process them with videoredo and then handbrake.

 

I find that comskip does pretty good but there is often cleaning up to do. Especially at the beginning and end of a show.

 

I will say the mcebuddy has a learning curve. So you'll need to do some reading to get it how you like it.

Link to comment
Share on other sites

revengineer

It's basically ran totally separate from Emby. Like you said it just deals with the files where they are. Basically I have it watch my recording folder.

 

 

Thank you for the feedback. So, do I basically have to record into one directory (e.g., "C:\RecordIn") and have the output written to another (e.g., "C:\RecordOut")? If in and out directory are the same, I assume that the file watch/monitor will get confused, correct?

Link to comment
Share on other sites

lightsout

Thank you for the feedback. So, do I basically have to record into one directory (e.g., "C:\RecordIn") and have the output written to another (e.g., "C:\RecordOut")? If in and out directory are the same, I assume that the file watch/monitor will get confused, correct?

You should be able to keep the same directory. There is a box you can check to tell it to ignore previously ran files. If you do not check that box it will go in an endless loop. 

There is also a setting to tell it to wait to process a file until it is finished being modified. This way it doesn't try to start processing files that are being recorded. I have it set to something like 10 minutes after the file has stopped being modified.

Link to comment
Share on other sites

revengineer

You should be able to keep the same directory. There is a box you can check to tell it to ignore previously ran files. If you do not check that box it will go in an endless loop. 

Got it. Before I set this up, what will MCEBuddy so with the large TV library I already heave. I would not want these to be processed. Will the above checkbox ensure that only new files are processed, or will it insist to turn all my .mkv into .mp4?

Link to comment
Share on other sites

lightsout

Got it. Before I set this up, what will MCEBuddy so with the large TV library I already heave. I would not want these to be processed. Will the above checkbox ensure that only new files are processed, or will it insist to turn all my .mkv into .mp4?

It all depends how you have it setup. Sounds like you have your recordings dumping into your main TV folder? I am sure there is some filter you can set to have it ignore the previous files.

 

I have a DVR folder then an actual TV folder, so my setup is a bit different.

 

Not sure what your other files are and what format you record in, but I have MCEbuddy set to only process .TS files. So it will ignore all mkv's and mp4's. 

Link to comment
Share on other sites

revengineer

It all depends how you have it setup. Sounds like you have your recordings dumping into your main TV folder? I am sure there is some filter you can set to have it ignore the previous files.

 

Thank you for the additional help. I was really just guessing what I was supposed to do. The pdf documentation is lacking and you have to search and google every pieces of information. There seem to be many ways to skin the cow, and I now found a way that works best for me. Here is what I did:

 

1. To store the output file in its original location, one simply needs to leave the Destination Folder for the Conversion Task BLANK. I took hours to fiddle with the output path, which would not work right because the %relativesourcepath% environment variable will append the destination folder.

 

2. The only other change I made to the Conversion Task is to skip downloading media info as emby does this already. 

 

3. Finally, I deleted ALL watch folders and instead send the recording manually to the MCEBuddy queue. For this, I found the script below somewhere in the Pl*x forums I use this as the post processing batch file.

 

Now everything is working perfectly. Thank you again for the pointers.

@[member="Echo"] off
C:\Progra~1\MCEBuddy2x\MCEBuddy.UserCLI.exe --command=engine --action=start 
timeout /t 2 /nobreak > NUL
C:\Progra~1\MCEBuddy2x\MCEBuddy.UserCLI.exe --command=addfile --action=%1
timeout /t 10 /nobreak > NUL
:loop
for /f "delims=" %%o in ('C:\Progra~1\MCEBuddy2x\MCEBuddy.UserCLI.exe --command=jobstatus --action=%1 --quiet') do set status=%%o
if %status% == "not present" (
	Exit
) else (
	timeout /t 2 /nobreak > NUL
	goto loop
)

Link to comment
Share on other sites

lightsout

 

Thank you for the additional help. I was really just guessing what I was supposed to do. The pdf documentation is lacking and you have to search and google every pieces of information. There seem to be many ways to skin the cow, and I now found a way that works best for me. Here is what I did:

 

1. To store the output file in its original location, one simply needs to leave the Destination Folder for the Conversion Task BLANK. I took hours to fiddle with the output path, which would not work right because the %relativesourcepath% environment variable will append the destination folder.

 

2. The only other change I made to the Conversion Task is to skip downloading media info as emby does this already.

 

3. Finally, I deleted ALL watch folders and instead send the recording manually to the MCEBuddy queue. For this, I found the script below somewhere in the Pl*x forums I use this as the post processing batch file.

 

Now everything is working perfectly. Thank you again for the pointers.

@[member="Echo"] off
C:\Progra~1\MCEBuddy2x\MCEBuddy.UserCLI.exe --command=engine --action=start 
timeout /t 2 /nobreak > NUL
C:\Progra~1\MCEBuddy2x\MCEBuddy.UserCLI.exe --command=addfile --action=%1
timeout /t 10 /nobreak > NUL
:loop
for /f "delims=" %%o in ('C:\Progra~1\MCEBuddy2x\MCEBuddy.UserCLI.exe --command=jobstatus --action=%1 --quiet') do set status=%%o
if %status% == "not present" (
	Exit
) else (
	timeout /t 2 /nobreak > NUL
	goto loop
)

Glad you got it working, I agree it's very cumbersome. But it works once you got it going.
Link to comment
Share on other sites

What I do is record to something like X:\Recording.

Then have MCEBuddy only look at that directory.

 

All media is processed and moved after cutting to a directory such as X:\RecordingCut

Have it process the files to MKV vs TS files as more Emby clients will direct play the MKV vs remux/direct stream the TS file.

I only do commercial cutting and no transcoding.

 

I then use a tool such as AVIdemux to go over the cut files which allows me to cut the padding as well as any missed commercials.

I can process a file manually in about a minute.

 

I then save the files back to different directories which then do the conversions for me to either H.264 or H.265 depending on the source.  H.264 I keep and mpeg2 gets converted to H.265 to save space.  I only do CPU conversions.

 

That's the overview of my setup.

Link to comment
Share on other sites

lightsout

What I do is record to something like X:\Recording.

Then have MCEBuddy only look at that directory.

 

All media is processed and moved after cutting to a directory such as X:\RecordingCut

Have it process the files to MKV vs TS files as more Emby clients will direct play the MKV vs remux/direct stream the TS file.

I only do commercial cutting and no transcoding.

 

I then use a tool such as AVIdemux to go over the cut files which allows me to cut the padding as well as any missed commercials.

I can process a file manually in about a minute.

 

I then save the files back to different directories which then do the conversions for me to either H.264 or H.265 depending on the source.  H.264 I keep and mpeg2 gets converted to H.265 to save space.  I only do CPU conversions.

 

That's the overview of my setup.

I pretty much have the same workflow. I leave the files as .TS's at the first remux because Videoredo handles them better. 

 

I don't have the final conversion to x264/x265 automated like you do. Are you using mcebuddy for that? I haven't been happy with the setup/results in the small testing I did, especially deinterlacing.

 

I just have mcebuddy drop them into a folder and I open handbrake and scan said folder, then encode them according to a pre setup profile.

Link to comment
Share on other sites

I use a modified version of https://github.com/mdhiggins/sickbeard_mp4_automator to do the conversions.

It can do all kinds of cool things like pull out audio/subtitles not in languages you care about. Download SRTs, do renaming, create AAC 2 channel audio.

It can do a remux vs a transcode for existing H.264 content (if using H.264 output).

Link to comment
Share on other sites

  • 11 months later...
revengineer

I am encountering issues with shows that do not play well with comskip. So I am renewing my request for EDL support so that I can save the commercials markers for skipping rather than attempting to remove these segments which can be flawed. Nothing is worse than watching a show and having to miss the last 2 minutes. Grrr...

Link to comment
Share on other sites

groenator

I use a modified version of https://github.com/mdhiggins/sickbeard_mp4_automator to do the conversions.

It can do all kinds of cool things like pull out audio/subtitles not in languages you care about. Download SRTs, do renaming, create AAC 2 channel audio.

It can do a remux vs a transcode for existing H.264 content (if using H.264 output).

 

Are you using the sickbeard_mp4_automator in a container? How do you use it with emby? I have emby running in a container, would I be able to mount the scripts from the automator into emby and then emby will process the conversation itself, or should be this done separately? 

 

Cheers!

Link to comment
Share on other sites

I run Emby on Windows so I just have it setup to run like a batch file.  I have it constantly running to look for new files placed in a directory and process them.

I have two versions setup.  One I use mkv/hevc/aac files and another for everything else which goes to mp4/h264/aac 

Link to comment
Share on other sites

  • 2 weeks later...
muzicman0

I also got tired of waiting for Emby to support EDL files, but I am unwilling to do destructive editing.  I ended up using Emby for Kodi, and using Kodi as a front end.  As long as I set it up as Native (Direct Paths), then Kodi will honor the EDL file, and commercial skipping works.  I use the Amber Skin, but you can use anything.  If you like the Emby look, then they make a skin called Embuary that looks like Emby.

 

May not be for everyone, but I have been using it this way for months now, and it works well.

  • Like 1
Link to comment
Share on other sites

  • 9 months later...
jennifern

So I am new to this. Not to Emby but to com skip and me buddy and whatnot. 
 

where do I start? I can’t even figure out those programs so I don’t know how to add them to work with Emby or anything 

Link to comment
Share on other sites

Hi, If running on Windows check out MCEBuddy which makes this pretty trivial to setup and is fully GUI based.

Link to comment
Share on other sites

gungatim

you can still download the old free version of MCEbuddy 2.3 without the 15 day limit if you search the net.

there are guides on their site for how to setup, it is fairly simple.

I used touse WinTv with my Haupague tuner to record but switched back to Emby since it has been working now for a while.

you set emby recording to a separate folder, and tell MCEBuddy to look at that folder and work it's magic. it will convert the file to MP4 and run comskip and dump the new

file to a different folder if you want, then you can add to your library when you decide it worked. 

not all shows/channels convert well, sometimes you end up wit a messed up file, but hey it's free...the HD channels work the best, the old retro shows sometimes not so much.

Link to comment
Share on other sites

14 hours ago, gungatim said:

not all shows/channels convert well, sometimes you end up wit a messed up file, but hey it's free...the HD channels work the best, the old retro shows sometimes not so much.

This is why using the MCEBuddy ARCHIVE feature is nice.  Instead of deleting the original recording it will archive it so you can always revert back to it and do manual commercial cutting.  It ads a manual step of deleting items from ARCHIVE but well worth it IMHO.

Link to comment
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...