MP2 - V2.5 Trailer plugin (1 Viewer)

ge2301

Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    The question, if MP2 can support trailers came up several times (e.g. here) and was so far always neglected mainly because of the missing player for this within MP2.
    Now the cinema plugin is reactived with new code by @BigGranu and almost finished. It has an own player to play trailers of cinema program via youtube links.
    There are just some small remaining issues with links. For some PC's (like mine) IPv6 links seem to be created, but can not be played. However, so far it's realiably working when deactivating IPv6 completely.

    So the main problem is basically solved:
    • We have a player, that can play youtube links
    Remains only the question, if
    • our scraper can grap trailer links online or during offline imports from the *.nfo files? I found at least this entry for offline grabbing of movies, so seems yes!?
    • we have a possibility to add the trailer links to our DB, which is still downwards compatible. I checked our DB structure and there is currently no index for trailers. We might also use the e.g. "comment" index for media items, I think it's nowhere used yet.
    @Brownard can you answer the 2 points above?
    If the 2 points can be solved I think we could just add an entry in the context menu of media items "play trailer", if there is a link in the db.
    Everything else could be taken over from Cinema plugin.
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,290
    1,872
    Home Country
    United Kingdom United Kingdom
    Yes it should be doable. We can just add a TrailerAspect with the appropriate fields to add them to the database.

    Might be worth having a check to see if the trailer nfo tag gets populated by any tools and if so what websites are commonly used.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Admin
    • #3
    Might be worth having a check to see if the trailer nfo tag gets populated by any tools and if so what websites are commonly used.
    All my nfo files have a trailer tag. I use tiny media manager. @Lehmden is the media buddy also populating a trailer tag?
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Admin
    • #5
    Are they just youtube links or various different sources?
    I just checked many nfo files, unfortunately it's not all about youtube files :( The current implementation of Cinema can deal not with all type of links.

    One example:
    Code:
      <trailer>https://movietrailers.apple.com/movies/fox/avatar-the-way-of-water/avatar-the-way-of-water-final-trailer_h720p.mov</trailer>

    Maybe we could also think about following: Just if the trailer command is executed from context menu , MP2 searches for the localized trailer version of the media item online. This would allow to reuse the current Cinema code probably and minimize the effort. Additionally no DB changes are required. Possible disadvantages: Trailers could be not found and users have no chance to influence this with e.g. locally stored trailers beside the main media item.
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,290
    1,872
    Home Country
    United Kingdom United Kingdom
    I just checked many files, unfortunately it's not all about youtube files
    That link in particular is fine as it links directly to the video file and LAV splitter should just be able to play it, YT links are also fine as there's lots of support out there for getting a direct link to a YT video. What we don't want to end up doing is reimplementing OnlineVideos with lots of website parsing etc for lots of obscure video hosting sites ;) .

    TheMovieDb has an api for getting associated videos, this includes trailers but also behind the scenes, bloopers, etc. What we can do is add an 'ExternalVideoAspect' loosely modelled on the TheMovieDb api, so it will store the url, language, type,.... Then in the client we can add a simple plugin that contains the url player (to avoid a dependency on the Cinema plugin) and checks for the existence of the aspect in a media item, and if present adds a context menu entry for the media item to play the trailer. Initially I'll just populate the aspect from nfos.

    TheMovieDb MDE needs a bit of a rework before I add support for scraping it for trailers because it currently makes lots of individual requests for movie information (1 for the movie details, 1 for the images, 1 for the cast), and it's rate limited to a certain number of requests per minute so we end up doing lots of waiting on the rate limiter and adding another request for the associated videos will just make that worse. It's possible to combine all those requests into one with a bit of a rework so I need to do that first.

    I am currently updating the installer to wix 4 in the .net 6 branch so it plays nicely with .net 6 and I have a few minor points to finish off in the fanart rework, then I'll have a look at implementing this.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Media-Buddy can download trailer and put them next to the movie, if configured to do so. Then the trailer is named "{moviename}-trailer.webm" or whatever the extension of the trailer video may be. Most trailer videos are .webm. I also have a few trailer in .mp4 container but the vast majority is .webm. This is how Kodi, Plex, Emby are using trailer videos. I didn't know up to now that MP2 can handle trailer too...

    But there is no tag inside the .nfo file with a trailer- URL. There are lots of URL to cast & crew thumbnails but no link to fanarts or trailers as they are downloaded instantly. Similar is for chapters. They can be downloaded and muxed into the video, if available online. But also no link in .nfo. I've added a sample .nfo here.

    If it really is desired I think we can add this to the next version. But it is very important that trailer plugin can handle locally available trailer too, I think...
     

    Attachments

    • Avatar - Aufbruch nach Pandora.zip
      4.1 KB

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Admin
    • #8
    Most trailer videos are .webm. I also have a few trailer in .mp4 container but the vast majority is .webm. This is how Kodi, Plex, Emby are using trailer videos. I didn't know up to now that MP2 can handle trailer too...
    I've never seen trailers in .wbm format. All I had locally were in .mp4 or .mkv. But I deleted all local trailers.

    But there is no tag inside the .nfo file with a trailer- URL. There are lots of URL to cast & crew thumbnails but no link to fanarts or trailers as they are downloaded instantly. Similar is for chapters. They can be downloaded and muxed into the video, if available online. But also no link in .nfo. I've added a sample .nfo here.
    Trailers won't need thumbnails or fanart etc. They are linked to the media item and just a context menu entry of the media item would start their playback.
    I think trailers are mostly small in file size, so streaming without local data (like in cinema plugin) is the preferred and simple way.

    If it really is desired I think we can add this to the next version. But it is very important that trailer plugin can handle locally available trailer too, I think...
    I think it would be great, but better wait before implementing anything until it's clear how it will be integrated. I agree, that support for local files in parallel to streaming is better. For me it would be already enough, if the .nfo file can be modified with a trailer link, so a local path in it would also allow the local playback after an import :)
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Trailers won't need thumbnails or fanart etc.
    Yes, I agree, at least if they are part of the movie metadata imho and for this laying aside the main movie file...
    Clipboard 2.jpg

    If you will collect trailer for movies you don't have it could be nice to have fanart available too, I think.

    I can't investigate how the trailer are handled in Kodi aside laying next to the main video file. The Kodi main server was hacked and everything (forum, wiki,...) is offline right now. The wiki (where I could find, what I need to know) will be online back again in a very short time (as the first part of the recovery). Then we can search for a solution working with as much HTPC software as possible.

    I've never seen trailers in .wbm format.
    They are mostly downloaded from YouTube. An alternative source für German trailer is available on videobuster.de. But this is no solution for all languages like YouTube is. And on YouTube most trailer are in webm container. I recently have 69 trailer in mkv container, 123 trailer in mp4 container and 988 trailer in webm container in my movies collection.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    That link in particular is fine as it links directly to the video file and LAV splitter should just be able to play it, YT links are also fine as there's lots of support out there for getting a direct link to a YT video. What we don't want to end up doing is reimplementing OnlineVideos with lots of website parsing etc for lots of obscure video hosting sites ;) .
    You are right, direct links are not an issue, it's only about encrypted URL's like youtube.

    TheMovieDb has an api for getting associated videos
    Cinema plugin uses the TMDB api for getting the localized trailer URL's. I just couldn't find the related code last time.
    The scrapping is done at once, when the cinema program is updated. The limit of accesses would be propably an argument against checking for the link only when the trailer playback is selected. So an aspect with in DB stored data would be better as you proposed.

    I am currently updating the installer to wix 4 in the .net 6 branch so it plays nicely with .net 6 and I have a few minor points to finish off in the fanart rework, then I'll have a look at implementing this.
    Great, I've seen the commits (y) Let me know, if you need any testing ro similar. Too bad, that there no other devs supporting lately :( Hopefully this will not kill your motivation.
     

    Users who are viewing this thread

    Top Bottom