Author Topic: TV streams added to Video category in orbiter  (Read 9021 times)

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: TV streams added to Video category in orbiter
« Reply #15 on: February 06, 2009, 04:12:08 am »
Colin,
as usual just talking about the problem to better understand it helped a lot.
I just tried an idea I had this morning but forgot to try:

Just adding it like this: http://87.118.126.208:2008/  (notice the extra / at the end)

And voila! It plays fine even outside a Media Scenario, just from the regular media file browser interface!

So I will think a bit more about this to see what this means. I would like to try and import all shoutcast streams (they provide some sort of xml feed containing all streams) into the LMCE database, as long as there is a sensible way to find them afterwards. I can probably write the station name as a "title" attribute...

Jean

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: TV streams added to Video category in orbiter
« Reply #16 on: February 06, 2009, 05:13:32 am »
Damn it, I was going to suggest that based on how the URLs appear in my scenarios but thought "no I'm sure you've tried that"! :)

Was thinking through the parsing and reassembly... I think looking for the first "/" from the right would be faulty logic as it assumes the first / is a single one which isn't the case if you don't include this trailing slash...

Either way, how are you entering these "media files" into your system so that you can subsequently pick them for play lists? Can you simply browse to them under Audio as well? (seem to remember you talking about this a long time ago, like a year!)

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: TV streams added to Video category in orbiter
« Reply #17 on: February 06, 2009, 06:17:08 am »
Colin,
actually I wanted to try it this morning but then forgot. Then after your last post I searched google for xinelib and pls, and the first link had some examples of how the decoded stream is passed to xinelib and it had the / at the end! And no I never try the most obvious things for some reason :-)

To add the streams at the moment I follow the instructions on the audio stream wiki page. When you create a scenario and click on test, it creates the stream in the File table just like any other media file on your system.
That's how I did it initially anyway, then I edited it by hand in the DB to add a missing / after http:
I haven't tried it again with the extra / at the end, will do so and report back. Maybe that inserts it the proper way into the db, or maybe it makes things worse.
Either way, once we know how it's supposed to be inserted (what I tested was Path="http:/" and Filename="87.118.126.208:2008/" ) then it's easy to create a php webpage to add streams in such a way, and even delete them.

Jean

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: TV streams added to Video category in orbiter
« Reply #18 on: February 06, 2009, 06:47:38 am »
And no I never try the most obvious things for some reason :-)

Nobody ever does, its the Occam's Razor subset of Murphy's Law! "Typical, Doh! -> The simplest explanation is usually correct"

Yes, I have seen those in my db, but never seen them in my media browser, where do you see them? Sorted under what?

Colin

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: TV streams added to Video category in orbiter
« Reply #19 on: February 06, 2009, 06:49:24 am »
Scratch that, found them!


EDit:

tricky, difficult to add any attributes as they are not in the folder structure so you can't find them via file sync, nor do they have existing attributes for the media browser as path and filename don't count... do we have to attach attributes manually (at least the first one anyway) through SQL?
« Last Edit: February 06, 2009, 06:58:12 am by colinjones »

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: TV streams added to Video category in orbiter
« Reply #20 on: February 06, 2009, 07:51:57 am »
Colin,
the way I'm searching for this test is simply by doing a "search" for a part of the IP address, but you figured that out by now.

Yes I was thinking to add the attributes directly in SQL. Let's hope Thom is not reading :-)

I have yet to figure out where the attributes are stored, I assume a separate table, using the same PK_File Id. I just haven't found the table yet.

It would be simple to do a php web page to achieve this, but first I want to experiment and see if the attributes make it any easier to find the streams. Otherwise perhaps I could generate playlists to sort them. Also looking at how to import all Shoutcast streams, and perhaps synchronize them nightly or something like that...

Jean

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: TV streams added to Video category in orbiter
« Reply #21 on: February 06, 2009, 12:42:57 pm »
he he!

The searches I've done along those lines didn't turn up the Internet Radio entries....

Yes, basically, the File table gives you the PK for the "file". The File_Attribute cross references this to the Attributes assigned to that file. Then you can use the Attributes table and the PK from the File_Attributes table to list the attributes.

For these there will be none. We can add them but it means creating new PK's in some cases and that scares the crap out of me! How about circumventing this and creating a new media file with at least one attribute. Then deleting that file, and hijacking the db entry, because at that time there will be an attribute to search on and apply other attributes to?

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: TV streams added to Video category in orbiter
« Reply #22 on: February 06, 2009, 06:23:55 pm »
Colin,

yes that works for 1 file, but about for 100?
Isn't the PK an auto index anyway? (I'm not near my system to check right now).
I'll try it out and report.

Jean