Online Video Sources?

  • Much like TVLinks, I maintain a database of online videos. I know the location of the video, the title, description, thumbnail location, etc.

    It seems like I should be able to generate an xml or nfo file stored either locally, or better yet online, that XBMC can read and use to play the videos.

    I've tried some rudimentary experiments like putting a nfo file in an online folder, which works if the file is local, but not if the file is in another location. I thought maybe the tag would handle the situation, but it seems not to.

    Is there a way to make this work? I could easily format the xml files to comply, but the files aren't in bed with the xml content. Also, I would be happy to make the list public.


  • That's a cool project, and one I'm happy to find out about.

    However, it's different from what I'm talking about. I'm talking about a video site like youtube etc with flv and other static videos. The difference is that it's aggregated from multiple sources, maintained for dead links, and controlled by me so I can customize an online xml (or any other type) file to make it readily work with xbmc.

    Do you think this is possible?


  • If using .STRM files does not suit your purpose then a python script is the only other way in XBMC.
    You might want to start by looking at an existing similar python script like XOT (XOT-UZG) (http://code.google.com/p/xot-uzg/).

    Other than that, read with the manual and the 'sticky' threads in the python development forum:
    http://xboxmediacenter.com/wiki/index.php?title=Category:Python
    http://xboxmediacenter.com/wiki/index.php?title=Building_Python_Scripts
    http://xboxmediacenter.com/wiki/index.php?title=HOW-TO:_ALEX%27s_Python_Tutorial
    http://xbmc.org/forum/forumdisplay.php?f=26

    Good luck and please share your results with the rest of the community.


  • Thanks Jonathan,

    Hmmm, both methods have their own appeal.

    The latter is probably preferable because the list will be constantly changing; more videos are added, locations change, etc. On the other hand, I don't know a lick of python. Given a good enough list, is that the kind of thing a python coder might take on for the benefit of the community?

    Short of that, if I wanted to go the xml route, how would I do that? I tried uploading a test.xml file into my UserData folder, then I did the import as suggested, but on what list would the imported video now appear? And will it find the video in the location?


  • You want them in your video database, or you just want them to list nicely and be playable?

    If the latter, you could write a python directory plugin to do it.

    If the former, you could generate an xml file as you say and import them into the db (settings->videos->Import from XML).

    Cheers,
    Jonathan


  • Using "play with" from the context menu, make sure you're using MPlayer, the DVD Player doesn't cache stuff in the same way (at all?).

    If it's from a script you can do something like:

    xbmc.Player(xbmc.PLAYER_CORE_MPLAYER).play(play).


  • I realized that whether it chooses DVDPlayer or mplayer for a .strm file depends on whats inside. If it's a .FLV file, it chooses DVDPlayer, but for a .php link it uses mplayer.FYI; XBMC python scripts supports forcing which player core to use (DVDPlayer, MPlayer, PAPlayer, etc.)


  • OK, here's what I'm finding:

    Let's say I have an FLV file online, and the same file on my HDD. I can create a .strm file that points to the online file.

    If I right click (title) on the flv file and choose Play Using, the default is DVD Player. If I right click on the .strm file, the default is MPlayer. So far, so good.

    Now, focusing on the .strm file, the odd thing is it says that the default is MPlayer, but if I simply press play on it, I believe it is using DVDPlayer.

    Here is why I think that:
    1. When I actually choose Play Using and choose MPlayer, it does in fact cache the first 4 megs as it should.

    2. When I simply press Play and I pause it and choose Title, it says DVDPlayer in there.

    So am I wrong to think it's incorrect that it says MPlayer (Default) but by default plays with DVDPlayer?

    Beyond that I found that if I packaged the .strm file inside a folder with a folder.jpg, then if I right clicked on it, there was no Play Using option, only Play. And it played with DVDPlayer.

    Another thing I found is that with the .strm files that come with xbox-tv, it does default to MPlayer, even if you don't specify. The only difference between their .strm files and my .strm files is that theirs point to mms:// links and mine point to http:// links on the inside.

    And finally, I found that if I forced it to use MPlayer, then it would play the FLV streams correctly, at least the ones that I tried. Occasionally one might drop early, but I think a larger cache setting would fix that problem.

    I should also state that I am using a build from Aug 19th, so if this issue was fixed, my apologies. I am just loathe to change it b/c I finally got ReplayTV working on there and thats been really hit and miss with me.


  • I don't think it has anything to do with the buffer/cache. It is more likely that the format is not supported by the player you tried in XBMC, (first you have the audio and video container and codec formats, and then you have the streaming protocol). XBMC has two video players and niether of those support all all FLV formats, (yes there are more than one FLV format, they all have the FLV extention but there are different versions of containers, and different versions of the audio and video codecs).

    By default XBMC uses the "MPlayer" video-player core in XBMC, you can try to force XBMC to play a video file or stream using "DVDPlayer" video-player core by selecting 'play with...' from the contexted-meny in XBMC when you high-lighted the file.

    You can get debug logs from XBMC to get us to confirm any issus (search for "debug log" in the manual).


  • Using STRM way is simple for online videos, but I'm not sure if they can be scanned into the database, (in which case you have to use file-mode)
    http://xboxmediacenter.com/wiki/index.php?title=HOW-TO:_Play_Internet_Streams

    EDIT: There is a pre-made community project maintaining a list of such package .STRM files here:
    http://code.google.com/p/xbmc-strm-collection/
    http://xbmc-streams.blogspot.com/
    http://www.op9.net/latest/148/xbmc-tv-round-v

    See this topic-thread for discussion: http://xbmc.org/forum/showthread.php?t=24486

    :grin:


  • What I'm finding is that I can use the .strm files, much like the xbmc-tv guys do. The biggest problem now is that many online .flv files don't want to stream properly. They will play fine on a web page, but in XBMC they play briefly, then simply stop. My suspicion is that they are not buffering. I get no initial buffering message like I do with online .divx content. The same flv file plays fine streaming across my network.

    If this is the case, is this by design? Is it an oversight that could be remedied?


  • For added clarity and to try this yourself, I made a little download.

    videos.rar (http://vids.majorheadache.net/Videos.rar)

    Download and extract to wherever you keep your videos. You will find an FLV file, which you can play with either player, and you will see a folder with an included folder.jpg. The folder also contains a .strm file with a link to that same FLV file on a server.

    It would be great if you could simply press Play on the folder and get MPlayer, but I get DVDPlayer, and no ability to choose Play Using.

    Once you go into the folder and select the .strm file, if you choose Play Using MPlayer, it caches and typically plays fully, but if you simply press Play, there's no caching and I believe it's using DVDPlayer, and it usually doesn't play very far.

    This may seem like much ado about nothing, but A. I think it's supposed to work that way. 2. If it did, then it would play many of these online FLV files. There's a lot of interesting content that could be played this way.


  • given that the same file streams briefly, and for varying amounts of time when online, but always completely when streaming on my network, doesn't that suggest it's not a file compatibillity issue?


  • OK, I realized that whether it chooses DVDPlayer or mplayer for a .strm file depends on whats inside. If it's a .FLV file, it chooses DVDPlayer, but for a .php link it uses mplayer. I also figured out that the .strm file can contain a playlist, including an online playlist.
    So, I asked my friend to write a script that generates various playists that might be interesting content when in front of XBMC. We came up with the following ideas:
    Movie Trailer - Latest 10.strm
    Movie Trailer Top 10 (All Time).strm
    Sexy Vids - Latest 10.strm
    Sexy Vids Top 10 (All Time).strm
    Top 10 (All Time).strm
    Top 10 (Today).strm
    Random.strm

    They get their data from vidstumbler and it updates every few hours. This way you could get new content periodically without having to edit your local files. I thought that was pretty neat.

    Of course if you know the source for an FLV file, you can always create your own .strm file following those examples. I was able to stream a movie hosted on VEOH and it came in quite nicely. And if you're into more mature fare, there are video sites for that too. If the sites don't display them, you can often get the FLV link from sites like trapvid.

    All in all I think this worked out pretty well. If anybody has any suggestions or feedback, I'd be interested in hearing it.

    To download the .strm files above, heres a link:

    www.vidstumbler.com/VIDstumbler.rar







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Online Video Sources? , Please add it free.