Jump to content

Show Intro Skip Option


Liquidfire88

Recommended Posts

Cheesegeezer
1 minute ago, rbjtech said:

lol - we have a habit of saying the same thing - again 🤣

At least it shows we are all on the same page in the dev group.

  • Agree 1
Link to comment
Share on other sites

BillOatman

I asked this in a commercial skip thread too, but is there a way for a plugin to cause playback to advance some number of seconds or frames? Swagger was broken the last time I looked and I don't know of good online documentation other than the swagger.  But I was thinking if that were possible, IntroSkip could monitor via webhooks and skip the intro automatically that way instead of inserting chapters.  I was thinking using ComSkip EDL files would be possible as well.  Talk to me @chefand @Cheesegeezer  :)

Link to comment
Share on other sites

rbjtech
13 minutes ago, BillOatman said:

I asked this in a commercial skip thread too, but is there a way for a plugin to cause playback to advance some number of seconds or frames? Swagger was broken the last time I looked and I don't know of good online documentation other than the swagger.  But I was thinking if that were possible, IntroSkip could monitor via webhooks and skip the intro automatically that way instead of inserting chapters.  I was thinking using ComSkip EDL files would be possible as well.  Talk to me @chefand @Cheesegeezer  :)

Capture.PNG.f12ac052dffa1f2e725912a0a7c53367.PNG

Some interesting ideas :)

ps - for swagger - in Chromium based browsers, due to COTS restrictions, you now have to use https://swagger and localhost only.  Firefox still works ok (for the moment).

We have asked the Dev's to update the link in the dashboard as it no longer works ..

edit

hmm - something like Remote Control may work ...

Remote control · MediaBrowser/Emby Wiki · GitHub

Edited by rbjtech
Link to comment
Share on other sites

25 minutes ago, BillOatman said:

I asked this in a commercial skip thread too, but is there a way for a plugin to cause playback to advance some number of seconds or frames? Swagger was broken the last time I looked and I don't know of good online documentation other than the swagger.  But I was thinking if that were possible, IntroSkip could monitor via webhooks and skip the intro automatically that way instead of inserting chapters.  I was thinking using ComSkip EDL files would be possible as well.  Talk to me @chefand @Cheesegeezer  :)

That is a very interesting idea.

There is no doubt, It is 100% possible to have the server automatically skip the intro for you.

 

Link to comment
Share on other sites

BillOatman
56 minutes ago, rbjtech said:

Capture.PNG.f12ac052dffa1f2e725912a0a7c53367.PNG

Some interesting ideas :)

ps - for swagger - in Chromium based browsers, due to COTS restrictions, you now have to use https://swagger and localhost only.  Firefox still works ok (for the moment).

We have asked the Dev's to update the link in the dashboard as it no longer works ..

edit

hmm - something like Remote Control may work ...

Remote control · MediaBrowser/Emby Wiki · GitHub

Thanks.  Yeah I looked at that remote control page too but nothing but the "normal" button pushes.

Link to comment
Share on other sites

Sessions. It is a general command to start playback at a certain amount of ticks.

Technically we'd be restarting playback, or possiblly resuming playback at a certain tick length.

Edited by chef
  • Like 1
Link to comment
Share on other sites

guardianali

Id like to jump on the bandwagon and give this a test and report on my experience. I have a sizeable database of shows. 

Is there a link to get the latest builds?

  • Like 1
Link to comment
Share on other sites

rbjtech
19 minutes ago, guardianali said:

Id like to jump on the bandwagon and give this a test and report on my experience. I have a sizeable database of shows. 

Is there a link to get the latest builds?

https://emby.media/community/index.php?/topic/101687-introskip-instructions-beta-releases/

The last post in the above thread has the latest public release - thanks for being a Beta tester :)

Link to comment
Share on other sites

BillOatman
1 hour ago, chef said:

Sessions. It is a general command to start playback at a certain amount of ticks.

Technically we'd be restarting playback, or possiblly resuming playback at a certain tick length.

I'll have to poke around in swagger and see whats up

  • Like 1
Link to comment
Share on other sites

rbjtech
1 hour ago, chef said:

Sessions. It is a general command to start playback at a certain amount of ticks.

Technically we'd be restarting playback, or possiblly resuming playback at a certain tick length.

Yep - thanks for the pointer @chef

I now have got the API to control to send a message to the session, and seek to a given location on the playback ... ;)

edit - StartPositionTicks are already written in the Chapter table in the library.db - so just seek to that and Bingo, Intro skipped ..

We just need to apply this to the current session (easy enough) and watch for it .. I'll take this into the Private Chat .. 👍

Exciting ...

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

BillOatman
18 minutes ago, rbjtech said:

Yep - thanks for the pointer @chef

I now have got the API to control to send a message to the session, and seek to a given location on the playback ... ;)

edit - StartPositionTicks are already written in the Chapter table in the library.db - so just seek to that and Bingo, Intro skipped ..

We just need to apply this to the current session (easy enough) and watch for it .. I'll take this into the Private Chat .. 👍

Exciting ...

Wouldnt you need to wait for the playback to get to that StartPositionTicks, then skip to the end position?

  • Agree 1
Link to comment
Share on other sites

rbjtech
18 minutes ago, BillOatman said:

Wouldnt you need to wait for the playback to get to that StartPositionTicks, then skip to the end position?

Yes absolutely - the key point is we have a way to skip on any playback session.

I need to catch up with @chef & @Cheesegeezer - but I think we just need to watch the current session and then deploy the message (if required) and Seek request when we get to the IntroStart as you say :)

Just tested it on a web session and FireTV session - both are working great (although the FireTV message is a bit large and 'in your face' lol, the web message is discreetly displayed in the lower left corner ..) 

Edited by rbjtech
Link to comment
Share on other sites

Cheesegeezer
3 hours ago, BillOatman said:

I asked this in a commercial skip thread too, but is there a way for a plugin to cause playback to advance some number of seconds or frames? Swagger was broken the last time I looked and I don't know of good online documentation other than the swagger.  But I was thinking if that were possible, IntroSkip could monitor via webhooks and skip the intro automatically that way instead of inserting chapters.  I was thinking using ComSkip EDL files would be possible as well.  Talk to me @chefand @Cheesegeezer  :)

Hey Bill, so you need to put https in the swagger api now, @rbjtech can explain better. New security on browsers.

as for webhooks… i have no idea mate, would need a session manager for sure.

Link to comment
Share on other sites

24 minutes ago, BillOatman said:

Wouldnt you need to wait for the playback to get to that StartPositionTicks, then skip to the end position?

I think that we could intercept the session playback start event.

From there, we would have to do the database lookup for the items intro data inside that event.

Next, you'd want to check and see if the intro start is marked as 00:00:00, and immediately restart the stream that the intro end.

 

However if the intro data shows an intro start time which is later then the absolute beginning of the stream, then I would probabaly consider using a threaded while loop which waits for the PlaybackprogressEventArgs to have a progress equal to or greater then the intro start, and then again, restart the stream at the appropriate intro end time, effectively skipping the intro.

 

Edited by chef
Link to comment
Share on other sites

rbjtech
8 minutes ago, chef said:

I think that we could intercept the session playback start event.

From there, we would have to do the database lookup for the items intro data inside that event.

Next, you'd want to check and see if the intro start is marked as 00:00:00, and immediately restart the stream that the intro end.

 

However if the intro data shows an intro start time which is later then the absolute beginning of the stream, then I would probabaly consider using a threaded while loop which waits for the PlaybackprogressEventArgs to have a progress equal to or greater then the intro start, and then again, restart the stream at the appropriate intro end time, effectively skipping the intro.

 

You can do either @chef

/Sessions/{Id}/Playing/{Command} - allows you to Seek to the Tick value - so we can just use skip the Intro when we hit the Intro Start.

/Sessions/{Id}/Playing - allows you to actually play and item starting from a Tick value - so again, could be used to jump directly to post Intro on new items assuming the Intro starts @ 00:00

..but you're the coding wizard - so over to you.. 😜

Edited by rbjtech
Link to comment
Share on other sites

36 minutes ago, rbjtech said:

You can do either @chef

/Sessions/{Id}/Playing/{Command} - allows you to Seek to the Tick value - so we can just use skip the Intro when we hit the Intro Start.

/Sessions/{Id}/Playing - allows you to actually play and item starting from a Tick value - so again, could be used to jump directly to post Intro on new items assuming the Intro starts @ 00:00

..but you're the coding wizard - so over to you.. 😜

Eventually when they add the button we'll remove it.

But, I wrote it.

I'm just going to test it out here. 😆

It's a toggle in advanced settings.

We'll have to see how it affects the performance of the server... If it does at all... Probably won't.... 🤔

There are two events I tied into. PlaybackStart, which kicks off the thing.

 

Should there be a device selector? because otherwise it's going to do all the clients.

Brb!

Link to comment
Share on other sites

samuelqwe
30 minutes ago, chef said:

Should there be a device selector? because otherwise it's going to do all the clients.

Is it possible to filter sessions per user? You could select which users would want the auto intro skip and which don’t.

Might be easier than trying to do a per device filter, since there might be a lot of devices.

  • Agree 1
Link to comment
Share on other sites

BillOatman
40 minutes ago, chef said:

Eventually when they add the button we'll remove it.

But, I wrote it.

I'm just going to test it out here. 😆

It's a toggle in advanced settings.

We'll have to see how it affects the performance of the server... If it does at all... Probably won't.... 🤔

There are two events I tied into. PlaybackStart, which kicks off the thing.

 

Should there be a device selector? because otherwise it's going to do all the clients.

Brb!

I would probably say user selector over device myself.

  • Agree 1
Link to comment
Share on other sites

7 minutes ago, samuelqwe said:

Is it possible to filter sessions per user? You could select which users would want the auto intro skip and which don’t.

Might be easier than trying to do a per device filter, since there might be a lot of devices.

Yes. This is the best way for sure. 👍

It's most likely not a permanent solution to the skip intro anyway, but it is cool AF.😆

 

Link to comment
Share on other sites

BillOatman
8 minutes ago, chef said:

Yes. This is the best way for sure. 👍

It's most likely not a permanent solution to the skip intro anyway, but it is cool AF.😆

 

Could probably skip the chapter stuff.  Damn, now I'm going to have to fire it up :)

ComSkip could be done in a similar way too.  On PlaybackStart look for the edl file and if found make a list of the tick start/stop points. Then basically do what you are doing. On PlaybackStop  clear that list.

I saw blackframe detection code. Are the intro start/stops on blackframes?  Would be a much smoother and less jolting transition if it was :)

Edited by BillOatman
Link to comment
Share on other sites

Cheesegeezer
14 hours ago, BillOatman said:

Could probably skip the chapter stuff.  Damn, now I'm going to have to fire it up :)

ComSkip could be done in a similar way too.  On PlaybackStart look for the edl file and if found make a list of the tick start/stop points. Then basically do what you are doing. On PlaybackStop  clear that list.

I saw blackframe detection code. Are the intro start/stops on blackframes?  Would be a much smoother and less jolting transition if it was :)

Black detect is not used for intros, only as an aid to end credits, however, the CPU load is 100% with ffmpeg for black detect and there is no way to throttle it back that we have found.  Do you know ffmpeg CLI at all Bill?

Link to comment
Share on other sites

rbjtech

I don't believe the Seeking is going to cause any significant 'jolting' as long as the Intro Start/End points are accurate (enough) as any Intro generally fades in and out but there are obviously exceptions to that.

That's why I think it would be a good option to display something on the screen to advise the user that the Intro is about to be skipped.  This is doable in the API as well - it does look nice in the web browser, but ugly as sin on the Android/FireTV as you get a large message in the centre of the screen with a green background ..  :(

  • Haha 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...