Solved -  strm files
#31
For example.
Adele - Hello
plugin://plugin.video.youtube/play/?video_id=YQHsXMglC9A

Edit:
Spectral (2016) tt2106651
plugin://plugin.video.netflix/?action=play_video&video_id=80098200

Star Trek Beyond (2016) tt2660888
plugin://plugin.video.prime_instant/?mode=playVideo&url=B01IG0E1F0

Similar Idea to Support plugin sources for video library.  The plugins export the strm files which are scanned into the library. The best we can do until  Media Import is a reality.
Reply
#32
Indeed. It is not uncommon. It's just missing handling the plugin scenario if we decide to treat strm as non-playlist. If you have an idea on how to fix it, let me know. I will test and compile Kodi on my side. Smile I appreciate your help with this.
Reply
#33
I also would like .strm files to be handled more as 'normal' video files.

One thing especially is trailers. 

If you have a movie imported to the library as movie.strm file, you can play this video.

But if you want to see the accompying trailer, "trailer.strm", it shows movie.strm instead. (pressing i and then play trailer)

It seems that .strm files can't have trailers.

fileitem.cpp:
 // no local trailer available for these
if (IsInternetStream()
|| URIUtils::IsUPnP(strFile)
|| URIUtils::IsBluray(strFile)
|| IsLiveTV()
|| IsPlugin()
|| IsDVD())
return "";
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#34
It seems that the way strm files are being used now might be different from the original concept. Seems like it was meant to point to a internet stream, whereas, it is now being used to point to an offsite file, that is access through a plugin (a file on YouTube, Amazon, or Netflix servers in the examples i gave above).

I think some are also using strm for files in cloud storage such Google Drive, One Drive etc. I still keep my files on a NAS, but I do use strm files for YouTube, Amazon and Netflix. Maybe others could chime in on the other services.

Cheers,
Long Man
Reply
#35
@FernetMenta 

Just so we are clear. Strm file with plugin paths in them work fine in every scenario except when play next automatically is enabled. When it is enabled, GetPluginResults is never called when we treat strm as non-playlist.

I think you could create a strm file with a youtube video, to see what I'm seeing.
If you create a strm file episode that contains a youtube plugin path: plugin://plugin.video.youtube/play/?video_id=YQHsXMglC9A
longside regular episodes in one of your tv show, then scan for new content. When you try to play it with play next automatically, it will work but the playlist is also emptied in the process. If you make strm file non-playlist then you'll see what I see. Again, I'm just not sure where to plug in the GetPluginResults for this one. Let me know, I'd do anything to get this to work right Smile

Thank you!

Edit: Ok I finally found where things are played in Application.cpp PlayFile. At least now I see where the file is being processed when strm is not treated as playlist.
Reply
#36
Currently busy with a lot of other things. Just wanted to let you know that I am still there.
Reply
#37
Thanks for all that you do Smile I fully understand that you are busy, that's why I'm trying to learn C++ to fix it myself and do a PR. It was difficult, but I found the spot I was looking for by trial error (adding logging lines and compiling).

I am getting closer to a solution. In PlayFile, the GetDynPath() is filled with the plugin path, so I just had to plug this in, so it can get the PluginResults within PlayFile. Now playback starts correctly in most cases. But for some reason, it bugs out if I play the first item of the listing, and then move the next one. It seems to get stuck in an infinite loading loop. If I start to play the second item instead, then move to the next one, everything works as it should. Really strange.
Reply
#38
@FernetMenta 

I think I reached my max for now, so I'll just wait for you. Just ping me when you are ready to look into this. Thank you :-)

I really can't figure out why playing the first item in the playlist, moving to the next item with auto play makes the video buffer infinitely. Everything is called correctly, I see the artwork is loaded, metadata filled, but the video itself is stuck in buffer mode forever until I hit stop playback.

If instead, I play the second item in the list, and move to the next item with auto play, everything works as intended. I really don't know why it would behave differently.

Here are the changes I made to test strm as non-playlist, which works for the most part except for what I explained above:
Quote:PlayListFactory.cpp
https://github.com/xbmc/xbmc/blob/master...y.cpp#L142
Changes: ".m3u|.b4s|.pls|.wpl|.asx|.ram|.url|.pxml");
https://github.com/xbmc/xbmc/blob/master...y.cpp#L148
Changes: ".m3u|.b4s|.pls|.wpl|.asx|.ram|.url|.pxml");

Application.cpp
https://github.com/xbmc/xbmc/blob/384894...3038-L3045
Changes:  

std::string path = item.GetDynPath();
if (path.empty())
  path = item.GetPath();

if (item.IsPlugin() || URIUtils::IsPlugin(path))
{ // we modify the item so that it becomes a real URL
  bool resume = item.m_lStartOffset == STARTOFFSET_RESUME;
  CFileItem item_new(item);
  if (XFILE::CPluginDirectory::GetPluginResult(path, item_new, resume))
    // removed std::move, otherwise it always buffers indefinitely with auto-play
    // but it buffers forever without auto-play and play from here is used.
    return PlayFile(item_new, player, false);
  return false;
}
Reply
#39
@angelblue05 can you provide minimum required steps to reproduce the issue?
Reply
#40
can you have a look at this? https://github.com/xbmc/xbmc/pull/13771
Reply
#41
@FernetMenta 

I pulled your pull request locally. I've noticed you didn't remove .strm from IsPlaylist() in the PlayListFactory.cpp file so I did it before compiling. I'll make a small pull request to do those changes separate from your PR. I can confirm your fix works, but I think something else is wrong because play next automatically doesn't always work.

Occasionally, the play next video will make the video get stuck in buffering forever. I've attached my complete log, capturing this issue. It seems to trigger CPVRItem - PVR::CPVRItem::GetEpgInfoTag when this happens. Note, I do no have PVR enabled, this is not pvr content just a simple video file. Something must be wrong in the logic, it shouldn't be triggering CPVRItem at all.

Let me know if there's anything more I can provide, both logs are of the same files/actions. Things stop working after this (trying to play the second episode): VideoPlayer::OpenFile: videodb://tvshows/titles/23/1/1315?season=1&tvshowid=23

It seems to just go on until I hit stop playback and probably the reason why play next is acting wonky.

Edit: Opened PR with the changes we discussed previously. https://github.com/xbmc/xbmc/pull/13774
Reply
#42
With the latest Nightlys plugin:// in strm files does not work again:

14:38:09.620 T:139281286224 WARNING: CreateLoader - unsupported protocol(plugin) in plugin://plugin.video.osmosis/?url=plugin&mode=10&mediaType=show&episode=s1e1&showid=59|Absentia
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
strm files00