Jump to content

ComSkipper ... A Emby Plugin that skips commercials


BillOatman

Recommended Posts

BillOatman
7 hours ago, Spaceboy said:

hi, before you do that, i am having some trouble with emby reading the edl files. edl naming and content below

image.png.138ac0b955d5649f5cb0ea8dc4ebb929.png

image.png.c754a9571987b26b3cd504efacce7224.png

Can you turn on debug logging and send me the embyserver file? It should work so long as the files names are the same except the extension.  Are there spaces in your file name? 

Also, if Emby doesn't have permissions to read the EDL file this can happen as well.

Edited by BillOatman
Link to comment
Share on other sites

BillOatman

I haven't tried these comskip.ini changes yet, but I'm reading good things.

Quote

intelligent_brightness=0 to intelligent_brightness=1   ;  It will “use a USA specific algorithm to tune some of the settings”.

cut_on_ar_change=1 to cut_on_ar_change=2 ; Changing to 2 makes for more of a seamless transition when skipping

Well that was disappointing.  Behaved worse for me.  Changing back :)

Edited by BillOatman
Link to comment
Share on other sites

ttgapers

This looks good, but it looks like there is a weird spacing issue. I sent my run to a log file and this is the result.

BLAH:\_mb\livetv>set drive=BLAH:  

BLAH:\_mb\livetv>set folder=\_mb\livetv\recordings\default\NHL Hockey (2007)\  

BLAH:\_mb\livetv>set filename=NHL Hockey 2022_01_01_19_00_00 - Ottawa Senators at Toronto Maple Leafs  

BLAH:\_mb\livetv>BLAH:\_comskip\comskip --ini=BLAH:\_comskip\custom\comskip.ini "BLAH: \_mb\livetv\recordings\default\NHL Hockey (2007)\ NHL Hockey 2022_01_01_19_00_00 - Ottawa Senators at Toronto Maple Leafs .ts"  
The commandline used was:
BLAH:\_comskip\comskip --ini=BLAH:\_comskip\custom\comskip.ini "BLAH: \_mb\livetv\recordings\default\NHL Hockey (2007)\ NHL Hockey 2022_01_01_19_00_00 - Ottawa Senators at Toronto Maple Leafs .ts"

Setting ini file to BLAH:\_comskip\custom\comskip.ini as per commandline
Using BLAH:\_comskip\custom\comskip.ini for initiation values.

 

BLAH is any locally accessible disk drive (not network). Comskip is the same install being used by mcebuddy (no issue) and same ini file. If you look closely to the path passed to comskip, it seems it's adding a space between the "drive" and "folder" variables as it builds the path. Thus it fails.

Anyone else experiencing this issue? Running 1.0.1.0

Note, I also tested to a network share and it does the same.

Edited by ttgapers
Link to comment
Share on other sites

HarryMuscle

This would be a great start for general EDL file support which can be used for more than just skipping commercials.  Looking forward to it being made open source so others can add features, etc.

 

Thanks,

Harry

  • Like 1
Link to comment
Share on other sites

BillOatman
13 hours ago, ttgapers said:

This looks good, but it looks like there is a weird spacing issue. I sent my run to a log file and this is the result.

BLAH:\_mb\livetv>set drive=BLAH:  

BLAH:\_mb\livetv>set folder=\_mb\livetv\recordings\default\NHL Hockey (2007)\  

BLAH:\_mb\livetv>set filename=NHL Hockey 2022_01_01_19_00_00 - Ottawa Senators at Toronto Maple Leafs  

BLAH:\_mb\livetv>BLAH:\_comskip\comskip --ini=BLAH:\_comskip\custom\comskip.ini "BLAH: \_mb\livetv\recordings\default\NHL Hockey (2007)\ NHL Hockey 2022_01_01_19_00_00 - Ottawa Senators at Toronto Maple Leafs .ts"  
The commandline used was:
BLAH:\_comskip\comskip --ini=BLAH:\_comskip\custom\comskip.ini "BLAH: \_mb\livetv\recordings\default\NHL Hockey (2007)\ NHL Hockey 2022_01_01_19_00_00 - Ottawa Senators at Toronto Maple Leafs .ts"

Setting ini file to BLAH:\_comskip\custom\comskip.ini as per commandline
Using BLAH:\_comskip\custom\comskip.ini for initiation values.

 

BLAH is any locally accessible disk drive (not network). Comskip is the same install being used by mcebuddy (no issue) and same ini file. If you look closely to the path passed to comskip, it seems it's adding a space between the "drive" and "folder" variables as it builds the path. Thus it fails.

Anyone else experiencing this issue? Running 1.0.1.0

Note, I also tested to a network share and it does the same.

You seem to be having trouble running comskip.  The version of the plugin won't matter for that.  If you attach your bat file we can have a look. Mine is attached.

comskipRecordings.bat

Edited by BillOatman
Link to comment
Share on other sites

ttgapers
8 minutes ago, BillOatman said:

If you attach your bat file we can have a look.

Agreed don't think it has anything to do with Comskip.

Here is my batch file.

 

set drive=%~d1 
set folder=%~p1 
set filename=%~n1 
C:\_comskip\comskip --ini=C:\_comskip\custom\comskip.ini "%drive%%folder%%filename%.ts" 
%drive% 

Slightly modified to yours, but I also believe simplified, let me know if I am missing anything else. Thanks for this plugin and getting back to me also.

Link to comment
Share on other sites

BillOatman
7 minutes ago, ttgapers said:

Agreed don't think it has anything to do with Comskip.

Here is my batch file.

 

set drive=%~d1 
set folder=%~p1 
set filename=%~n1 
C:\_comskip\comskip --ini=C:\_comskip\custom\comskip.ini "%drive%%folder%%filename%.ts" 
%drive% 

Slightly modified to yours, but I also believe simplified, let me know if I am missing anything else. Thanks for this plugin and getting back to me also.

Do you have an extra space after d1?

Link to comment
Share on other sites

ttgapers
34 minutes ago, BillOatman said:

Do you have an extra space after d1?

Good question. Will check....there was a space at the end of each variable declaration. Will re-test.

@BillOatman - thanks working well!

Edited by ttgapers
Link to comment
Share on other sites

BillOatman
7 hours ago, Spaceboy said:

the attached log includes playback of the program associated with this edl file. it should have skipped the first 2mins 8s which by eye was correct

embyserver(2).txt 1.54 MB · 3 downloads Emmerdale 2021_12_31_19_00_00 - Emmerdale.edl 86 B · 2 downloads

Whats the name of the ,ts file on your drive for this show?

Link to comment
Share on other sites

Spaceboy
1 hour ago, BillOatman said:

Whats the name of the ,ts file on your drive for this show?

same as the .edl

image.thumb.png.405c2f93b0fedf242a08c25c6ab962cd.png

Link to comment
Share on other sites

Personally for Windows, I have not found any need to use a batch file for ComSkip as long as it is the only post processing job being run.  Comskip is smart enough that it automatically looks in the Comskip folder for the comskip.ini so getting it to run was simple.  As noted previously, using settings in the comskip.ini eliminates the need to delete the txt, log, and logo files manually or in the batch file.  I haven't experimented with Windows permissions, but when running Emby as a Windows service I would recommend verifying the service account has access to the Comskip folder.

image.png.83a1679ec2f0edf7837b084c57da75f2.png

For Linux, I get a bit more specific and place the comskip.ini in /etc and use the following.

image.png.c3d06b99c95abadbb6f8299fec7eae30.png

Link to comment
Share on other sites

ComSkipper on Linux does not seem to be working.  I have installed the ComSkipper plugin on my Linux server and verified that it is in both /var/lib/emby/plugins/ and /opt/emby-server/system/plugins/ as well as verified Linux permissions for the file.  I've also verified that the ComSkipper plugin is enabled. 

I set Emby logging to debug, played something and looked for errors in the log, but didn't find anything relevant.  The "embyserver" log does show the plugin being loaded at server startup.  Is there anything being logged by ComSkipper when it is in use?

Link to comment
Share on other sites

BillOatman
15 minutes ago, Spaceboy said:

same as the .edl

image.thumb.png.405c2f93b0fedf242a08c25c6ab962cd.png

Can you run with debug logging on with this dll and send me the log please.  I don't see whats going on.

 

ComSkipper1101.zip

  • Like 1
Link to comment
Share on other sites

BillOatman
Just now, richt said:

ComSkipper on Linux does not seem to be working.  I have installed the ComSkipper plugin on my Linux server and verified that it is in both /var/lib/emby/plugins/ and /opt/emby-server/system/plugins/ as well as verified Linux permissions for the file.  I've also verified that the ComSkipper plugin is enabled. 

I set Emby logging to debug, played something and looked for errors in the log, but didn't find anything relevant.  The "embyserver" log does show the plugin being loaded at server startup.  Is there anything being logged by ComSkipper when it is in use?

You should see this when a recording starts playing. 

Log.Debug("Playback Session = " + session + " Path = " + filePath);

But you should also see the standard log lines that it is loaded by Emby.  You are running standard or beta Emby?  It likely won't load on beta.

Link to comment
Share on other sites

Just now, BillOatman said:

You are running standard or beta Emby?  It likely won't load on beta.

That explains it.  Under Linux I'm running Emby beta. 

Link to comment
Share on other sites

Spaceboy
2 minutes ago, BillOatman said:

You should see this when a recording starts playing. 

Log.Debug("Playback Session = " + session + " Path = " + filePath);

But you should also see the standard log lines that it is loaded by Emby.  You are running standard or beta Emby?  It likely won't load on beta.

i'm also running beta

Link to comment
Share on other sites

BillOatman
1 minute ago, Spaceboy said:

i'm also running beta

I'm surprised actually.  Linux beta? 

Link to comment
Share on other sites

snake98

Just trying this out, and wondering if there is a way to get this to also run after conversion of recordings.  I convert from the mpg2 to hevc to save space.  The easiest way I know how is to edit the batch file and have it copy the file to the new name for the covered media.

Link to comment
Share on other sites

BillOatman
6 minutes ago, snake98 said:

Just trying this out, and wondering if there is a way to get this to also run after conversion of recordings.  I convert from the mpg2 to hevc to save space.  The easiest way I know how is to edit the batch file and have it copy the file to the new name for the covered media.

Not that I am aware of other than what you are doing.  That should work since EDL files operate on time.

Link to comment
Share on other sites

snake98

If anyone else wants the code that I used, here it is  My conversion profile is name "custom"

set profile= - custom
copy "%drive%%folder%%filename%.edl"  "%drive%%folder%%filename%%profile%.edl" 

 

Link to comment
Share on other sites

mike3821
On 02/01/2022 at 13:52, richt said:

Personally for Windows, I have not found any need to use a batch file for ComSkip as long as it is the only post processing job being run.  Comskip is smart enough that it automatically looks in the Comskip folder for the comskip.ini so getting it to run was simple.  As noted previously, using settings in the comskip.ini eliminates the need to delete the txt, log, and logo files manually or in the batch file.  I haven't experimented with Windows permissions, but when running Emby as a Windows service I would recommend verifying the service account has access to the Comskip folder.

image.png.83a1679ec2f0edf7837b084c57da75f2.png

For Linux, I get a bit more specific and place the comskip.ini in /etc and use the following.

image.png.c3d06b99c95abadbb6f8299fec7eae30.png

I did just this with the additional settings to the comskip.ini file and it doesn’t generate the other files.

Seems to be working good?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...