Kodi Community Forum

Full Version: Streaming (via strm files) plugin sources?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I'm trying to use the old fashioned strm files to launch streams produced via plugin.

Here is how I do it.

I use a plugin that can scrap video sources from internet . If the source is, for example, from megavideo.com the same script allows you to configure your megavideo user and password and watch that video with premium support (high quality video and no time viewing limit).

Because this extra functions cannot be achieved just linking to the streamed content I wanted to, somehow, link a list of files to the execution of this plugin.

Fortunately the plugin allows this and can be executed with parameters to achieve this goal.

So I thought of creating old-style strm files but instead of putting http o any other web protocol links I tried entenring a plugin feed. Something like...

File MyMegaVideoVideo.strm:
plugin://video/myplugin/?action=watch&source=MegaVideo&title=My+Online+Video&url=http%3A%2F%2Fwww.sourceweb.com%2Fvideos%2F44413%2F

I place this strm file in any location accessible from the videos option and it... almost works!

XBMC starts the plugin with the indicated parameters. The plugin retrieves the video, sets the cookie for megavideo premium services and stars the video... All fine!!

Not all. Somehow XBMC interprets that the strm file contained no suitable source and returns an error.

It is funny anyway that while I see the error window message that says:
"Playback Failed
One or more items failed to play.
Check the log file for details."
it is funny, I was saying, that the video plays in the bottom just until the moment I press the OK button.

The xbmc.log file shows the following:

PHP Code:
21:41:50 T:3120 M:2863656960  NOTICE: -->Python Interpreter Initialized<--
21:42:22 T:2852 M:2854764544 WARNINGCDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
21
:42:22 T:4320 M:2854760448  NOTICECreating InputStream
21
:42:25 T:4320 M:2839277568  NOTICECreating Demuxer
21
:42:29 T:4320 M:2836799488  NOTICEOpening video stream0 source256
21
:42:29 T:4320 M:2836795392  NOTICECreating video codec with codec id1
21
:42:29 T:4320 M:2836746240  NOTICECreating video thread
21
:42:29 T:4320 M:2836746240  NOTICEOpening audio stream1 source256
21
:42:29 T:4320 M:2836746240  NOTICEFinding audio codec for: 86016
21
:42:29 T:4952 M:2836733952  NOTICErunning threadvideo_thread
21
:42:29 T:4952 M:2836729856  NOTICEDisplay resolution DESKTOP 1366x768 60.00 Full Screen (12)
21:42:29 T:4320 M:2836717568  NOTICECreating audio thread
21
:42:29 T:3924 M:2836717568  NOTICErunning threadCDVDPlayerAudio::Process()
21:42:29 T:3924 M:2838233088  NOTICECreating audio device with codec id86016channels2sample rate44100no pass-through
21
:42:29 T:4952 M:2833293312  NOTICE:  fps25.000000pwidth640pheight480dwidth840dheight480
21
:42:29 T:4952 M:2833293312  NOTICEDisplay resolution DESKTOP 1366x768 60.00 Full Screen (12)
21:42:30 T:2852 M:2835431424   ERRORPlaylist Playerskipping unplayable item0path [plugin://video/myplugin/?action=watch&source=MegaVideo&title=My+Online+Video&url=http%3A%2F%2Fwww.sourceweb.com%2Fvideos%2F44413%2F 
]
21:42:32 T:4952 M:2836885504 WARNINGCRenderManager::FlipPage timeout waiting for flip to complete
21
:45:06 T:2852 M:2838179840  NOTICECDVDPlayer::CloseFile()
21:45:06 T:2852 M:2838179840  NOTICEDVDPlayerwaiting for threads to exit
21:45:06 T:4320 M:2838179840  NOTICECDVDPlayer::OnExit()
21:45:06 T:4320 M:2838179840  NOTICEDVDPlayerclosing audio stream
21
:45:06 T:4320 M:2838179840  NOTICEClosing audio stream
21
:45:06 T:4320 M:2838179840  NOTICEWaiting for audio thread to exit
21:45:06 T:3924 M:2838179840   ERRORCDVDAudio::AddPackets failed to add leftover bytes to render
21
:45:06 T:3924 M:2838179840  NOTICEthread endCDVDPlayerAudio::OnExit()
21:45:06 T:4320 M:2838179840  NOTICEClosing audio device
21
:45:06 T:4320 M:2838179840  NOTICEDeleting audio codec
21
:45:06 T:4320 M:2838175744  NOTICEDVDPlayerclosing video stream
21
:45:06 T:4320 M:2838175744  NOTICEClosing video stream
21
:45:06 T:4320 M:2838175744  NOTICEwaiting for video thread to exit
21:45:06 T:4952 M:2838212608  NOTICEthread endvideo_thread
21
:45:06 T:4320 M:2838241280  NOTICEdeleting video codec
21
:45:06 T:4320 M:2840948736  NOTICECDVDPlayer::OnExit() deleting demuxer
21
:45:06 T:4320 M:2840952832  NOTICECDVDPlayer::OnExit() deleting input stream
21
:45:06 T:2852 M:2857005056  NOTICEDVDPlayerfinished waiting
21
:45:06 T:2852 M:2856435712 WARNINGDIRECTORY::CVideoDatabaseDirectory::GetLabel Unknown nodetype requested 12 

The key message, I think, is timed 21:42:30

Can it be that the plugin has to inform that it, in fact, has started successfully a video?
Can I, somehow, avoid getting that message?

Thanks in advance,

Jur.
jurrabi Wrote:Hi there,

I'm trying to use the old fashioned strm files to launch streams produced via plugin.

Here is how I do it.

I use a plugin that can scrap video sources from internet . If the source is, for example, from megavideo.com the same script allows you to configure your megavideo user and password and watch that video with premium support (high quality video and no time viewing limit).

Because this extra functions cannot be achieved just linking to the streamed content I wanted to, somehow, link a list of files to the execution of this plugin.

Fortunately the plugin allows this and can be executed with parameters to achieve this goal.

So I thought of creating old-style strm files but instead of putting http o any other web protocol links I tried entenring a plugin feed. Something like...

File MyMegaVideoVideo.strm:
plugin://video/myplugin/?action=watch&source=MegaVideo&title=My+Online+Video&url=http%3A%2F%2Fwww.sourceweb.com%2Fvideos%2F44413%2F

I place this strm file in any location accessible from the videos option and it... almost works!

XBMC starts the plugin with the indicated parameters. The plugin retrieves the video, sets the cookie for megavideo premium services and stars the video... All fine!!

Not all. Somehow XBMC interprets that the strm file contained no suitable source and returns an error.

It is funny anyway that while I see the error window message that says:
"Playback Failed
One or more items failed to play.
Check the log file for details."
it is funny, I was saying, that the video plays in the bottom just until the moment I press the OK button.

The xbmc.log file shows the following:

PHP Code:
21:41:50 T:3120 M:2863656960  NOTICE: -->Python Interpreter Initialized<--
21:42:22 T:2852 M:2854764544 WARNINGCDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
21
:42:22 T:4320 M:2854760448  NOTICECreating InputStream
21
:42:25 T:4320 M:2839277568  NOTICECreating Demuxer
21
:42:29 T:4320 M:2836799488  NOTICEOpening video stream0 source256
21
:42:29 T:4320 M:2836795392  NOTICECreating video codec with codec id1
21
:42:29 T:4320 M:2836746240  NOTICECreating video thread
21
:42:29 T:4320 M:2836746240  NOTICEOpening audio stream1 source256
21
:42:29 T:4320 M:2836746240  NOTICEFinding audio codec for: 86016
21
:42:29 T:4952 M:2836733952  NOTICErunning threadvideo_thread
21
:42:29 T:4952 M:2836729856  NOTICEDisplay resolution DESKTOP 1366x768 60.00 Full Screen (12)
21:42:29 T:4320 M:2836717568  NOTICECreating audio thread
21
:42:29 T:3924 M:2836717568  NOTICErunning threadCDVDPlayerAudio::Process()
21:42:29 T:3924 M:2838233088  NOTICECreating audio device with codec id86016channels2sample rate44100no pass-through
21
:42:29 T:4952 M:2833293312  NOTICE:  fps25.000000pwidth640pheight480dwidth840dheight480
21
:42:29 T:4952 M:2833293312  NOTICEDisplay resolution DESKTOP 1366x768 60.00 Full Screen (12)
21:42:30 T:2852 M:2835431424   ERRORPlaylist Playerskipping unplayable item0path [plugin://video/myplugin/?action=watch&source=MegaVideo&title=My+Online+Video&url=http%3A%2F%2Fwww.sourceweb.com%2Fvideos%2F44413%2F 
]
21:42:32 T:4952 M:2836885504 WARNINGCRenderManager::FlipPage timeout waiting for flip to complete
21
:45:06 T:2852 M:2838179840  NOTICECDVDPlayer::CloseFile()
21:45:06 T:2852 M:2838179840  NOTICEDVDPlayerwaiting for threads to exit
21:45:06 T:4320 M:2838179840  NOTICECDVDPlayer::OnExit()
21:45:06 T:4320 M:2838179840  NOTICEDVDPlayerclosing audio stream
21
:45:06 T:4320 M:2838179840  NOTICEClosing audio stream
21
:45:06 T:4320 M:2838179840  NOTICEWaiting for audio thread to exit
21:45:06 T:3924 M:2838179840   ERRORCDVDAudio::AddPackets failed to add leftover bytes to render
21
:45:06 T:3924 M:2838179840  NOTICEthread endCDVDPlayerAudio::OnExit()
21:45:06 T:4320 M:2838179840  NOTICEClosing audio device
21
:45:06 T:4320 M:2838179840  NOTICEDeleting audio codec
21
:45:06 T:4320 M:2838175744  NOTICEDVDPlayerclosing video stream
21
:45:06 T:4320 M:2838175744  NOTICEClosing video stream
21
:45:06 T:4320 M:2838175744  NOTICEwaiting for video thread to exit
21:45:06 T:4952 M:2838212608  NOTICEthread endvideo_thread
21
:45:06 T:4320 M:2838241280  NOTICEdeleting video codec
21
:45:06 T:4320 M:2840948736  NOTICECDVDPlayer::OnExit() deleting demuxer
21
:45:06 T:4320 M:2840952832  NOTICECDVDPlayer::OnExit() deleting input stream
21
:45:06 T:2852 M:2857005056  NOTICEDVDPlayerfinished waiting
21
:45:06 T:2852 M:2856435712 WARNINGDIRECTORY::CVideoDatabaseDirectory::GetLabel Unknown nodetype requested 12 

The key message, I think, is timed 21:42:30

Can it be that the plugin has to inform that it, in fact, has started successfully a video?
Can I, somehow, avoid getting that message?

Thanks in advance,

Jur.

Hey, did you work out the details of this?
I was hoping to dump the contents of IceFilms and import it into the XBMC database, had some success. For instance, the TV show 24, Season 1, Episode 1, setting up a filename called 1x01.strm in folder "24", it imports into the database fine.
Inside the STRM file, I put the url which starts the Icefilms plugin for this episode (got this from "Movie Information" and a bit of reverse engineering):
plugin://plugin.video.icefilms/?url=http://www.icefilms.info/ip.php?v=718&

However i'm getting the same error as you (skipping unplayable item).. With the difference from your problem is that the actual script doesn't play the episode (because it doesn't start a movie, it needs a selection from the GUI before playing.

Did you work a way around this, check the code, or raise a bug?

Mori
I don't think strm files were ever intended to play plugins. I suspect the fact it works is an accidental side effect of the way XBMC handles URLs, and you're lucky it works at all!

You could probably achieve the effect you want using a short python script.

JR
Nice! Big Grin

You seem to have succeded doing what I tryed to do!

Could you give me the exact steps you take to make it working?

Or, do you have any files that makes it work?

Thank you
I've already done this in my XBMC.MyLibrary plugin. Take a look if you're interested. It takes content from plugins and puts it where it should be, in you video library.

Playing plugin files as .strms works beautifully for every plugin I've tried, except Icefilms.