You’ll need to provide some environment variables to the command line. Note: The example in that particular post is from Windows, so the environment variable will be different.
I’m curious what you’re attempting to accomplish though. Running it manually will not actually modify the file to remove commercials, nor will it update Plex’s database with commercial markers for the file. It will just produce and EDL file and some logging.
When Plex performs commercial skipping after recording, it runs its commercial skipper and then performs additional post-processing using the created EDL file. I’ve not seen anyone reproduce that step of the process directly from the command-line.
You can configure Plex to go back and run its commercial removal/marking process on existing media files; the configuration requirements are described in the post I linked. Just keep in mind that a DVR must be configured in Plex for this to work.
It is plex that runs the commercial skipper and send the error about codec
and it result in a 0 byte TS file
Plex and DVR are well configured like documentation and post here
here the content of the FFMPEG_EXTERNAL_LIBS
-rw-r–r-- 1 nobody users 278536 May 17 14:58 libaac_decoder.so
-rw-r–r-- 1 nobody users 200456 May 17 14:58 libaac_encoder.so
-rw-r–r-- 1 nobody users 143624 May 17 14:58 libac3_decoder.so
-rw-r–r-- 1 nobody users 155176 May 17 14:58 libac3_encoder.so
-rw-r–r-- 1 nobody users 304848 May 17 14:58 libdca_decoder.so
-rw-r–r-- 1 nobody users 1652640 May 17 14:58 libh264_decoder.so
-rw-r–r-- 1 nobody users 1542400 May 17 14:58 libhevc_decoder.so
-rw-r–r-- 1 nobody users 1789960 May 17 14:58 liblibx264_encoder.so
-rw-r–r-- 1 nobody users 131688 May 17 14:58 libmp3_decoder.so
-rw-r–r-- 1 nobody users 652344 May 17 14:58 libmpeg2video_decoder.so
-rw-r–r-- 1 nobody users 874432 May 17 14:58 libmpeg4_decoder.so
-rw-r–r-- 1 nobody users 1770912 May 17 14:58 libvp9_decoder.so
Strange. I use PMS on Docker (not Unraid though) and commercial skipping works fine for me. In fact, I’m in the process of running about nine episodes through ad skipping right now and just verified the first couple have succeeded.
I’m running PMS Version 1.27.0.5849 currently, but this has worked consistently through all versions back as far as I can recall.
Full server logs may be needed to shed some light on what’s going on. My previous experience is that issues such as these are almost always caused by permissions problems.
I use an HDHomeRun Connect 4K. I’m in the US, which means an ATSC 1.0 signal with mpeg2video (and AC3 audio). The tuner supports ATSC 3.0 which uses HEVC; I may be able to perform a test with that as my area does have ATSC 3.0 broadcasts.
You may want to also ensure that your /tmp directory is 777 as well; I’ve seen some strange issues reported on the forums where the permissions for /tmp were somehow changed such that Plex couldn’t write to it.
Your logs show that the commercial skipper is actually completing successfully (at least for the attempt in the most recent log):
Jun 08, 2022 16:11:22.612 [0x1549d26dbb38] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Commercial Skipper' exit code for process 5648 is 0 (Commercials found)
Jun 08, 2022 16:11:22.613 [0x1549cbe03b38] DEBUG - [Grabber/0442def4734f86fd8d8db95a385d5b5855ba975a/AdDetector] EDL built after 83.4 seconds.
Where it appears to be failing is the next step, where it attempts to actually use Plex Transcoder (ffmpeg) to actually remove the commercials from the file using the segment list (itself built from the EDL):
Jun 08, 2022 16:11:22.621 [0x1549cbe03b38] DEBUG - [Grabber/0442def4734f86fd8d8db95a385d5b5855ba975a/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/994f4ee-4302-linux-x86_64/' X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxx "/usr/lib/plexmediaserver/Plex Transcoder" -y -safe 0 -skip_before_video_key 1 -skip_before_inpoint 1 -offset_inout 1 -i /data/Videos/ReplayTV/.grab/0442def4734f86fd8d8db95a385d5b5855ba975a-eae8a1c71a1e376267d0bfa4720bce51ec243047/segment-list.txt -map 0 -c copy -loglevel quiet -loglevel_plex error "/data/Videos/ReplayTV/.grab/0442def4734f86fd8d8db95a385d5b5855ba975a-eae8a1c71a1e376267d0bfa4720bce51ec243047/Section de recherches (2006) - S11E07 - Manipulations-comskipped.ts"
Jun 08, 2022 16:11:22.631 [0x1549cbe03b38] DEBUG - [Grabber/0442def4734f86fd8d8db95a385d5b5855ba975a/JobRunner] Jobs: Starting child process with pid 5659
Jun 08, 2022 16:11:22.729 [0x1549c9ba4b38] ERROR - [Transcoder] [h264 @ 0x149f539c95c0] mmco: unref short failure
Jun 08, 2022 16:11:22.729 [0x1549c9ba4b38] ERROR - [Transcoder] [h264 @ 0x149f539c95c0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
Jun 08, 2022 16:11:23.095 [0x1549c9ba4b38] ERROR - [Transcoder] [h264 @ 0x149f5312bdc0] mmco: unref short failure
Jun 08, 2022 16:11:23.096 [0x1549c9ba4b38] ERROR - [Transcoder] [h264 @ 0x149f5312bdc0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
Jun 08, 2022 16:11:23.473 [0x1549c9ba4b38] ERROR - [Transcoder] [mpegts @ 0x149f530fd040] sample rate not set
Jun 08, 2022 16:11:23.474 [0x1549c9ba4b38] ERROR - [Transcoder] Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Jun 08, 2022 16:11:23.474 [0x1549c9ba4b38] ERROR - [Transcoder] Error initializing output stream 0:5 --
Jun 08, 2022 16:11:23.474 [0x1549c9ba4b38] ERROR - [Transcoder]
Jun 08, 2022 16:11:23.480 [0x1549d26dbb38] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 5659 is 1 (No commercials found)
Have you tried (recently?) just having it mark ads for skipping instead of removing them?