Running Plex Commercial Skipper manually?

Running plex on an old readynas, so linux basically
I have pulled the environment variables from a pid as it is running the commercial skipper and get something like this:
EAE_ROOT=/apps/plexmediaserver/temp/pms-94144f9f-f99a-4936-8451-1b305027da92/EasyAudioEncoder
FFMPEG_EXTERNAL_LIBS=/apps/plexmediaserver/MediaLibrary/Plex\ Media\ Server/Codecs/6bd6751-1276-linux-ubuntu-x86_64/
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/apps/plexmediaserver/Binaries:$LD_LIBRARY_PATH
LIBVA_DRIVERS_PATH=/apps/plexmediaserver/Binaries/dri
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/apps/plexmediaserver/MediaLibrary
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
PWD=/
TMPDIR=/apps/plexmediaserver/temp

So I export those and I run a command like this
/apps/plexmediaserver/Binaries/Plex\ Commercial\ Skipper --ini=/apps/plexmediaserver/Binaries/Resources/comskip.ini --output=/data/Movies/Inside\ Out\ (2015)/ -t /data/Movies/Inside\ Out\ (2015)/Inside\ Out\ (2015).ts

but always get
Input #0, mpegts, from ‘/data/Movies/Inside Out (2015)/Inside Out (2015).ts’:
Duration: 01:59:57.15, start: 1.400000, bitrate: 4787 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), none(progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
Stream #0:10x101: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), s16p, 384 kb/s
Unsupported codec!
Could not open video codec
/data/Movies/Inside Out (2015)/Inside Out (2015).ts: could not open video codec

Any linux gurus or plex devs able to help me out? FYI the video is correctly identified as h.264 as I’m using an hd homerun extend that transcodes it to that format.

Same here… I’m thinking there’s something not getting linked in.

Would be great to be able to do this to troubleshoot and test comskip on recordings with less than phenomenal antenna signals.

I added this to mine, granted I am running on an Ubuntu 14.04 server so you’ll have to find the correct path.

FFMPEG_EXTERNAL_LIBS=/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/4b51335-1293-linux-ubuntu-x86_64/

What you can do is play a movie/show and tell it to transcode… while it’s playing check the PID for the transcoder (ps aux| grep Transcoder) and then check /proc/PID/environ to see what paths it loads to access the codecs.

Here is the exact command I ran:

FFMPEG_EXTERNAL_LIBS=/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/4b51335-1293-linux-ubuntu-x86_64/ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6 LD_LIBRARY_PATH=/usr/lib/plexmediaserver/ ./Plex\ Commercial\ Skipper --ini=/usr/lib/plexmediaserver/Resources/comskip.ini --output=/mnt/media/DVR/ /mnt/media/DVR/input.ts

It’s running now, only running around 125fps so it’s taking many minutes to process an hour of HD video. I’ll check the quality of the output when it finishes.

It processed but didn’t cut the video file up. Working on the next phase to actually use the result files to cut the commercials out.

Any lucky with this, by chance? I am seeing the call to Plex Commercial Skipper.exe in my logs which creates an .edl file along with a .txt file in the passed-in output directory.

However, the next thing that I see in the log that makes use of that output directory is a segment-list.txt that is not created by the call to Plex Commercial Skipper.exe:

Aug 09, 2019 07:01:55.023 [10228] DEBUG - Job running: EAE_ROOT='\\?\D:\Plex Media Server\Cache\Transcode\Sessions\EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='D\:\\Plex\ Media\ Server\\Codecs\\dd95667-2434-windows-x86\\' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' C:\Program Files (x86)\Plex\Plex Media Server\Plex Transcoder.exe -y -safe 0 -skip_before_video_key 1 -skip_before_inpoint 1 -offset_inout 1 -i "Z:\Broadcasts\Television Shows\.grab\534e840420c28f5ffb7c66e99f635e6bd824905a\segment-list.txt" -map 0 -c copy -loglevel quiet -loglevel_plex error "Z:\Broadcasts\Television Shows\.grab\534e840420c28f5ffb7c66e99f635e6bd824905a\Zane Grey Theater (1956) - S03E26 - The Sunrise Gun-comskipped.ts" 

segment-list.txt is not to be found anywhere, so :man_shrugging: :laughing:

However, I did find the following script online:

It seems to make use of the .edl file to create a segments.txt. Not sure if that is the same thing, however.

Obviously, it would be incredibly handy to be able to modify the comskip.ini and then rerun Plex Commercial Skipper.exe to see if it identifies/removes missed commercials.