Plex Optimize + Channels


More of “has this hack been managed” topic…

Has anyone successfully set up Plex to Optimize a show where recording is being handled by Channels? You can set the profile for the show, but with my current setup (pointing Plex to the Channels DVR folder), it starts trying to optimize as soon as it sees the file (i.e. when the recording starts).

I tried working with the Linux script in this sub, but it really works better for nightly transcodes; I want to start conversion as soon as the record is finished.

I know this is an old topic, the request for post-record transcodes, so perhaps this is also a check for an update there. I’d even be happy with the ability to run a post record hook script (as long as the requisite variables were available of course, to properly automate).

Boring context for those interested: My kid went off to college, and wants to:

  • stream a show (ok, it’s the Bachelor :wink: )
  • to her browser (Chrome)
  • semi-soon after it airs (usually an hour or so later)

but my Plex server is too slow to transcode it real time (AC3 and h264 from the Extend, OR the raw MPG w/o the Extend transcoding on) to what Chrome needs. I’ve asked her to try the Channels remote DVR but it seems to be similar problems.

I could change the Channels+Extend transcode to Mobile, but that’s going to downgrade everything I record, and I think it still leaves the audio in a format that needs transcoding (AC3->AAC).

Hence: a way to trigger optimization, somehow, when a record is finished, and ideally before comskip. :slight_smile:



What Channels DVR needs is a way to record to a temporary folder and then copy to the library as soon as it finishes recording.


I do this by waiting until after comskip is run. For my backup script, once the edl file is created the next pass will use that to verify everything’s fine and then moves the video file, the edl, and the json over to my server. That location is what Plex monitors.

The other way you could potentially do it is by modified time. If the file hasn’t been modified in a set time (maybe 5 minutes?) then create a new file or hard link file that Plex can see and do the optimization on.

I don’t do Plex optimization because my upload speed is really good, but something like that should work.


These pointed me in the right direction.

I have Hazel and I think I might set up a rule to copy the files from the DVR dir and then let Plex kick in and do its thing. (It can watch for file modification date/delta.) Then I can also have it go back and prune the copy and move the files back. Or something similar.

It’s not ideal because comskip kicks in pretty quickly it seems, and the CPU gets pegged trying to optimize the file while comskip is taking up a ton of CPU. (At least the last time I looked at it, it was running about 99% for a while.; I’m honestly not sure how much CPU comskip is supposed to take up.)

Anyway, the things we do for our kids (and maybe the fun of figuring it out :wink: ). Thanks for setting me on the path until the core adds some post-record options!