Author Topic: Kroozbox - PVD to media theatre solution  (Read 150570 times)

0 Members and 2 Guests are viewing this topic.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #20 on: October 17, 2008, 12:51:50 am »
Nice documentation! And now I can see the search boxes from 10 feet. ;)

I think there are just two issues in the way of Kroozbox being usable (i.e., operated at a distance with a remote) when run in a browser...

First, there is no highlighting of links to indicate where the cursor/mouse is. If links would change the same way they do on mouse-hover, that would suffice. Then making the movie titles (i.e., as they appear under posters) links instead of plain text would make those visible when selected too. I don't know about the navigation icons and search boxes—is there a HTML code that changes images on selection/mouse-hover?

Second, when a media link is selected, it returns http://my.ip:8008/&media=moviepath/filename.avi, which causes the browser to "download" the file which in turn invokes a virus scanner. It seems to me, if it just returned moviepath/filename.avi, the movie would be launched in it's associated player.

In Firefox, a workaround for the first issue is to add something like the following to the Stylish extension. This is borrowed from MoreFocus style—so please don't ask me how it works :P. I was able to figure out that by changing the url-prefix variable in the second line from http to http://my ip address:8008, the style is applied only to Kroozbox (it may be too annoying for general use).

Code: [Select]
@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document url-prefix(http), url-prefix(file) {

/* NormalLink - hover */
*:link:hover   {
-moz-outline: 14px solid rgba(0,200,0,0.5) !important;
-moz-outline-offset: -14px !important;
/* -moz-outline-radius: 5px !important; */
}

/* FocusedElements & FocusedImages*/
:focus, :focus img {
-moz-outline: 12px solid rgba(255,255,0,0.5) !important;
-moz-outline-offset: -12px !important;
/* -moz-outline-radius: 5px !important; */
}

/* FocusedFormElements */
textarea:focus, input:focus, select:focus,button:focus, input[type="submit"]:focus
{
-moz-outline: 4px solid rgba(255,0,0,0.5) !important;
-moz-outline-offset: -2px !important;
/* -moz-outline-radius: 5px !important; */
}

/* HoveredFormElements */
textarea:hover:not(:focus), input:hover:not(:focus), select:hover:not(:focus),button:hover:not(:focus), input[type="submit"]:hover:not(:focus)
{
-moz-outline: 4px solid rgba(0,255,0,0.5) !important;
-moz-outline-offset: -2px !important;
/* -moz-outline-radius: 5px !important; */
}

/* Disables inner border in button */
*::-moz-focus-inner {border: 1px dotted transparent !important;}

}

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #21 on: October 17, 2008, 02:02:23 pm »
Quote
if it just returned moviepath/filename.avi, the movie would be launched in it's associated player

That wouldn't make any difference... and even... Kroozbox needs a way to know that the link is a media link and that it should get the movie from the original location and not under the template folder. The &media= tag is essential. The problem/solution is elsewhere.. Note that all is done properly in terms of the returned HTTP header (of the proper type). The media extender is working very well with it (skip forward, backward, seek, etc). Maybe another type or someting in the href link has to be specified... Can you find me a link (on the internet) pointing to a video that would launch your media player like you want? with it I would surely find the answer.

Quote
First, there is no highlighting of links to indicate where the cursor/mouse is
Ok.. i'll see what I can do. Thanks for pointing out the Firfox trick.
« Last Edit: October 17, 2008, 02:08:47 pm by Nono »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #22 on: October 17, 2008, 07:20:40 pm »
Quote
Can you find me a link (on the internet) pointing to a video that would launch your media player like you want?

http://911myths.com/wtc7moresmoke.avi launches in my media player. This is not a link, just something found in my browser history. But I can make it a LINK, and that does the same thing. Remember, I'm near clueless about TCP/IP. All I'm saying is if I enter the complete pathname of a media file in my location bar (which seems to be the equivalent of File - Open), it will be launched in my media player. That may be unique to my configuration of Firefox and my system—I don't know. Perhaps what I should be asking for is the use of the local file URL scheme (i.e., file:\\\moviepath/filename.avi). And I'm not suggesting there's anything wrong with Froozbox—I imagine this would be a user-modification or (preferably) a configuration option for running it in a browser. 

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #23 on: October 17, 2008, 08:15:32 pm »
This link also launch automatically with me but it is because of its small size (618k). It does get loaded completely before being given to the player (for me anyway).
Its funny because I use to have my browser streaming my video properly to the player and now it doesn't do it anymore (from all location - not only Kroozbox). Something has change in the last few months in my config and don't know what.. damn..

You will see that the links themselves works if you manually enter the media URL in the "open" option of VLC (or WMP)... so it is just a matter of browser/association/mimetype adjustment....

I have find another way to do it but it is somewhat of a patch. It involves wrapping the link into a .asx file descriptor that get sent to the browser. Works well under IE and Firefox /WMP/VLC but I'm reluctant to go that way until I have find the real reason for this behavior. I'll let you know.

If your movie files are all local (as your discussion seems to indicate), you could always change the link in the template to stream it with file:// instead of http.
Try this:
In the M-5.html file header you have this line:
Code: [Select]
MEDIAHTTPLOCATIONSTART= <tr><td colspan="4" align="left" style="vertical-align:middle;" valign="middle"><a href="&media=
Change it to:
Code: [Select]
MEDIAHTTPLOCATIONSTART= <tr><td colspan="4" align="left" style="vertical-align:middle;" valign="middle"><a href="file:///
Notice "&media=" changed to "file:///"

For series it is located in O-4.html
Change the line in the body that start with:
Code: [Select]
<a href="&media=<!--MEDIAHTTPLOCATION-->" TVID="Play" name="nextlink" vod>....
To
Code: [Select]
<a href="file:///<!--MEDIAHTTPLOCATION-->" TVID="Play" name="nextlink" vod>....
Notice the &media link replacement again.

Let me know.

Oh.. I have fix the "active" link behavior so you can now see much better what is your current link selection.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #24 on: October 17, 2008, 09:57:21 pm »
What timing! When I got your post, I had M-5.html and O-4.html open for editing. And I would have thought your change would do it, but...

As displayed in my status bar, the link seems to be okay: e.g., file:///E:/Viewed/Barbarian Invasions (2003) 7.8.avi.

If I click on it, or copy link location, however, it does this: file:///E%3a%2fViewed%2fBarbarian%20Invasions%20%282003%29%207%2e8%2eavi, which, of course, doesn't work.

Quote
You will see that the links themselves works if you manually enter the media URL in the "open" option...

So, yes, I now understand there's a difference between entering it "manually" and using the link. And that reminds me I have another issue to deal with—Firefox blocks links to local files. I've installed the Policy Manager add-on as a means to allow it for Froozbox.

Quote
I have fix the "active" link behavior so you can now see much better what is your current link selection.

Great. I'm sure others will appreciate not having to implement my solution. :D

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #25 on: October 17, 2008, 10:50:47 pm »
Quote
If I click on it, or copy link location, however, it does this: file:///E%3a%2fViewed%2fBarbarian%20Invasions%20%282003%29%207%2e8%2eavi, which, of course, doesn't work.

But its working fine on my machine - what's the error?
The link is UUEncoded as it should - normal.

Quote
So, yes, I now understand there's a difference between entering it "manually" and using the link. And that reminds me I have another issue to deal with—Firefox blocks links to local files. I've installed the Policy Manager add-on as a means to allow it for Froozbox.
I don't have this issue with Firefox... hmmm.. this is all strange.

I'll send you my modified code with ASX wrapping and see what happens. It will be done for next Sunday/Monday dough (busybusy)... or maybe tonigh if I am couragous.

Thanks.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #26 on: October 18, 2008, 01:28:12 am »
Quote
But its working fine on my machine - what's the error?

Just to be clear—I'm not talking about Froozbox now, just general behaviour in Firefox... When my file:///... examples are entered manually, the first one works and the second doesn't. A new tab is opened, but nothing happens. There's no error.

To test how such links work in Firefox, I created a HTML file with three links:

Code: [Select]
<a href="file:///E:\Viewed\Barbarian%20Invasions%20(2003)%207.8.avi">Word Link</a>
<a href="file:///E%3a%2fViewed%2fBarbarian%20Invasions%20%282003%29%207%2e8%2eavi">Kroozbox Link</a>
<a href="file:///E:\Viewed\Barbarian Invasions (2003) 7.8.avi">Text Link</a>

I made the first one by creating and saving a hyperlink in a Word document. It works fine. The second is copied from the Froozbox page source. It doesn't work (nothing at all happens—not even a new tab opened). Pondering what Word did, I thought "why bother," and made the third "plain text" link. It works fine too. So it looks like the issue has something to do with the UUencoding of the link.

BTW, my testing also seems to indicate the use of Policy Manager has no effect on local file access. ::)

Quote
I'll send you my modified code with ASX wrapping and see what happens.

Maybe that's what's going to be required to handle multiple files anyway. They currently appear as separate links.

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #27 on: October 20, 2008, 11:06:57 pm »
I made an update of Kroozbox to QA.

http://rapidshare.com/files/155955130/Kroozbox1.2.zip

Please give it a try and let me know. If the link doesn't open in its own window (as before) you will have to set the "wrapMediaInASX" to "true" inside of the Kroozbox.properties file and restart Kroobox. you should first try without it first.
I couldn't remove the UUEncoding because it doens't work anymore on the media extender if I do it.... so I hope the link wrapping in ASX will do the job.
The file:/// might also work now... I'm saying "might" because I don't have the issues you have.

Also, the selection is now highlighted like the link hover and a few more things (internal).

Let me know.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #28 on: October 21, 2008, 01:52:34 am »
With wrapMediaInASX = false, the file is "downloaded" to C:\TEMP\&media=E__Viewed_Barbarian Invasions (2003) 7.8.avi, and then that is played.

With wrapMediaInASX = true, the current tab reloads (it seems), but nothing happens. The link appears in my status bar as http://my-ip:8008/&media=E:/Viewed/Barbarian Invasions (2003) 7.8.avi.asx. I don't see any sign of such an ASX file being created. If I copy the link location, I get http://my-ip:8008/&media=E%3a%2fViewed%2fBarbarian%20Invasions%20%282003%29%207%2e8%2eavi%2easx which suggests to me the uuencoding issue is still in play. Files for multi-part movies still appear as separate links—each link just has the ".asx" appended.

The behaviour with the file:/// change is the same as before.

The selection highlighting is nice. ;)

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #29 on: October 21, 2008, 02:19:29 pm »
fyi, the ASX file is transitory, it is normal that you don't see it. The template for it is in the config folder (ASXWrapper.txt).

Now, I finally know (hopefuly) why you are having issue and not me (and I should have seen it before). I use the media location transformation in the configuration and you don't. Meaning that the drive of the media will appear in your links (in some of your exemple: e:/). I'm suspecting that the ":" is confusing VLC since it is also a port separator.

Can you please try something for me to ensure that this is the problem?
Can you open your ./config/Kroozbox.properties file and activate the "localMediaRoot" and "dbaseMediaRoot" properties and put a value. For your environment, you should put the same value in both. From your exemple your should get:

localMediaRoot=e:/
dbaseMediaRoot=e:/

The idea here is that the drive: will be stripped out of the URL and VLC should not give you any issues.
Now, this may work or not without the ASX warpper but I'm pretty sure that you will need it (wrapMediaInASX=true).

Let me know and if it works and I will update the code not to have any drive delimiter (":") anymore.

Thank you.



Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #30 on: October 22, 2008, 03:28:48 am »
Quote
I'm suspecting that the ":" is confusing VLC since it is also a port separator.

From the behaviour I've seen, I don't think the issue extends beyond Firefox, but I'll give this a try...

Nope. I may be wrong, but after trying it all sorts of different ways in Firefox, Opera and IE, and with different media players, I'm convinced this is not going to work the way you're trying to make it work. The closest I got to seeing anything working was (1) the file being "downloaded" and played from the temp directory or browser cache, or (2) the media player being launched immediately, but not being passed a valid file path.

I wonder if you're insisting the browser send the link selection back to Kroozbox, so Kroozbox can issue a command to play the file referred to in the link. Isn't there a way to make a plain file:\\\ link for the browser to use directly? In other words, like the <a href="file:///E:\Viewed\Barbarian Invasions (2003) 7.8.avi">Text Link</a> I mentioned before—the file:/// modification, but also somehow preventing the uuencoding. I understand that's what you were trying to do with the ASX wrapper, but is there not a more direct way? Yes, I know, I'm reaching for straws... ::)

To repeat my previous experiment—because I've changed so many things since trying it last—if I save <a href="file:///E:\Video\Elite Squad (2007) 8.1 Disc 1.avi">Text Link</a> in a HTML file, selecting the link produces file:///E:/Video/Elite%20Squad%20(2007)%208.1%20Disc%201.avi, which launches in my media player. The Froozbox link source is <a href="file:///E%3a%2fVideo%2fElite%20Squad%20%282007%29%208%2e1%20Disc%201%2eavi"..., which produces file:///E%3a%2fVideo%2fElite%20Squad%20%282007%29%208%2e1%20Disc%201%2eavi, which does nothing. So the problem seems to be the path is uuencoded in the source.

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #31 on: October 22, 2008, 03:03:05 pm »
OK... I hear you loud and clear now. I just wanted to make the Kroozbox internal HTTP server work properly.

Please get revised version of Kroozbox.jar file here:

http://rapidshare.com/files/156467029/Kroozbox.jar
Need to overwrite the one present in teh root of your installation.

You will have to add this line to the "./config/kroozbox.properties" file:

UUEncodeMediaLink = false

Make sure that "wrapMediaInASX" is false. Restart Kroozbox. After that the media link won't be UUEncode at all.

It would be nice if you could test it with "file:///" and "&media=" refs in the M-5 and O-4 files with "wrapMediaInASX" false and true. So, I can update the documentation properly.

I get strange behavior with VLC where it takes up to a minute to start the link playing (nice with WMP) but that's probably my config.

Rick.ca... are you from Canada (.ca)? from Ottawa myself.

Cheers.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #32 on: October 22, 2008, 09:23:15 pm »
YES! It works. Sort of. Sometimes. :-\

With wrapMediaInASX=false and using file:///, it works—sometimes. I have video on drives E:, L: and R:. It works only for files on E:. Files on other drives result in page load errors like Firefox can't find the file at /R:/Movies/Fight Club (1999) 8.7 #26.avi. (It looks like the leading "/" is the problem.) Using &media=, the file is "downloaded."

With wrapMediaInASX=true and using file:/// results in the same page load error, regardless of the file location. Using &media=, nothing happens for files on E:. Files on other drives result in errors like The requested media file cannot be found (adjust 'dbaseMediaRoot' and/or 'localMediaRoot' properties: R:\Movies\Fight Club (1999) 8.7.

Quote
I get strange behavior with VLC where it takes up to a minute to start the link playing (nice with WMP) but that's probably my config.

I haven't been using VLC (my default player is J River Media Center), but I wonder if that delay might be because the file is downloading. I've seen this with MS Media Player—it starts up and looks like its going to play a file normally, but its actually downloading the file in the background.

Quote
Rick.ca... are you from Canada (.ca)?

You've blown my cover! Here I had everyone believing I was Rick from Casablanca. Yes—Victoria. Now I'll have to find another avatar that conveys "crazy man on an island in the pacific." ;)

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #33 on: October 22, 2008, 09:46:31 pm »

Quote
I have video on drives E:, L: and R:. It works only for files on E:. Files on other drives result in page load errors
damn... that's weird

Have you tried to access those files (on L: and/or R:) from a hand made HTML like the one you did before:
Code: [Select]
<html>
<a href="file:///R:/Movies/Fight Club (1999) 8.7 #26.avi">A link</a>
</html>

Does it work!?

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #34 on: October 22, 2008, 11:31:32 pm »
No, links to files on R: do not work. Links to files on E: do work. I tried the same in IE, and both work. So it seems the problem is with Firefox. I tried Firefox in safemode—same result. I can't see anything in my configuration settings that would cause this. I suppose this might have something to do with the fact E: is a hard drive partition, and R: is a USB drive partition—but I can't imagine what.

This is so weird, I'm almost willing to use Kroozbox with IE. Oh, but wait... While the HTML file links work fine, the identical Kroozbox links do nothing in IE! I haven't tried all possibilities (just wrapMediaInASX=false with file:\\\), but I need to take a break before my head explodes... ???

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #35 on: October 23, 2008, 01:47:52 pm »
Under IE you could always try without the "file:///" protocol part (just remove it in M5 and O4). The link would become only the file path without the protocol. That won't work under Firefox but IE would understand it. Might get better results.

Update done to version 1.2a
http://rapidshare.com/files/156881983/Kroozbox1.2a.zip

Link also updated in original/first post.
« Last Edit: October 23, 2008, 08:15:40 pm by Nono »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #36 on: October 23, 2008, 09:56:19 pm »
Quote
Under IE you could always try without the "file:///" protocol part (just remove it in M5 and O4). The link would become only the file path without the protocol. That won't work under Firefox but IE would understand it. Might get better results.

It doesn't work with that change either. It seems Kroozbox still adds the "file:///" (according to the appearance of the link in the status bar). I appreciate your help in trying to resolve this, but I'm the wrong person to test it in IE. I detest it to a degree that I'm probably totally blind to problems on my end. At least I learnt something about the security structure of Firefox. A simple explanation I came across was:

Mozilla employs a strict security model which distinguishes between "chrome" (components of your browser, accessible by chrome://-URLs), "local" (files on your machine, i.e. accessible by file://-links) and outside. "chrome" can access everything, "local" can access everything but "chrome", outside content can only access outside content.

While I still don't understand exactly what's going on, this suggests to me why a link (local?) won't work, but the same string entered in the location bar (chrome) will. Maybe Firefox sees my hard drive as "local" and my external drive as "outside," explaining that issue as well.

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #37 on: November 25, 2008, 10:18:07 pm »
Kroozbox update done to 1.4 (first post updated):

http://rapidshare.com/files/167372714/Kroozbox1.4.zip

Better handling of none latin characters, high def video in menu selection, code cleanup, and more...

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #38 on: December 14, 2008, 05:30:32 pm »
Update done to accomodate ISO on the NMT (Popcorn jour) and better code structure.

Version 1.5 can download at:
http://www.omertron.com/pch/node/65
(better this site then rapidshare - thanks to Omertron).

If you are using a previous version you should uninstall (REMOVESERVICE, shutdown down) and delete it (take note of any modifications you may have done) before installing this one. The installation structure is different.
To play other type(s) of media (ISO) through share you will have to add your share name to the ./config/globalParam.properties file (should be obvious or check overview documention).

Cheers.

Offline Nono

  • User
  • ***
  • Posts: 64
    • View Profile
Re: Kroozbox - PVD to media theatre solution
« Reply #39 on: January 02, 2009, 09:21:15 pm »
Update done to Version 1.7.

It can download at:
http://www.omertron.com/pch/node/77
(better this site then rapidshare - thanks to Omertron).

Inludes Music Jukebox and....

Not directly related to PVD but there are also some templates changes for PVD.
Cheers.