This will install comskip, mkvpropedit, ffmpeg, and PlexComskip.py
-
Install Comskip following the Instrutions shown here: https://github.com/erikkaashoek/Comskip
Pro Tip use `./configure --enable-dontator` and then make a donation to http://www.kaashoek.com/comskip/
-
Install mkvtoolnix, which include mkvpropedit here: https://mkvtoolnix.download/downloads.html#ubuntu this is for setting the audio language to English from Unknown
-
Clone the
PlexComskip
repo: https://github.com/ekim1337/PlexComskip.git -
Copy
PlexComskip.conf.example
toPlexComskip.conf
and edit as necessary (defaults should be pretty good) -
create a dvr.sh (or whatever you want to call it) file to include
#!/bin/sh /usr/bin/mkvpropedit "$1" --edit track:a1 --set language=eng --edit track:v1 --set language=eng sleep 10 /usr/bin/python /path/to/PlexComskip.py "$1"
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/PlexComskip.py
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!