Skip to content

Instantly share code, notes, and snippets.

Last active Aug 3, 2020
What would you like to do?
Comskip for Linux

Comskip Setup for Linux

This will install comskip, mkvpropedit, ffmpeg, and

  • Install Comskip following the Instrutions shown here:

    Pro Tip use `./configure --enable-dontator` and then make a donation to
  • Install mkvtoolnix, which include mkvpropedit here: this is for setting the audio language to English from Unknown

  • Clone the PlexComskip repo:

  • Copy PlexComskip.conf.example to PlexComskip.conf and edit as necessary (defaults should be pretty good)

  • create a (or whatever you want to call it) file to include

      /usr/bin/mkvpropedit "$1" --edit track:a1 --set language=eng --edit track:v1 --set language=eng
      sleep 10
      /usr/bin/python /path/to/ "$1"
Copy link

DaveInTO commented Oct 14, 2016

Any idea why when i run it from command line it works perfectly.
But when Plex runs it, it doesn't work?
2016-10-13 21:00:11,744 [7f6611] PlexComskip got invoked from /usr/local/bin/
2016-10-13 21:00:12,518 [7f6611] Using session ID: 7f66115f-9cd4-47d2-a44c-e777b603470e
2016-10-13 21:00:12,519 [7f6611] Using temp dir: /tmp/7f66115f-9cd4-47d2-a44c-e777b603470e
2016-10-13 21:00:12,519 [7f6611] Using input file: /Videos/TV/.grab/751659b96f8bae8b244f7abc06a1e6b87bb696f1/Grey's Anatomy (2005) - S13E04 - Falling Slowly.mkv
2016-10-13 21:00:12,520 [7f6611] Copying file to work on it: /tmp/7f66115f-9cd4-47d2-a44c-e777b603470e/Grey's Anatomy (2005) - S13E04 - Falling Slowly.mkv
2016-10-13 21:00:23,935 [7f6611] [comskip] Command: ['/usr/local/bin/comskip', '--output', '/tmp/7f66115f-9cd4-47d2-a44c-e777b603470e', '--ini', '/usr/local/bin/comskip.ini', "/tmp/7f66115f-9cd4-47d2-a44c-e777b603470e/Grey's Anatomy (2005) - S13E04 - Falling Slowly.mkv"]
2016-10-13 21:00:23,967 [7f6611] Using EDL: /tmp/7f66115f-9cd4-47d2-a44c-e777b603470e/Grey's Anatomy (2005) - S13E04 - Falling Slowly.edl
2016-10-13 21:00:23,968 [7f6611] Keeping segment from 0.0 to the end of the file...
2016-10-13 21:00:23,968 [7f6611] [ffmpeg] Command: ['/usr/bin/ffmpeg', '-i', "/tmp/7f66115f-9cd4-47d2-a44c-e777b603470e/Grey's Anatomy (2005) - S13E04 - Falling Slowly.mkv", '-ss', '0.0', '-c', 'copy', 'segment-0.mkv']
2016-10-13 21:00:24,015 [7f6611] Going to concatenate 0 files from the segment list.
2016-10-13 21:00:24,015 [7f6611] [ffmpeg] Command: ['/usr/bin/ffmpeg', '-y', '-f', 'concat', '-i', '/tmp/7f66115f-9cd4-47d2-a44c-e777b603470e/segments.txt', '-c', 'copy', "/tmp/7f66115f-9cd4-47d2-a44c-e777b603470e/Grey's Anatomy (2005) - S13E04 - Falling Slowly.mkv"]
2016-10-13 21:00:24,054 [7f6611] Sanity checking our work...
2016-10-13 21:00:24,054 [7f6611] Output file size was too similar (doesn't look like we did much); we won't replace the original: 1.7GB -> 1.7GB
2016-10-13 21:00:24,054 [7f6611] Leaving temp files in: /tmp/7f66115f-9cd4-47d2-a44c-e777b603470e
2016-10-13 21:00:24,054 [7f6611] Done processing!

Copy link

pokes135 commented Oct 21, 2016

I had the same issue. I was able to run by cli successfully as well, except my ffmpeg (Ubuntu 16.04) install had a different ffmpeg binary path:
PlexComskip.conf default path:
PlexComskip.conf my Ubuntu path:

Thanks hthighway and would you know why the script won't run in Plex? Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment