Jump to content

How Often Does the PlaybackProgress Function In a Plug-in Get Called?


Recommended Posts

HarryMuscle
Posted

I'm doing a bit of investigating to see if it would be possible to create a plug-in to provide general EDL file support (got the idea from the ComSkipper plugin) and it looks like it would largely depend on how often the PlaybackProgress function can be called in a plug-in.  Is it every frame, every second, every x?  Does it vary?  I've been trying to find some documentation on this function but have come up empty so far.  If anyone knows the answer or a link to more documentation about this function that would be greatly appreciated.

 

Thanks,

Harry

Posted

Hi, it's whenever client apps send playback reports to the server. The guidelines we have for that are every ten seconds as well as immediately following any manual action taken by the user, e.g. seek, pause, etc.

BillOatman
Posted
12 hours ago, HarryMuscle said:

I'm doing a bit of investigating to see if it would be possible to create a plug-in to provide general EDL file support (got the idea from the ComSkipper plugin) and it looks like it would largely depend on how often the PlaybackProgress function can be called in a plug-in.  Is it every frame, every second, every x?  Does it vary?  I've been trying to find some documentation on this function but have come up empty so far.  If anyone knows the answer or a link to more documentation about this function that would be greatly appreciated.

 

Thanks,

Harry

Hi.  Comskipper is opensource and in github if you want to have a look

I'm curious as to what you mean by "general EDL file support"?  Is there a EDL variation created by another program that I am unaware of that Comskipper can't handle?

HarryMuscle
Posted
6 hours ago, BillOatman said:

Hi.  Comskipper is opensource and in github if you want to have a look

I'm curious as to what you mean by "general EDL file support"?  Is there a EDL variation created by another program that I am unaware of that Comskipper can't handle?

EDL supports a few other functions like muting, skipping based on frame numbers, etc.  I see ComSkipper also has a function or two geared primarily towards use with comskip like reloading the EDL file.  Realistically if I did create a plug-in for general EDL support it probably be a fork of ComSkipper with a feature or two removed and a feature or two added.

Thanks,

Harry

  • Like 1
Spaceboy
Posted
7 hours ago, BillOatman said:

Hi.  Comskipper is opensource and in github if you want to have a look

I'm curious as to what you mean by "general EDL file support"?  Is there a EDL variation created by another program that I am unaware of that Comskipper can't handle?

can't remember where i saw this in my edl research recently but apparently there is also support for muting audio using edl files and there was a distinction between cutting and cutting for commercials which i didnt understand but didnt spend long considering. the number at the end of the line in an edl file indicates the action to be taken

HarryMuscle
Posted
20 hours ago, Luke said:

Hi, it's whenever client apps send playback reports to the server. The guidelines we have for that are every ten seconds as well as immediately following any manual action taken by the user, e.g. seek, pause, etc.

Bummer, I was hoping it would be called more often.  Useful for skipping commercials but probably not for general EDL support which is often used to cut out scenes or mute certain words.

Is there any other function called more often during playback that would allow sending a request to Emby to continue playback at a different location?

 

Thanks,

Harry

Posted
2 hours ago, HarryMuscle said:

Bummer, I was hoping it would be called more often.  Useful for skipping commercials but probably not for general EDL support which is often used to cut out scenes or mute certain words.

Is there any other function called more often during playback that would allow sending a request to Emby to continue playback at a different location?

 

Thanks,

Harry

You can send remote control commands anytime you want during playback. They don't have to correlate with the client reporting data back to the server.

Posted
5 hours ago, HarryMuscle said:

Bummer, I was hoping it would be called more often.  Useful for skipping commercials but probably not for general EDL support which is often used to cut out scenes or mute certain words.

Is there any other function called more often during playback that would allow sending a request to Emby to continue playback at a different location?

I don't quite understand why you think you would need more frequent updates.

All you would need to do is to start a timer on each update from a client to fill the time "gap" between updates. When there's a change at the client during that gap, there will be an immediate update (e.g. when users stops, pauses or skips).

Skipping commercials this way would probably be doable this way, but "muting words" or other small-range manipulations is hardly impossible, because neither the playback reporting API not the remote control API provides control that is precise enough for this.

The one big problem I see for this idea is that once you let the server control a client's playback positions this way, it would be unchangeable at the client side. So when the EDL content is wrong, you user would not be able to watch time ranges, from which the server-plugin thinks they would need to be skipped over. Also, what to do when a user skips into such a "forbidden" region? Re-seek to the end of that region? This could become quit annoying, as you don't see the regions at the client. Or think about the "skip-back" client button: user wants to go 30s back, but when you reach a "skip-region", the server would always reposition to the end, so it would become impossible to skip back that way.

BillOatman
Posted (edited)
9 hours ago, softworkz said:

I don't quite understand why you think you would need more frequent updates.

All you would need to do is to start a timer on each update from a client to fill the time "gap" between updates. When there's a change at the client during that gap, there will be an immediate update (e.g. when users stops, pauses or skips).

Skipping commercials this way would probably be doable this way, but "muting words" or other small-range manipulations is hardly impossible, because neither the playback reporting API not the remote control API provides control that is precise enough for this.

The one big problem I see for this idea is that once you let the server control a client's playback positions this way, it would be unchangeable at the client side. So when the EDL content is wrong, you user would not be able to watch time ranges, from which the server-plugin thinks they would need to be skipped over. Also, what to do when a user skips into such a "forbidden" region? Re-seek to the end of that region? This could become quit annoying, as you don't see the regions at the client. Or think about the "skip-back" client button: user wants to go 30s back, but when you reach a "skip-region", the server would always reposition to the end, so it would become impossible to skip back that way.

In the case of Comskipper ... Once a commercial is skipped, it won't be skipped again during that session.  So for example:
- Watching my little pony and the EDL file says to skip 2 minutes, but the commercial is really only 1 minute.
- The viewer notices the jump too far, and rewinds back to where the show resumed
- Since that area has already been skipped in that session, it will not be skipped again.
- If someone watches it again, the same thing will happen unless someone changes the EDL file

For me, comskip has been accurate enough every time that I have never had to do it during normal operation.

Edited by BillOatman
HarryMuscle
Posted
10 hours ago, softworkz said:

I don't quite understand why you think you would need more frequent updates.

All you would need to do is to start a timer on each update from a client to fill the time "gap" between updates. When there's a change at the client during that gap, there will be an immediate update (e.g. when users stops, pauses or skips).

Skipping commercials this way would probably be doable this way, but "muting words" or other small-range manipulations is hardly impossible, because neither the playback reporting API not the remote control API provides control that is precise enough for this.

The one big problem I see for this idea is that once you let the server control a client's playback positions this way, it would be unchangeable at the client side. So when the EDL content is wrong, you user would not be able to watch time ranges, from which the server-plugin thinks they would need to be skipped over. Also, what to do when a user skips into such a "forbidden" region? Re-seek to the end of that region? This could become quit annoying, as you don't see the regions at the client. Or think about the "skip-back" client button: user wants to go 30s back, but when you reach a "skip-region", the server would always reposition to the end, so it would become impossible to skip back that way.

I actually thought about the timer idea last night.  However, if the plug-in APIs that exist right now aren't accurate enough for small adjustments that would probably be the biggest obstacle.

Having the server controlling the playback I think could be overcome.  See BillOatman's approach for example.

Thanks,

Harry

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...