What version of Linux are you all using for Comskip? I’ve tried Ubuntu 14.04 and 16.04 and have run into installation issues with both.
I’ve used it on both;
The hardest part is getting the correct versions of GNU autotools installed.
I’ll have to check how I did that and report back
I’m not having problems with autotools - my issues are with having the correct versions of LIBAV and FFMPEG that Comskip is looking for.
For ffmpeg I built it from this guide:
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
and for LIBAV, I think ( I need to check) it was sudo apt-get install libavutil-dev
@hthighway I think I heard somebody mention there would be UI support for post processing actions. Do you suppose there will be an easy setup for Comskip?
@codahq said:
@hthighway I think I heard somebody mention there would be UI support for post processing actions. Do you suppose there will be an easy setup for Comskip?
The hardest part with setting up comskip, if you’re not on Windows, is installing it.
And adding it to the Post-Processing feature is the easy part. ![]()
I imagine the only thing the UI will do will be to allow you to select a script or executable through the browser instead of having to issue a curl command
OK… I have the post processing script working.
- script in scripts folder, a bat file.
- added it to post-processing setup in plex.
- Ran a recording, saw the bat file had created log
Here is the issue. the script has a curl command to ex3ecute a refresh on my primary plex server. Here it is:
curl -vvv --trace-ascii k:\scripts race.log http://mediactr:32400/library/sections/31/refresh?X-Plex-Token=XXXXXXXXXX
When plex runs it… No refresh.
When I run it from Windows explorer, it DOES refresh.
the trace.log from both is exactly the samer.
@hthighway said:
I’ve used it on both;
The hardest part is getting the correct versions ofGNU autotoolsinstalled.
I’ll have to check how I did that and report back
I believe that’s where I’ve been hung up, any info there would be appreciated. Tried my primary PMS (Debian 7 Wheezy) and a Ubuntu 16.04 box, but complaining about argtable2 version.
The Comskip build system is now prepared. To build here, run: ./configure make root@xxxxx:/tmp/Comskip# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for fmax in -lm... yes checking for sem_post in -lpthread... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking whether host is win32... no checking whether host is darwin... no checking whether to enable donator features... yes checking whether to build a statically linked binary... no checking whether to build with debugging options enabled... no ./configure: line 3608: PKG_PROG_PKG_CONFIG: command not found ./configure: line 3612: syntax error near unexpected token argtable2, ./configure: line 3612: PKG_CHECK_MODULES(argtable2, argtable2 >= 2.12)
root@xxxxxxxx:/# dpkg -s libargtable2-0 | grep Version Version: 12-1
I just don’t know how to install version 2.12 instead of 12.1 ![]()
Debian 8 Jessie doesn’t even appear to be 2.12
https://packages.debian.org/search?keywords=argtable2
@jwaltrip4 said:
curl -vvv --trace-ascii k:\scripts race.log http://mediactr:32400/library/sections/31/refresh?X-Plex-Token=XXXXXXXXXX
I think you need quotes around the URL
curl -vvv --trace-ascii k:\scripts race.log "http://mediactr:32400/library/sections/31/refresh?X-Plex-Token=XXXXXXXXXX"
Not sure why quotes would make a difference… but I have added. Waiting for next recording…
@hthighway said:
ForffmpegI built it from this guide:
CompilationGuide/Ubuntu – FFmpegand for LIBAV, I think ( I need to check) it was
sudo apt-get install libavutil-dev
Thanks. I had actually used that same guide and it did get me further along than just installing from the trusty repository.
yes, libavutil-dev, libavformat-dev, and libavcodec-dev but those are all much older than what Comskip is looking for.
It looks like libavutil libavformat and libavcodec are supposed be included with ffmpeg (and the versions look closer to what comskip is looking for) rather than installed separately. I’m going to have to go through that guide again to see if i need to change an option while compiling.
I think I used this as well to get the updated versions of libavutil-dev
See: http://installion.co.uk/ubuntu/vivid/universe/l/libavutil-dev/install/index.html
@hthighway said:
@TheSupremeMonkey said:
@TheSupremeMonkey said:
curl --header "X-Plex-Token:YOURTOKEN" -X PUT "https://YOURIP:32400/livetv/dvrs/YOURDVRKEY/prefs?postprocessingScript=/path/to/script"You need to put your token in the header if you have a Plex Home setup. You also need to replace the X in the example with the DVR key from the XML at “https://YOURIP:32400/livetv/dvrs”, in my case it was 3. Then you can set the preference.
You can also just add it to the end of the URL with a
&curl -X PUT "https://YOURIP:32400/livetv/dvrs/YOURDVRKEY/prefs?postprocessingScript=/path/to/script&X-Plex-Token:YOURTOKEN"
I tired that and it didn’t work when setting the preference, but maybe that was before I figured out the right DVR key or something.
ARRGGHH
Here is what I want to happen…
- Show is recorded (on DVR PMS)
- After show is recorded it is placed in Recorded TV folder (on DVR PMS)
- Post Processing then send refresh command to Primary PMS
- I can now see shows as soon as they are recorded
Here is what actrualy happens
- Show is recorded (on DVR PMS)
- Post Processing then send refresh command to Primary PMS
- After pose processing is complete it is placed in Recorded TV folder (on DVR PMS)
- Refresh is hit or miss because show is not in Recorded TV folder at the time refresh is run
Any work around for this?
@DavidIrwin said:
@hthighway said:
Yes, plex will wait for the script to finish before moving on
OK, so if I create a script which (pseudo code):
- receives filename as parameter
- calls web service (in another docker)
- waits until a file with a particular name is created (I’m thinking {randomly generated filename}.log also passed to the web service
- when the file appears count to 10 (just in case something takes longer than expected)
- read the log file created (so that the web service process steps & success/error status appear in the plex logs)
- delete the log file
- exit
The web service will then simply need to access the file it is passed the name and path of (I can make sure the processing docker uses the same root paths as the PMS server docker), process it using Comskip, FFMpeg, etc and at the end rename it’s log file to the name passed to it.
I’m working on a web service that does pretty much exactly what you want. The key I think is to either keep a persistent HTTP connection open between the postprocessing client and the postprocessing server. That way error messages and progress reports can be passed immediately to the client for replay back into the Plex logs. Once I get something working I’ll be sticking it up on GitHub. The reason that I’m doing it this way is so that I can eventually offload the commercial skipping and transcoding to a separate server. That’s probably not necessary now, but I can see problems down the road if the server is trying to postprocess a couple of recordings at the same time it’s transcoding other shows for streaming to active clients.
MCE Buddy can also use ShowAnalyzer. ComSkip is more actively supported. I wanted to like ShowAnalyzer, but never got there…
@jcollie said:
I’m working on a web service that does pretty much exactly what you want. The key I think is to either keep a persistent HTTP connection open between the postprocessing client and the postprocessing server. That way error messages and progress reports can be passed immediately to the client for replay back into the Plex logs. Once I get something working I’ll be sticking it up on GitHub. The reason that I’m doing it this way is so that I can eventually offload the commercial skipping and transcoding to a separate server. That’s probably not necessary now, but I can see problems down the road if the server is trying to postprocess a couple of recordings at the same time it’s transcoding other shows for streaming to active clients.
I did think about that approach but I am an infrastructure guy and not a developer so don’t have the skills to create a webservice like that. I started trying to create my first docker last night which is certainly an interesting process but think I have the basics. Just waiting now for the other guys in this thread to work out how to get all the correct versions of the various tools to happily coexist in one image and then I should be able to put it together :-S
This may be a stupid question so forgive me but…
Is this actually actually taking the video that Plex has recorded in mpeg -> remuxing it to mkv while removing commercials?
In WMC, Comskip just created log files that it used for indexing the commercial starts / ends. I’m ok with this process as well but wondering if that’s what is going on.
Also, while it is doing this process, will be shown as a video that can be watched? I would rather for it not to be available but not sure how it is handled
Great thread… Am new to MCEBuddy, I’m failing badly on how long it takes? So quick question, how long do you expect for the trandscode and comskip to complete for example a 1hour program?