jsmith100 1 Posted February 11, 2024 Posted February 11, 2024 I successfully setup comskip and the emby_preprocessing.sh, with successful tests (Thank you for the well written instructions). The problem that i have now is that I can't get comskip to kickoff when I start a recording or once a recording has completed. I have the plugin installed, and as I said, it all works if I run it from the command line (Ubuntu config btw)... I am running Emby in docker, but I'm not sure that is the issue. I believe the issue may be with the PATH information, but again not 100% sure. I looked in the emby logs and didn't see anything to point me to a place to start troubleshooting. Another note and why I think it may be a PATH problem.. When I record a show, let's say yellowstone, the directory structure is this: X:/tvshows/yellowstone/yellowstone.ts. My preference is to just have all the tvshows record to the main tvshows directory, but Emby is automatically creating a directory for the shows. I went to the livetv xml and subdirectories is set to fals...I tested setting it to true to see what happens and all it does is create the following structure: embyserver.txt X:/tvshows/series/yellowstone/yellowstone.ts If someone can point me into the right place, that would be awesome! Thanks in advance for your time. Post processing Application: /usr/bin/comskip Post-processor command line arguments: -ini=/etc/comskip.ini "{path}"
Luke 40144 Posted February 11, 2024 Posted February 11, 2024 Hi, I think the issue is you’re trying to run a windows .bat file which isn’t going to work on Linux.
jsmith100 1 Posted February 11, 2024 Author Posted February 11, 2024 Thank you for the response. Initially, I was trying to use comskip from windows, but when that didn't work, I installed comskip in ubuntu. That's where I am now. Here are the instructions I followed to set it up in Ubuntu: Detecting & skipping commercials on Ubuntu v0.1.pdf I tested this from the CLI (ubuntu) and it processed. 1
jsmith100 1 Posted February 11, 2024 Author Posted February 11, 2024 Sorry for any confusion. No, it isn't working from Emby. It only works if I kick it off manually from the command line in ubuntu. It isn't automatically kicking it off from Emby. I don't even know if it is trying, to be honest (not sure where to look for a log). This problem is still there: The problem that i have now is that I can't get comskip to kickoff when I start a recording or once a recording has completed. I have the plugin installed, and as I said, it all works if I run it from the command line (Ubuntu config btw)... I am running Emby in docker, but I'm not sure that is the issue. I believe the issue may be with the PATH information, but again not 100% sure. I looked in the emby logs and didn't see anything to point me to a place to start troubleshooting. Another note and why I think it may be a PATH problem.. When I record a show, let's say yellowstone, the directory structure is this: X:/tvshows/yellowstone/yellowstone.ts. My preference is to just have all the tvshows record to the main tvshows directory, but Emby is automatically creating a directory for the shows. I went to the livetv xml and subdirectories is set to fals...I tested setting it to true to see what happens and all it does is create the following structure:
Luke 40144 Posted February 11, 2024 Posted February 11, 2024 Quote It isn't automatically kicking it off from Emby. I don't even know if it is trying, to be honest (not sure where to look for a log). In the previous log you provided it was trying and failing because you were attempting to use a windows .bat file on linux. Have you fixed this now by configuring it with something that linux supports, such as a .sh script? If you've done that and are still having an issue then please attach the emby server log. Thanks.
jsmith100 1 Posted February 11, 2024 Author Posted February 11, 2024 Starting a fresh test now and will attach logs.
TMCsw 180 Posted February 11, 2024 Posted February 11, 2024 17 hours ago, jsmith100 said: -ini=/etc/comskip.ini "{path}" should be (notice the 2 dashes) --ini=/etc/comskip.ini "{path}"
jsmith100 1 Posted February 11, 2024 Author Posted February 11, 2024 Let me change that and restart the recording. Thank you.
jsmith100 1 Posted February 11, 2024 Author Posted February 11, 2024 Made the changed, saved and kicked off the recording again. It didn't kick off. Here is the log. embyserver(3).txt
Luke 40144 Posted February 11, 2024 Posted February 11, 2024 2024-02-11 20:34:02.540 Error LiveTV: ProcessRun 'Recording 710313' Process error: *** Error Report *** Version: 4.8.1.0 Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3 Operating system: Linux version 5.15.133.1-microsoft-standard-WSL2 (root@1c602f52c2e4) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Oct 5 21:02:42 UTC 2023 Framework: .NET 6.0.25 OS/Process: x64/x64 Runtime: system/System.Private.CoreLib.dll Processor count: 32 Data path: /config Application path: /system System.ComponentModel.Win32Exception: System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/usr/bin/comskip' with working directory '/var/run/s6/services/emby-server'. No such file or directory Either the path is incorrect or the server is being denied access to it.
Luke 40144 Posted February 11, 2024 Posted February 11, 2024 What you might want to try is adding a script file somewhere underneath the server data folder, which is /config
jsmith100 1 Posted February 12, 2024 Author Posted February 12, 2024 My apologies, I got caught up in the SB... I presume this script filie would have PATH passed in and then kick off Comskip with that path? It should be stored in the emby/appdata/conf/ directory? i do havea a post processing script, but I didn't see anything where the working directory is set in the script (attached). Do you happen to know why/how that directory is being set as the working directory? I thought PATH was supposed to pass in the parameters for Comskip to use... this is the script that should start comskip after recording has started (during recording/playback, before complete). emby_preprocessing.sh
Luke 40144 Posted February 12, 2024 Posted February 12, 2024 Quote I presume this script filie would have PATH passed in and then kick off Comskip with that path? Well if it's your own hand-written script then you get to decide what the command line arguments are, but probably, yes.
Luke 40144 Posted February 12, 2024 Posted February 12, 2024 Quote It should be stored in the emby/appdata/conf/ directory? It doesn't have to be, but since we already know that emby server has access to this folder, then at least you wouldn't have to deal with that.
Luke 40144 Posted February 12, 2024 Posted February 12, 2024 Quote i do havea a post processing script, but I didn't see anything where the working directory is set in the script (attached). Do you happen to know why/how that directory is being set as the working directory? I thought PATH was supposed to pass in the parameters for Comskip to use... The path that is placed on the command line and the working directory are two different things. If the script is dealing with full paths then you usually don't need to worry about the working directory.
richt 86 Posted February 12, 2024 Posted February 12, 2024 On 2/10/2024 at 9:57 PM, jsmith100 said: I am running Emby in docker, Are you running Emby in a docker container and attempting to use comskip installed on the host system? I haven't found a way to do that.
BillOatman 575 Posted February 12, 2024 Posted February 12, 2024 3 hours ago, richt said: Are you running Emby in a docker container and attempting to use comskip installed on the host system? I haven't found a way to do that. Shared file system *might* work?
jsmith100 1 Posted February 12, 2024 Author Posted February 12, 2024 I guess I should be a little more clear about my configuration. My apologies: Server - Windows Server 2022 WSL2 - Ubuntu Docker Containers running in Ubuntu host (WSL2) Emby and a few others. Comskip running on Ubuntu WSL2 host
Q-Droid 884 Posted February 12, 2024 Posted February 12, 2024 If you're running the script from the container then everything it does has to be from the container point of view. The shell, commands, paths, etc. have to be as seen in the container.
jsmith100 1 Posted February 13, 2024 Author Posted February 13, 2024 So I created a script in config/config/ since I could see it from the container, and named it callcomskip.sh.. .Unfortunately that didn't work as it still doesn't see it. Which is strange since I can login to the container and see the config/config directory... I can create a file on the host and it will show up on the container (i.e. like you see below. the file callcomskip.sh can be seen and that is from sh to the container). /config/config # ls autoorganize.xml callcomskip.sh livetv.xml mb.lic system.xml users /config/config # 2024-02-13 00:55:39.736 Error LiveTV: Error running recording post processor *** Error Report *** Version: 4.8.1.0 Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3 Operating system: Linux version 5.15.133.1-microsoft-standard-WSL2 (root@1c602f52c2e4) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Oct 5 21:02:42 UTC 2023 Framework: .NET 6.0.25 OS/Process: x64/x64 Runtime: system/System.Private.CoreLib.dll Processor count: 32 Data path: /config Application path: /system System.ComponentModel.Win32Exception: System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/config/config/callcomskip.sh' with working directory '/var/run/s6/services/emby-server'. No such file
jsmith100 1 Posted February 13, 2024 Author Posted February 13, 2024 Also, I take it that the Emby container image is pretty locked down and you can't use dockerfile to do an apt-get install of comskip on image build... correct?
Q-Droid 884 Posted February 13, 2024 Posted February 13, 2024 The official Emby docker image is not created for such modifications but the Linuxserver image might have options. Search (forum search) for docker from within the Comskipper thread. You might find useful info there.
richt 86 Posted February 13, 2024 Posted February 13, 2024 Sounds like you're trying to run comskip installed on the Ubuntu host OS from the Emby docker container. That is way more complicated than just adding the post processing line in Emby. As I mentioned earlier, I haven't gotten it to work yet, but don't give up as there is a potential solution mention in the post below. It is another Docker container that monitors the recording folders on the host for new files and then runs comskip against them. Direct link to the docker-post-recording image - https://github.com/chacawaca/docker-post-recording 1
vdrover 56 Posted February 14, 2024 Posted February 14, 2024 On 2/12/2024 at 8:47 PM, richt said: As I mentioned earlier, I haven't gotten it to work yet, but don't give up as there is a potential solution mention in the post below. It is another Docker container that monitors the recording folders on the host for new files and then runs comskip against them. Direct link to the docker-post-recording image - https://github.com/chacawaca/docker-post-recording If you're using docker, this is the way.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now