I am running on a CentOS 7 VM and the post processing that removes commercials has been failing for the past 4 months or so. It was working just fine for many months prior. This is my second time posting and hopefully I will actually get some help this time. I have tried loading Plex on a fresh VM and get the exact same problem.
I don’t completely understand how the removal works, but it appears that there is a text file that is supposed to get moved from the temp recording directory to the permanent storage location. The .ts file gets moved without issue, but the move of the .txt file fails.
Help getting this fixed would be much appreciated. Please let me know if there are any more details that are needed.
from a command line, invoke Plex Commercial Skipper - it’s the same as comskip itself, so you can use their public documentation or ask it for options…
The way commercial removal works is that plex commercial skipper / comskip scans the recording and generates an EDL file based on heuristics configured in the comskip.ini file.
The EDL file is a set of timecode references that tell the transcoder what segments to cut out of the file. The EDL file doesn’t need to be in the final directory - it’s a temp file and gets removed once the cut recording file gets written.
Have you validated that the programs you want commercials cut from has commercial removal turned on?
FWIW, on Windows, I’ve been replacing plex commercial skipper with a renamed donator version of Comskip - if all else fails, you might try that.
Over on the Comskip forum they said that the error I got when I manually ran it is that is looking for a hardware decoder. I do not have hardware acceleration checked in transcoding. Is there somewhere else I should be checking to turn that off?
I’m not sure I know what to make of that - the reason why I started replacing plex commercial skipper with Comskip was because it was failing to talk to the codecs on my local machine - Comskip has them embedded. The net effect of this was that plex commercial skipper wasn’t able to read things like an h264 file Thankfully, replacing the file doesn’t have any downsides (and since it’s the donator version, it’s actually faster). You might try it - at this point it can’t hurt.
The only place I can think of is in settings overall - do you have the HW acceleration check box checked in Transcoder?
Nope, I double checked that HW acceleration is unchecked. I might have to try Comskip on my own. It would just be nice if the Plex devs actually cared about their product and helped out in here.
For anyone interested, I think I’ve figured some stuff out. It would seem that comskip no longer works when recording onto a SMB/CIFS share (not sure if that’s a Plex change or an SMB change that broke that). My local storage on the VM isn’t very large. So I needed to come up with a way to automate the move. This turned out to be way harder than it sounds.
I’m using Centos 7, once you add shopt -s extglob to /etc/bashrc the following manual command worked to move just the finished recording and leave the .grab and Transcoder directories. (media/tmp is local and /media/tv is SMB) mv -n /media/tmp/*!(.grab)!(Transcoder) /media/tv
After figuring out that /tmp was not enabled by default and then enabling it, I was able to create a cron job for the root user. But, it turns out that the above syntax doesn’t work in a cron job.
After beating my head against the wall for a while I got on stack overflow and we came up with the following bash script that seems to be working.
#!/bin/bash
for file in /media/tmp/*; do
[[ ! $file =~ Transcode|\.grab$ ]] && mv -n "$file" /media/tv/
done
The cron job looks like this
10 */3 * * * /root/recordingmove.sh
This runs the script on the 10th minute every 3 hours, the 10 minutes gives comskip time to do its thing. I haven’t decided if I’m going to leave it at that or drop it down to every hour or two.