Jump to content

Detect Episode Intros


lifujie

Recommended Posts

lifujie

Hello, may I ask where the data for the beginning and ending of the movie generated using the "Detect Episode Intros" function in Emby is saved in which field

Link to comment
Share on other sites

Hi, this is in the Emby Server database.

Link to comment
Share on other sites

lifujie
4 minutes ago, Luke said:

您好,这是 Emby 服务器数据库中的。

Which specific database is it in? Is it "library. db"? If possible, could you please let me know which specific database and table it is? Thank you.
Because it has already been generated before, I would like to directly replace it in the new EMBY, which takes too much time to generate. Thank you

Link to comment
Share on other sites

Library.db chapters table

Link to comment
Share on other sites

sydlexius

If your goal is to backup and restore intros, have you considered looking at this plugin:

 

 

Link to comment
Share on other sites

kikinjo

Think that that there should be an option to save intros files in media folders also, emby gets moved , reinstalled and other things, option to save detected intros should be possible to save in meda folder with tv season, that way it always there if needed again.

Link to comment
Share on other sites

lifujie
3 hours ago, sydlexius said:

If your goal is to backup and restore intros, have you considered looking at this plugin:

 

OK,thank

 

Link to comment
Share on other sites

rbjtech
Posted (edited)

I'd love to see support for proper MKV chapters - either by name (in it's simplest form) or by more advanced features such as Editions.  That way detected Intro's (and credits etc) can be written back to the actual media source (MKV).   If done properly with MKV Chapter Edition branching, then the any player that supports branching will automatically skip the intro without needing any 'support' of the bespoke emby intro markers...

All future imports or rebuilds will then simply pick up the intro's as part of the normal metadata.

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

crusher11
5 hours ago, rbjtech said:

I'd love to see support for proper MKV chapters - either by name (in it's simplest form) or by more advanced features such as Editions.  That way detected Intro's (and credits etc) can be written back to the actual media source (MKV).   If done properly with MKV Chapter Edition branching, then the any player that supports branching will automatically skip the intro without needing any 'support' of the bespoke emby intro markers...

All future imports or rebuilds will then simply pick up the intro's as part of the normal metadata.

Wouldn't that expose them on the UI, though? The whole reason I went from the plugin to the core was to get rid of the UI clutter they were generating. Well, that and it shuffling around genuine chapter markers into the wrong spot.

Very keen on that plugin version that just adds the hidden markers and doesn't mess with the embedded chapters at all.

Link to comment
Share on other sites

rbjtech

So I've gone the opposite route - and am using the mkv as the source.   Just written it in powershell today actually to write back the emby chapter points into the MKV - but it looks as if ffmpeg ignores hidden MKV chapters - which breaks the idea of having the 'intro markers' in the MKV for the reasons you give.

I highly doubt emby will want to provide any support for chapters being read as special markers by name - so I'll still trying to work around it.  

I've finally moved away from the Plugin - and I'm now using the Core Intro Skip - it was just too much hassle to keep the plugin going.

The righful place for all these markers is in the source file - but it's prooving a challenge making it work for every scenerio ...

Link to comment
Share on other sites

rbjtech
Posted (edited)
On 09/05/2024 at 10:38, rbjtech said:

I'd love to see support for proper MKV chapters - either by name (in it's simplest form) or by more advanced features such as Editions.  That way detected Intro's (and credits etc) can be written back to the actual media source (MKV).   If done properly with MKV Chapter Edition branching, then the any player that supports branching will automatically skip the intro without needing any 'support' of the bespoke emby intro markers...

All future imports or rebuilds will then simply pick up the intro's as part of the normal metadata.

.. so I've hit a bit of a roadblock on this.

I wrote a powershell script to grab the emby chapter info, write the Chapter XML and then use mkvpropedit to import the XML chapter file - all works perfectly - BUT .. 

While MKV fully supports 'marker/chapter types' (see below) - ffmpeg/ffprobe does not appear to :(   making the entire process of writing them to the MKV a bit redundant as there is no way to extract them again (in emby at least).   mkvinfo sees them without any issues.

The key to this was the use of the official MKV Chapter element 'ChapterSkipType'

ChapterSkipType

0 - No Skipping,
1 - Opening Credits,
2 - End Credits,
3 - Recap,
4 - Next Preview,
5 - Preview,
6 - Advertisement

This is not a well known, so emby chapter info being written to the mkv would be needed in most cases - but once done, then you have a totally portable MKV file containing all the marker data.  There is also a hide element.

@LukeWould emby be interested in adding this functionality into ffmpeg or an extension ?  If not, then I may as well abandon this idea as you would need a plugin to extract the intro data from the mkv in the event of needing a restore.  

Thanks,

  1 <?xml version="1.0" encoding="ISO-8859-1"?>
    2 
    3 <!DOCTYPE Chapters SYSTEM "matroskachapters.dtd">
    4 
    5 <!-- A simple example. The movie in question contains four parts: -->
    6 <!-- The intro starting at the beginning, the first act, the second -->
    7 <!-- act, and the credits. -->
    8 
    9 <!-- Note that the end timestamps are optional. -->
   10 
   11 <!-- The timestamps use the normal format of HH:MM:SS.mmm with -->
   12 <!-- HH beging the hour, MM the minute, SS the second and -->
   13 <!-- mmm the milliseconds. -->
   14 
   15 <Chapters>
   16   <EditionEntry>
   17     <EditionDisplay>
   18       <EditionString>Example movie</EditionString>
   19       <EditionLanguageIETF>en</EditionLanguageIETF>
   20     </EditionDisplay>
   21     <ChapterAtom>
   22       <ChapterTimeStart>00:00:00.000</ChapterTimeStart>
   23       <ChapterDisplay>
   24         <ChapterString>Intro</ChapterString>
   25         <ChapterLanguage>eng</ChapterLanguage>
   26       </ChapterDisplay>
   27       <ChapterSkipType>1</ChapterSkipType>
   28     </ChapterAtom>
   29     <ChapterAtom>
   30       <ChapterTimeStart>00:01:00.000</ChapterTimeStart>
   31       <ChapterDisplay>
   32         <ChapterString>Act 1</ChapterString>
   33         <ChapLanguageIETF>en</ChapLanguageIETF>
   34       </ChapterDisplay>
   35       <ChapterSkipType>0</ChapterSkipType>
   36     </ChapterAtom>
   37     <ChapterAtom>
   38       <ChapterTimeStart>00:05:30.000</ChapterTimeStart>
   39       <ChapterDisplay>
   40         <ChapterString>Act 2</ChapterString>
   41         <ChapLanguageIETF>en</ChapLanguageIETF>
   42       </ChapterDisplay>
   43       <ChapterSkipType>0</ChapterSkipType>
   44     </ChapterAtom>
   45     <ChapterAtom>
   46       <ChapterTimeStart>00:12:20.000</ChapterTimeStart>
   47       <ChapterTimeEnd>00:12:55.000</ChapterTimeEnd>
   48       <ChapterDisplay>
   49         <ChapterString>Credits</ChapterString>
   50         <ChapLanguageIETF>en</ChapLanguageIETF>
   51       </ChapterDisplay>
   52       <ChapterSkipType>2</ChapterSkipType>
   53     </ChapterAtom>
   54   </EditionEntry>

 

Edited by rbjtech
Link to comment
Share on other sites

crusher11
21 hours ago, rbjtech said:

I've finally moved away from the Plugin - and I'm now using the Core Intro Skip - it was just too much hassle to keep the plugin going.

 

Didn't you only just resume working on the plugin a couple of weeks ago?

The plugin still blows away the core. Better detection, editing features, end credits detection, etc etc. It just has no way of telling Emby where the markers need to go, without editing the existing chapter points.

Link to comment
Share on other sites

rbjtech
17 minutes ago, crusher11 said:

Didn't you only just resume working on the plugin a couple of weeks ago

 

Yes but have now decided that for the very small number of users that still use it - it is not worth my time.  Refactoring the code is a huge job.

My time is better spent 'adding' features to the Core that everybody can use.

18 minutes ago, crusher11 said:

The plugin still blows away the core. Better detection, editing features, end credits detection, etc etc. It just has no way of telling Emby where the markers need to go, without editing the existing chapter points.

Yep - some of these features will come back as supplements/plugins to the core - that way, both work in harmony as opposed to the current Plugin which uses a brute force way of writing it's data to 'work' with the core feature set.

  • Like 2
Link to comment
Share on other sites

crusher11

So it's more accurate to say that you're starting from scratch with a different plugin?

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