Kodi Community Forum

Full Version: strm files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Ticket: https://trac.kodi.tv/ticket/17799
I wasn't sure where to post this small issue concerning Kodi Leia.

I imported strm files into my Kodi library which is mixed with regular videos. Strm files are no longer working with the option "Play next video automatically".

I noticed some changes in Leia, where it seems to be doing something similar to music now, instead of creating a playlist like in Krypton, it calls a special url that points directly to the db entry videodb://tvshows/titles/2/24/169?season=24&tvshowid=2
Because this is sent directly to the video player, it never gets to open the strm file to get the file path from it...

That breaks behavior of all strm files imported with that option enabled. I get an error:
Quote:16:13:31.645 T:7924  NOTICE: VideoPlayer::OpenFile: videodb://tvshows/titles/2/24/169?season=24&tvshowid=2
16:13:31.645 T:4624  NOTICE: Creating InputStream
16:13:31.661 T:4624  NOTICE: Creating Demuxer
16:13:31.663 T:4624   ERROR: CDVDDemuxFFmpeg::Open - error probing input format, videodb://tvshows/titles/2/24/169?season=24&tvshowid=2

When "Play next automatically" is not enabled, strm files work as intended.

Is it something that can be fixed?
@Koying

Let me know if there's anything more I can do/provide to get this resolved. Smile
There is along-standing issue with subtitle, and I suspect this is related: 12311 (PR)
If you could provide me with a couple random strm files to random videos, it'll help me test your specific test case.
Any type of strm file does this. To test, I even put a plugin path into the strm file. Nothing gets redirected or called. It really seems as if the video player is trying to play the .strm file directly.

If you still need it, I'll be able to provide you a test strm later today.
@Koying 

Here are the strm files. It gives the error One or more items failed to play, but play fine when play next is disabled.
Strm with plugin: https://www.dropbox.com/s/d8wwcs1bgt5wm8....strm?dl=0
Strm with local path: https://www.dropbox.com/s/gjtrenfawlajgn....strm?dl=0

This is what I see with debug enabled + play next disabled:
Quote:20:04:18.396 T:14096   DEBUG: CGUIWindowVideoBase::OnPlayMedia T:\TV\America's Next Top Model\Season 24\America's Next Top Model - 24x09 Beauty Is Movement.strm
20:04:18.396 T:12780   DEBUG: CAnnouncementManager - Announcement: OnClear from xbmc
20:04:18.396 T:12780   DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnClear
20:04:18.396 T:12780   DEBUG: CAnnouncementManager - Announcement: OnAdd from xbmc
20:04:18.396 T:12780   DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnAdd
20:04:18.400 T:12780   DEBUG: CAnnouncementManager - Announcement: OnRemove from xbmc
20:04:18.400 T:12780   DEBUG: GOT ANNOUNCEMENT, type: 2, from xbmc, message OnRemove
20:04:18.406 T:14096   DEBUG: CPlayerCoreFactory::GetPlayers(T:\TV\America's Next Top Model\Season 24\America's Next Top Model - 24x09 Beauty Is Movement.mkv)
Same strm with play next enabled. CGUIWindowVideoBase::OnPlayMedia is not triggered in this scenario. I hope this helps:
Quote:20:01:58.951 T:14096   DEBUG: CPlayerCoreFactory::GetPlayers(videodb://tvshows/titles/2/24/172?season=24&tvshowid=2)
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: mms/udp
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtmp
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
20:01:58.951 T:14096   DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: radio
20:01:58.951 T:14096   DEBUG: CPlayerCoreFactory::GetPlayers: matched 0 rules with players
20:01:58.951 T:14096   DEBUG: CPlayerCoreFactory::GetPlayers: adding videodefaultplayer (VideoPlayer)
20:01:58.951 T:14096   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=0
20:01:58.951 T:14096   DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
20:01:58.951 T:14096   DEBUG: CPlayerCoreFactory::GetPlayers: added 1 players
20:01:58.952 T:14096   DEBUG: Radio UECP (RDS) Processor - new CDVDRadioRDSData::CDVDRadioRDSData
20:01:58.952 T:14096  NOTICE: VideoPlayer::OpenFile: videodb://tvshows/titles/2/24/172?season=24&tvshowid=2
20:01:58.952 T:14096   DEBUG: CApplication::OnPlayBackStarted: CApplication::OnPlayBackStarted
20:01:58.953 T:5732   DEBUG: Thread VideoPlayer start, auto delete: false
20:01:58.953 T:5732  NOTICE: Creating InputStream
20:01:58.955 T:14160   DEBUG: Loading settings for videodb://tvshows/titles/2/24/172?season=24&tvshowid=2
20:01:58.960 T:5732  NOTICE: Creating Demuxer
20:01:58.961 T:5732   ERROR: CDVDDemuxFFmpeg::Open - error probing input format, videodb://tvshows/titles/2/24/172?season=24&tvshowid=2
20:01:58.961 T:5732   ERROR: CVideoPlayer::OpenDemuxStream - Error creating demuxer
20:01:58.961 T:5732  NOTICE: CVideoPlayer::OnExit()
20:01:58.961 T:14160   DEBUG: CSaveFileState::DoWork - Saving file state for video item videodb://tvshows/titles/2/24/172?season=24&tvshowid=2
The problem is that CPlaylistPlayer does not recognize db items as playlists. If you play a single item or create a playlist, db fileItems are changed to ones that have the real path. But this can't be done for MediaWindow's listitems.
Well you know best Smile

Is there hope is really what I want to know.
Actually, I'm surprised that it ever worked (and have difficulties reproducing).
strm files seems considered as playlists (for strange reasons): https://github.com/xbmc/xbmc/blob/master...y.cpp#L138
And playlist cannot be added to playlists...

In your case, as it's coming from db, they have "videodb://" urls, so I understand they pass the cut and are included, but they shouldn't be at all afaict
(2018-03-12, 16:10)Koying Wrote: [ -> ]And playlist cannot be added to playlists...
Wrong, they get expanded into playlists: https://github.com/xbmc/xbmc/blob/master...r.cpp#L298

If an item is added to an existing playlist, we do this:
https://github.com/xbmc/xbmc/blob/d7aea7...e.cpp#L546

But for listitems this can't be done. It's a hack anyway btw.

Solutiuon:
videodb needs to set dynPath and playlistplayer needs to look at dynpath too.
Well I thought it was a bug, because this used to work fine prior to Leia. But now I understand that it was working because of hacks/workaround.

Awesome, so there might be a workable solution, that's great. I'd be forever grateful if this worked again.

And would it also allow for plugin:// contained inside strm to resolve to it's final path as well?
@fernet Well, I tested with some strm (not from DB, so unrelated to videodb) with "play next" and it just didn't work for me. Playback stopped after the first because the others were not enqueued.
(2018-03-13, 09:52)Koying Wrote: [ -> ]@fernet Well, I tested with some strm (not from DB, so unrelated to videodb) with "play next" and it just didn't work for me. Playback stopped after the first because the others were not enqueued.
 this is all very inconsistent and hacky. so if you click on a playlist as first item, "play next" is ignored and only this single playlist is queued.
Code:
    if (autoplay && !g_partyModeManager.IsEnabled() &&
         !pItem->IsPlayList())
    {
      return OnPlayAndQueueMedia(pItem, player);   
    }
    else
    { 
       return OnPlayMedia(iItem, player);   
    }
here is a fix for video strm files: 13648 (PR)
Wow that was quick, I would love to test it but I have no idea how to compile Kodi. @Koying Smile

Thank you so much for fixing this @FernetMenta
The fix has been merged so will be included in tomorrows nightly builds.
Pages: 1 2 3