PostProccessing: Usage Examples

@andy_d0 said:
This may be a stupid question so forgive me but…

Is this actually actually taking the video that Plex has recorded in mpeg → remuxing it to mkv while removing commercials?

In WMC, Comskip just created log files that it used for indexing the commercial starts / ends. I’m ok with this process as well but wondering if that’s what is going on.

Also, while it is doing this process, will be shown as a video that can be watched? I would rather for it not to be available but not sure how it is handled

The script can be set up to do just about anything you want. Below is an example of just marking commercials.

@hthighway said:
and here’s an excellant example of marking the commercials in the MKV with chapter markers instead of removing them.

See: https://forums.plex.tv/discussion/comment/1255591/#Comment_1255591

@Minxster said:
…Am new to MCEBuddy, I’m failing badly on how long it takes?[…] how long do you expect for the trandscode and comskip to complete for example a 1hour program?
Depends on whether or not you got the donator version of both MCEBuddy and Comskip.

Looks like it’s making some chapters. Can plex use them though? Also, any ideas on how to make CC into subtitles so they’re usable?

does the mcebuddy auto process when using the post processing feature?

i’ve had the mcebuddy and the bat going and the file just stays in grab, what triggers to file to be moved out of .grab?

@Wiidesire said:

@Minxster said:
…Am new to MCEBuddy, I’m failing badly on how long it takes?[…] how long do you expect for the trandscode and comskip to complete for example a 1hour program?
Depends on whether or not you got the donator version of both MCEBuddy and Comskip.

Donator for MCEBuddy, not yet for Comskip due to slowness… It’s taking around 4 hours to process my shows with a Xeon E3-1240 (3.6h=ghz / 4 core)

@Minxster said:
Donator for MCEBuddy, not yet for Comskip due to slowness… It’s taking around 4 hours to process my shows with a Xeon E3-1240 (3.6h=ghz / 4 core)

I have a E3-1230 V2 3.3GHz, and with the donated version of Comskip, a 3 hour football game takes a about 15 minutes to complete

@jldjbarr said:

@andy_d0 said:
This may be a stupid question so forgive me but…

Is this actually actually taking the video that Plex has recorded in mpeg → remuxing it to mkv while removing commercials?

In WMC, Comskip just created log files that it used for indexing the commercial starts / ends. I’m ok with this process as well but wondering if that’s what is going on.

Also, while it is doing this process, will be shown as a video that can be watched? I would rather for it not to be available but not sure how it is handled

The script can be set up to do just about anything you want. Below is an example of just marking commercials.

@hthighway said:
and here’s an excellant example of marking the commercials in the MKV with chapter markers instead of removing them.

See: https://forums.plex.tv/discussion/comment/1255591/#Comment_1255591

Ok thank you! I’ll have to give this a look soon

@hthighway said:

@Minxster said:
Donator for MCEBuddy, not yet for Comskip due to slowness… It’s taking around 4 hours to process my shows with a Xeon E3-1240 (3.6h=ghz / 4 core)

I have a E3-1230 V2 3.3GHz, and with the donated version of Comskip, a 3 hour football game takes a about 15 minutes to complete

Thanks Paul.

@Minxster said:
Donator for MCEBuddy, not yet for Comskip due to slowness… It’s taking around 4 hours to process my shows with a Xeon E3-1240 (3.6h=ghz / 4 core)
There is your issue.
The free version of comskip that comes bundled with MCEBuddy limits the processing speed of HD and h.264 video to 0.5x ( half of playback speed).
The DONATOR version of Comskip removes that restriction and can speed commercial detected between 2x and 10x (depending upon your processor). Essentially the DONATOR version has no limit (the free version is capped to 0.5x in the software).
https://mcebuddy2x.codeplex.com/discussions/535567

@Wiidesire said:

@Minxster said:
Donator for MCEBuddy, not yet for Comskip due to slowness… It’s taking around 4 hours to process my shows with a Xeon E3-1240 (3.6h=ghz / 4 core)
There is your issue.
The free version of comskip that comes bundled with MCEBuddy limits the processing speed of HD and h.264 video to 0.5x ( half of playback speed).
The DONATOR version of Comskip removes that restriction and can speed commercial detected between 2x and 10x (depending upon your processor). Essentially the DONATOR version has no limit (the free version is capped to 0.5x in the software).
https://mcebuddy2x.codeplex.com/discussions/535567

Thanks Wiidesire - I’ll get my ar$s into gear and get the latest version of Comskip and re-test.

Here is what I found with post processing and folder frefresh:

How Plex DVR works:

  1. movie is recorded and stored in .grab directory
  2. post processing is called. note files are still in .grab directory
  3. script called by post processing runs and completes
  4. movie, only then is copied into final recorded tv folder

What I ended up doing was to use the Windows start command in my script to call another script with a time delay and the refresh statement. this works as I intended now.

  • post process script is called
  • script uses windows start to call actual refresh script
  • post process script then ends
  • DVR moves file into proper folder
  • timeout ends on refresh script and it refreshed folder

@jwaltrip4 said:
Here is what I found with post processing and folder frefresh:

How Plex DVR works:

  1. movie is recorded and stored in .grab directory
  2. post processing is called. note files are still in .grab directory
  3. script called by post processing runs and completes
  4. movie, only then is copied into final recorded tv folder

What I ended up doing was to use the Windows start command in my script to call another script with a time delay and the refresh statement. this works as I intended now.

  • post process script is called
  • script uses windows start to call actual refresh script
  • post process script then ends
  • DVR moves file into proper folder
  • timeout ends on refresh script and it refreshed folder

Glad you got it sorted!
Does your destination (non-DVR) PMS not support Automatic Library Updates?
Or is the media on a network share mounted via SMB, NFS, AFP, or similar?

Update my library automatically
Typically, the most desirable way to keep your Libraries updated is using the Update my library automatically feature. This uses capabilities of the operating system to detect when content has changed and then initiate a Library update.
Note: In most cases, this should work for content on local filesystems. It will generally not work for network shares mounted via SMB, NFS, AFP, or similar.

REF: https://support.plex.tv/hc/en-us/articles/200289306-Updating-vs-Refreshing-a-Library

I have auto updates turned off on my primary.

I use the XMBC agents and TinyMediaManager to create metadata in the folders for the TV and Movies I rip. had too many issues with messed up or missing metadata (eclectic collection not in all databases). that works great for the stuff I rip… not so well for this :slight_smile:

So, I use the PP to send a refresh for the Recorded TV folder.

Of Course now, the issue I have is missing metadata on the recorded TV folder (another thread)

Just added a wrinkle to my copy of PlexComskip.py
Assuming my meager python skills are up to the task…
I added another layer to the script so that after it combines the non-commercial segments of the media it then uses ffmpeg to compress and convert the media to x264 before it places it in the Library

Using this setting to start with:
ffmpeg -i input.mkv -c:v libx264 -preset slow -crf 22 -c:a copy output.mkv

Will know soon if it works :slight_smile:

@hthighway said:
Just added a wrinkle to my copy of PlexComskip.py
Assuming my meager python skills are up to the task…
I added another layer to the script so that after it combines the non-commercial segments of the media it then uses ffmpeg to compress and convert the media to x264 before it places it in the Library

Using this setting to start with:
ffmpeg -i input.mkv -c:v libx264 -preset slow -crf 22 -c:a copy output.mkv

Will know soon if it works :slight_smile:

This works very well, so far.
Going to mess with the different presets and see which I like better, slow or medium

For now I’ve forked the original github and later today I will do a Pull Request to see if it can get added to PlexComskip

@Minxster said:
Great thread… Am new to MCEBuddy, I’m failing badly on how long it takes? So quick question, how long do you expect for the trandscode and comskip to complete for example a 1hour program?

Takes less than 5 minutes for comskip (donator version) to scan for commercials on a dual-core Pentium G3220 3GHz Haswell.

Not sure about the transcode part. I only transcode series I intend to keep that are not available on Blu-ray. So far, the series I currently follow are all available on blu (The Flash, Gotham, Legends of Tomorrow, Supernatural, AoS, etc). MCEBuddy is just a wrapper for ffmpeg (among other things), though, so probably same as how long Plex takes to optimize files at similar x264 presets.

@hthighway said:

@hthighway said:
Just added a wrinkle to my copy of PlexComskip.py
Assuming my meager python skills are up to the task…
I added another layer to the script so that after it combines the non-commercial segments of the media it then uses ffmpeg to compress and convert the media to x264 before it places it in the Library

Using this setting to start with:
ffmpeg -i input.mkv -c:v libx264 -preset slow -crf 22 -c:a copy output.mkv

Will know soon if it works :slight_smile:

This works very well, so far.
Going to mess with the different presets and see which I like better, slow or medium

For now I’ve forked the original github and later today I will do a Pull Request to see if it can get added to PlexComskip

Theoretically, medium and slow at crf 22 should be roughly the same visual quality. Slow will just use less bitrate (ergo smaller file) compared to medium.

@hthighway said:
I’ve used it on both;
The hardest part is getting the correct versions of GNU autotools installed.
I’ll have to check how I did that and report back

Finally got it working. Fresh install of Ubuntu 16.04.

FFMPEG with this guide CompilationGuide/Ubuntu – FFmpeg as discussed earlier.

The secret sauce was running export PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig before the ./autogen.sh when installing Comskip.

Same steps didn’t work on 14.04 - but I’m done monkeying around with it now that I’ve got it working.

Thanks @hthighway and @ml@kg6sed.com for the scripting examples. Couldn’t have gotten this working without those.

@jondhoughton Glad you got it sorted out!

Is this the donator version of comskip you guys are referring to? http://www.kaashoek.com/comskip/
If so, oppsed to what other version of comskip?